pub struct OpenPgpUserIdList(Vec<OpenPgpUserId>);
Expand description
A list of OpenPgpUserId
The items of the list are guaranteed to be unique.
Tuple Fields§
§0: Vec<OpenPgpUserId>
Implementations§
source§impl OpenPgpUserIdList
impl OpenPgpUserIdList
sourcepub fn new(user_ids: Vec<OpenPgpUserId>) -> Result<Self, Error>
pub fn new(user_ids: Vec<OpenPgpUserId>) -> Result<Self, Error>
Creates a new OpenPgpUserIdList
§Errors
Returns an error, if one of the provided OpenPgpUserId
s is a duplicate.
§Examples
use nethsm::OpenPgpUserIdList;
OpenPgpUserIdList::new(vec![
"🤡 <foo@xn--rl8h.org>".parse()?,
"🤡 <bar@xn--rl8h.org>".parse()?,
])?;
// this fails because the two OpenPgpUserIds are the same
assert!(OpenPgpUserIdList::new(vec![
"🤡 <foo@xn--rl8h.org>".parse()?,
"🤡 <foo@xn--rl8h.org>".parse()?,
])
.is_err());
pub fn iter(&self) -> impl Iterator<Item = &OpenPgpUserId>
Trait Implementations§
source§impl AsRef<[OpenPgpUserId]> for OpenPgpUserIdList
impl AsRef<[OpenPgpUserId]> for OpenPgpUserIdList
source§fn as_ref(&self) -> &[OpenPgpUserId]
fn as_ref(&self) -> &[OpenPgpUserId]
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for OpenPgpUserIdList
impl Clone for OpenPgpUserIdList
source§fn clone(&self) -> OpenPgpUserIdList
fn clone(&self) -> OpenPgpUserIdList
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for OpenPgpUserIdList
impl Debug for OpenPgpUserIdList
source§impl<'de> Deserialize<'de> for OpenPgpUserIdList
impl<'de> Deserialize<'de> for OpenPgpUserIdList
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<OpenPgpUserIdList> for Vec<String>
impl From<OpenPgpUserIdList> for Vec<String>
source§fn from(value: OpenPgpUserIdList) -> Self
fn from(value: OpenPgpUserIdList) -> Self
Converts to this type from the input type.
source§impl Hash for OpenPgpUserIdList
impl Hash for OpenPgpUserIdList
source§impl PartialEq for OpenPgpUserIdList
impl PartialEq for OpenPgpUserIdList
source§impl Serialize for OpenPgpUserIdList
impl Serialize for OpenPgpUserIdList
impl Eq for OpenPgpUserIdList
impl StructuralPartialEq for OpenPgpUserIdList
Auto Trait Implementations§
impl Freeze for OpenPgpUserIdList
impl RefUnwindSafe for OpenPgpUserIdList
impl Send for OpenPgpUserIdList
impl Sync for OpenPgpUserIdList
impl Unpin for OpenPgpUserIdList
impl UnwindSafe for OpenPgpUserIdList
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)