pub struct SigningKeyHistory { /* private fields */ }Expand description
Append-only public-key history for one signing role.
The record contains public identities only. Custody persists the current private key under a separate secret reference and stores this record as the durable verification history.
Implementations§
Source§impl SigningKeyHistory
impl SigningKeyHistory
Sourcepub fn current<R: SigningRole>(signer: &RoleSigner<R>) -> Self
pub fn current<R: SigningRole>(signer: &RoleSigner<R>) -> Self
Starts a history at one role’s current signer.
Sourcepub const fn current_identity(&self) -> &SigningKeyIdentity
pub const fn current_identity(&self) -> &SigningKeyIdentity
Public identity recorded as current.
Sourcepub fn retired_identities(&self) -> &[SigningKeyIdentity]
pub fn retired_identities(&self) -> &[SigningKeyIdentity]
Append-only public identities recorded as retired.
Sourcepub fn reconcile<R: SigningRole>(
&mut self,
current: &SigningKeyIdentity,
) -> Result<(RoleTrustSet<R>, bool), SigningIdentityError>
pub fn reconcile<R: SigningRole>( &mut self, current: &SigningKeyIdentity, ) -> Result<(RoleTrustSet<R>, bool), SigningIdentityError>
Reconciles a stored history with the current signer identity.
A rotation appends the previous current identity to retired. Cycling
back to an earlier key never removes it from the stored retired set,
while the returned trust set lists each identity once with current
first.
§Errors
Refuses a malformed identity, an identity from another role, or a duplicate retired identity.
Trait Implementations§
Source§impl Clone for SigningKeyHistory
impl Clone for SigningKeyHistory
Source§fn clone(&self) -> SigningKeyHistory
fn clone(&self) -> SigningKeyHistory
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SigningKeyHistory
impl Debug for SigningKeyHistory
Source§impl<'de> Deserialize<'de> for SigningKeyHistory
impl<'de> Deserialize<'de> for SigningKeyHistory
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
Auto Trait Implementations§
impl Freeze for SigningKeyHistory
impl RefUnwindSafe for SigningKeyHistory
impl Send for SigningKeyHistory
impl Sync for SigningKeyHistory
impl Unpin for SigningKeyHistory
impl UnsafeUnpin for SigningKeyHistory
impl UnwindSafe for SigningKeyHistory
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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