pub struct Uid<'key> { /* private fields */ }Expand description
Borrowed handle to a user ID on a Key.
Borrows the key for at most its lifetime. Destroyed on drop via
rnp_uid_handle_destroy.
Implementations§
Source§impl<'key> Uid<'key>
impl<'key> Uid<'key>
Sourcepub fn data(&self) -> Result<Vec<u8>>
pub fn data(&self) -> Result<Vec<u8>>
The raw UID bytes. For textual UIDs this is the UTF-8 string; for attributes it’s the attribute data.
Sourcepub fn data_string(&self) -> Result<String>
pub fn data_string(&self) -> Result<String>
The UID as a UTF-8 string. Lossy for non-UTF-8 bytes.
Sourcepub fn is_primary(&self) -> Result<bool>
pub fn is_primary(&self) -> Result<bool>
True if this UID is marked as the primary UID on the key.
Sourcepub fn is_valid(&self) -> Result<bool>
pub fn is_valid(&self) -> Result<bool>
True if the UID is currently valid (not revoked, on a valid key, etc.).
Sourcepub fn is_revoked(&self) -> Result<bool>
pub fn is_revoked(&self) -> Result<bool>
True if the UID has been revoked.
Sourcepub fn signature_count(&self) -> Result<usize>
pub fn signature_count(&self) -> Result<usize>
Number of signatures on this UID (self-signatures and third-party certifications).
Sourcepub fn signature_at(&self, idx: usize) -> Result<Option<Signature<'_>>>
pub fn signature_at(&self, idx: usize) -> Result<Option<Signature<'_>>>
Borrow the signature at idx on this UID. Returned Signature
borrows self.
Sourcepub fn signatures(&self) -> Result<Vec<Signature<'_>>>
pub fn signatures(&self) -> Result<Vec<Signature<'_>>>
All signatures on this UID.
Sourcepub fn revocation_signature(&self) -> Result<Option<Signature<'_>>>
pub fn revocation_signature(&self) -> Result<Option<Signature<'_>>>
The UID’s revocation signature, if the UID has been revoked.
Trait Implementations§
Auto Trait Implementations§
impl<'key> !RefUnwindSafe for Uid<'key>
impl<'key> !Send for Uid<'key>
impl<'key> !Sync for Uid<'key>
impl<'key> !UnwindSafe for Uid<'key>
impl<'key> Freeze for Uid<'key>
impl<'key> Unpin for Uid<'key>
impl<'key> UnsafeUnpin for Uid<'key>
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