Struct gix_actor::SignatureRef
source · pub struct SignatureRef<'a> {
pub name: &'a BStr,
pub email: &'a BStr,
pub time: Time,
}
Expand description
A immutable signature is created by an actor at a certain time.
Note that this is not a cryptographical signature.
Fields§
§name: &'a BStr
The actor’s name.
email: &'a BStr
The actor’s email.
time: Time
The time stamp at which the signature was performed.
Implementations§
source§impl<'a> SignatureRef<'a>
impl<'a> SignatureRef<'a>
sourcepub fn from_bytes<E>(data: &'a [u8]) -> Result<SignatureRef<'a>, ErrMode<E>>
pub fn from_bytes<E>(data: &'a [u8]) -> Result<SignatureRef<'a>, ErrMode<E>>
Deserialize a signature from the given data
.
sourcepub fn trim(&self) -> SignatureRef<'a>
pub fn trim(&self) -> SignatureRef<'a>
Trim whitespace surrounding the name and email and return a new signature.
sourcepub fn actor(&self) -> IdentityRef<'a>
pub fn actor(&self) -> IdentityRef<'a>
Return the actor’s name and email, effectively excluding the time stamp of this signature.
Trait Implementations§
source§impl<'a> Clone for SignatureRef<'a>
impl<'a> Clone for SignatureRef<'a>
source§fn clone(&self) -> SignatureRef<'a>
fn clone(&self) -> SignatureRef<'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 SignatureRef<'a>
impl<'a> Debug for SignatureRef<'a>
source§impl<'a> Default for SignatureRef<'a>
impl<'a> Default for SignatureRef<'a>
source§fn default() -> SignatureRef<'a>
fn default() -> SignatureRef<'a>
Returns the “default value” for a type. Read more
source§impl<'de: 'a, 'a> Deserialize<'de> for SignatureRef<'a>
impl<'de: 'a, 'a> Deserialize<'de> for SignatureRef<'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 Signature> for SignatureRef<'a>
impl<'a> From<&'a Signature> for SignatureRef<'a>
source§fn from(other: &'a Signature) -> SignatureRef<'a>
fn from(other: &'a Signature) -> SignatureRef<'a>
Converts to this type from the input type.
source§impl From<SignatureRef<'_>> for Signature
impl From<SignatureRef<'_>> for Signature
source§fn from(other: SignatureRef<'_>) -> Signature
fn from(other: SignatureRef<'_>) -> Signature
Converts to this type from the input type.
source§impl<'a> Hash for SignatureRef<'a>
impl<'a> Hash for SignatureRef<'a>
source§impl<'a> Ord for SignatureRef<'a>
impl<'a> Ord for SignatureRef<'a>
source§fn cmp(&self, other: &SignatureRef<'a>) -> Ordering
fn cmp(&self, other: &SignatureRef<'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 SignatureRef<'a>
impl<'a> PartialEq for SignatureRef<'a>
source§fn eq(&self, other: &SignatureRef<'a>) -> bool
fn eq(&self, other: &SignatureRef<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PartialOrd for SignatureRef<'a>
impl<'a> PartialOrd for SignatureRef<'a>
source§fn partial_cmp(&self, other: &SignatureRef<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &SignatureRef<'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 SignatureRef<'a>
impl<'a> Serialize for SignatureRef<'a>
impl<'a> Copy for SignatureRef<'a>
impl<'a> Eq for SignatureRef<'a>
impl<'a> StructuralEq for SignatureRef<'a>
impl<'a> StructuralPartialEq for SignatureRef<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for SignatureRef<'a>
impl<'a> Send for SignatureRef<'a>
impl<'a> Sync for SignatureRef<'a>
impl<'a> Unpin for SignatureRef<'a>
impl<'a> UnwindSafe for SignatureRef<'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