pub struct SigInfo {
pub sig: Option<String>,
pub key: SigKey,
}Expand description
Signature information embedded in an entry
Fields§
§sig: Option<String>Authentication signature - base64-encoded signature bytes Optional to allow for entry creation before signing
key: SigKeyKey lookup hint
Implementations§
Source§impl SigInfo
impl SigInfo
Sourcepub fn from_pubkey(pubkey: &PublicKey) -> Self
pub fn from_pubkey(pubkey: &PublicKey) -> Self
Create a new SigInfo with a pubkey hint
Sourcepub fn builder() -> SigInfoBuilder
pub fn builder() -> SigInfoBuilder
Create a new SigInfoBuilder for constructing SigInfo instances
Sourcepub fn is_unsigned(&self) -> bool
pub fn is_unsigned(&self) -> bool
Check if this represents an unsigned/unauthenticated entry.
An entry is unsigned when SigInfo is in its default state:
- Direct SigKey (not Delegation)
- Empty KeyHint (no pubkey, no name)
- No signature
Sourcepub fn malformed_reason(&self) -> Option<&'static str>
pub fn malformed_reason(&self) -> Option<&'static str>
Check if this represents a malformed/inconsistent signature state.
Returns Some(reason) if malformed, None if valid.
Malformed states:
- Direct with hint but no signature (can’t verify without signature)
- Direct with signature but no hint (can’t verify without knowing which key)
- Delegation with no signature (delegation always requires signature)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SigInfo
impl<'de> Deserialize<'de> for SigInfo
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
impl Eq for SigInfo
impl StructuralPartialEq for SigInfo
Auto Trait Implementations§
impl Freeze for SigInfo
impl RefUnwindSafe for SigInfo
impl Send for SigInfo
impl Sync for SigInfo
impl Unpin for SigInfo
impl UnwindSafe for SigInfo
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more