pub struct IdentityRef<'a> {
pub name: &'a BStr,
pub email: &'a BStr,
}
Expand description
A person with name and email, as reference.
Fields§
§name: &'a BStr
The actors name.
email: &'a BStr
The actor’s email.
Implementations§
Source§impl IdentityRef<'_>
impl IdentityRef<'_>
Source§impl<'a> IdentityRef<'a>
impl<'a> IdentityRef<'a>
Sourcepub fn from_bytes<E>(data: &'a [u8]) -> Result<Self, ErrMode<E>>
pub fn from_bytes<E>(data: &'a [u8]) -> Result<Self, ErrMode<E>>
Deserialize an identity from the given data
.
Sourcepub fn trim(&self) -> IdentityRef<'a>
pub fn trim(&self) -> IdentityRef<'a>
Trim whitespace surrounding the name and email and return a new identity.
Trait Implementations§
Source§impl<'a> Clone for IdentityRef<'a>
impl<'a> Clone for IdentityRef<'a>
Source§fn clone(&self) -> IdentityRef<'a>
fn clone(&self) -> IdentityRef<'a>
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<'a> Debug for IdentityRef<'a>
impl<'a> Debug for IdentityRef<'a>
Source§impl<'a> Default for IdentityRef<'a>
impl<'a> Default for IdentityRef<'a>
Source§fn default() -> IdentityRef<'a>
fn default() -> IdentityRef<'a>
Returns the “default value” for a type. Read more
Source§impl<'de: 'a, 'a> Deserialize<'de> for IdentityRef<'a>
impl<'de: 'a, 'a> Deserialize<'de> for IdentityRef<'a>
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<'a> From<&'a Identity> for IdentityRef<'a>
impl<'a> From<&'a Identity> for IdentityRef<'a>
Source§fn from(other: &'a Identity) -> IdentityRef<'a>
fn from(other: &'a Identity) -> IdentityRef<'a>
Converts to this type from the input type.
Source§impl From<IdentityRef<'_>> for Identity
impl From<IdentityRef<'_>> for Identity
Source§fn from(other: IdentityRef<'_>) -> Identity
fn from(other: IdentityRef<'_>) -> Identity
Converts to this type from the input type.
Source§impl<'a> Hash for IdentityRef<'a>
impl<'a> Hash for IdentityRef<'a>
Source§impl<'a> Ord for IdentityRef<'a>
impl<'a> Ord for IdentityRef<'a>
Source§fn cmp(&self, other: &IdentityRef<'a>) -> Ordering
fn cmp(&self, other: &IdentityRef<'a>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a> PartialEq for IdentityRef<'a>
impl<'a> PartialEq for IdentityRef<'a>
Source§impl<'a> PartialOrd for IdentityRef<'a>
impl<'a> PartialOrd for IdentityRef<'a>
Source§impl<'a> Serialize for IdentityRef<'a>
impl<'a> Serialize for IdentityRef<'a>
impl<'a> Copy for IdentityRef<'a>
impl<'a> Eq for IdentityRef<'a>
impl<'a> StructuralPartialEq for IdentityRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for IdentityRef<'a>
impl<'a> RefUnwindSafe for IdentityRef<'a>
impl<'a> Send for IdentityRef<'a>
impl<'a> Sync for IdentityRef<'a>
impl<'a> Unpin for IdentityRef<'a>
impl<'a> UnwindSafe for IdentityRef<'a>
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