Struct gix_actor::IdentityRef
source · 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<'a> IdentityRef<'a>
impl<'a> IdentityRef<'a>
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§fn eq(&self, other: &IdentityRef<'a>) -> bool
fn eq(&self, other: &IdentityRef<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PartialOrd for IdentityRef<'a>
impl<'a> PartialOrd for IdentityRef<'a>
source§fn partial_cmp(&self, other: &IdentityRef<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &IdentityRef<'a>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
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
)