pub struct UserId { /* private fields */ }
Expand description
User ID Packet https://tools.ietf.org/html/rfc4880.html#section-5.11
Implementations§
source§impl UserId
impl UserId
sourcepub fn from_slice(
packet_version: Version,
input: &[u8]
) -> Result<UserId, Error>
pub fn from_slice( packet_version: Version, input: &[u8] ) -> Result<UserId, Error>
Parses a UserId
packet from the given slice.
pub fn from_str(packet_version: Version, input: &str) -> UserId
pub fn id(&self) -> &BStr
pub fn sign<F>( &self, key: &impl SecretKeyTrait, key_pw: F ) -> Result<SignedUser, Error>where F: FnOnce() -> String,
pub fn into_signed(self, sig: Signature) -> SignedUser
Trait Implementations§
source§impl PacketTrait for UserId
impl PacketTrait for UserId
source§impl PartialEq<UserId> for UserId
impl PartialEq<UserId> for UserId
impl Eq for UserId
impl StructuralEq for UserId
impl StructuralPartialEq for UserId
Auto Trait Implementations§
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.