pub struct UserId { /* private fields */ }
Expand description
Implementations§
Source§impl UserId
impl UserId
Sourcepub fn from_slice(packet_version: Version, input: &[u8]) -> Result<Self>
pub fn from_slice(packet_version: Version, input: &[u8]) -> Result<Self>
Parses a UserId
packet from the given slice.
pub fn from_str(packet_version: Version, input: &str) -> Self
pub fn id(&self) -> &BStr
Sourcepub fn sign<R, F>(
&self,
rng: R,
key: &impl SecretKeyTrait,
key_pw: F,
) -> Result<SignedUser>
pub fn sign<R, F>( &self, rng: R, key: &impl SecretKeyTrait, key_pw: F, ) -> Result<SignedUser>
Create a self-signature
Sourcepub fn sign_third_party<R, F>(
&self,
rng: R,
signer: &impl SecretKeyTrait,
signer_pw: F,
signee: &impl PublicKeyTrait,
) -> Result<SignedUser>
pub fn sign_third_party<R, F>( &self, rng: R, signer: &impl SecretKeyTrait, signer_pw: F, signee: &impl PublicKeyTrait, ) -> Result<SignedUser>
Create a third-party signature
pub fn into_signed(self, sig: Signature) -> SignedUser
Trait Implementations§
Source§impl PacketTrait for UserId
impl PacketTrait for UserId
impl Eq for UserId
impl StructuralPartialEq for UserId
Auto Trait Implementations§
impl Freeze for UserId
impl RefUnwindSafe for UserId
impl Send for UserId
impl Sync for UserId
impl Unpin for UserId
impl UnwindSafe for UserId
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