pub enum SigKey {
Delegation {
path: Vec<DelegationStep>,
hint: KeyHint,
},
Direct(KeyHint),
}Expand description
Authentication key identifier for entry signing
Represents the path to resolve the signing key, either directly or through delegation. Uses explicit hint fields to point to the signer’s public key.
§JSON Format
Uses untagged serialization for compact JSON:
- Direct:
{"pubkey": "ed25519:..."} - Delegation:
{"path": [...], "pubkey": "ed25519:..."}
The path field distinguishes Delegation from Direct during deserialization.
§Variant Ordering
Delegation must be listed before Direct because serde tries variants in order.
Since Direct contains only optional fields, it would match any object if listed first.
Variants§
Delegation
Delegation path through other trees
Fields
path: Vec<DelegationStep>Path of delegation steps (tree references)
Direct(KeyHint)
Direct reference to a key in the current tree’s _settings.auth
Implementations§
Source§impl SigKey
impl SigKey
Sourcepub fn from_pubkey(pubkey: &PublicKey) -> Self
pub fn from_pubkey(pubkey: &PublicKey) -> Self
Create a direct key reference from a pubkey
Sourcepub fn global(actual_pubkey: &PublicKey) -> Self
pub fn global(actual_pubkey: &PublicKey) -> Self
Create a global permission key with actual signer pubkey
Sourcepub fn display_id(&self) -> String
pub fn display_id(&self) -> String
Human-readable identifier string for display and audit trails.
Returns "*" for global, the pubkey string for pubkey-based,
the name for name-based, or "unknown" if no hint is set.
Sourcepub fn has_pubkey_hint(&self, pubkey: &PublicKey) -> bool
pub fn has_pubkey_hint(&self, pubkey: &PublicKey) -> bool
Check if this SigKey uses a specific pubkey hint
Sourcepub fn has_name_hint(&self, name: &str) -> bool
pub fn has_name_hint(&self, name: &str) -> bool
Check if this SigKey uses a specific name hint
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SigKey
impl<'de> Deserialize<'de> for SigKey
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>,
impl Eq for SigKey
impl StructuralPartialEq for SigKey
Auto Trait Implementations§
impl Freeze for SigKey
impl RefUnwindSafe for SigKey
impl Send for SigKey
impl Sync for SigKey
impl Unpin for SigKey
impl UnwindSafe for SigKey
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
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
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
§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>
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>
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