pub struct SignedUser {
pub id: UserId,
pub signatures: Vec<Signature>,
}
Fields§
§id: UserId
§signatures: Vec<Signature>
Implementations§
Source§impl SignedUser
impl SignedUser
pub fn new(id: UserId, signatures: Vec<Signature>) -> Self
Sourcepub fn verify(&self, key: &impl PublicKeyTrait) -> Result<()>
pub fn verify(&self, key: &impl PublicKeyTrait) -> Result<()>
Verify all signatures (for self-signatures). If signatures is empty, this fails.
Sourcepub fn verify_third_party(
&self,
signee: &impl PublicKeyTrait,
signer: &impl PublicKeyTrait,
) -> Result<()>
pub fn verify_third_party( &self, signee: &impl PublicKeyTrait, signer: &impl PublicKeyTrait, ) -> Result<()>
Verify all signatures (for third-party signatures). If signatures is empty, this fails.
pub fn is_primary(&self) -> bool
Trait Implementations§
Source§impl Clone for SignedUser
impl Clone for SignedUser
Source§fn clone(&self) -> SignedUser
fn clone(&self) -> SignedUser
Returns a duplicate 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 SignedUser
impl Debug for SignedUser
Source§impl PartialEq for SignedUser
impl PartialEq for SignedUser
Source§impl Serialize for SignedUser
impl Serialize for SignedUser
impl Eq for SignedUser
impl StructuralPartialEq for SignedUser
Auto Trait Implementations§
impl Freeze for SignedUser
impl RefUnwindSafe for SignedUser
impl Send for SignedUser
impl Sync for SignedUser
impl Unpin for SignedUser
impl UnwindSafe for SignedUser
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