pub struct User {
pub names: Vec<String>,
pub emails: Vec<String>,
/* private fields */
}Fields§
§names: Vec<String>§emails: Vec<String>Implementations§
Source§impl User
impl User
pub fn new(name: impl Into<String>, email: impl Into<String>) -> Self
Sourcepub fn parse(s: &str) -> Result<Self, ParseError>
pub fn parse(s: &str) -> Result<Self, ParseError>
Parse “Name email@example.com” format.
pub fn none() -> User
pub fn name(&self) -> String
pub fn email(&self) -> String
pub fn initials(&self) -> String
pub fn is_none(&self) -> bool
pub fn combine(self, other: &User, group_email: &str) -> User
Trait Implementations§
impl Eq for User
Auto Trait Implementations§
impl Freeze for User
impl RefUnwindSafe for User
impl Send for User
impl Sync for User
impl Unpin for User
impl UnsafeUnpin for User
impl UnwindSafe for User
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.