pub struct KeyEventLog { /* private fields */ }Expand description
A local Key Event Log for tracking key lifecycle.
Implementations§
Source§impl KeyEventLog
impl KeyEventLog
pub fn new() -> Self
pub fn with_path(path: &Path) -> Result<Self>
pub fn events(&self) -> &[KeyEvent]
pub fn current_keys(&self) -> Option<&[String]>
pub fn latest_event(&self) -> Option<&KeyEvent>
Sourcepub fn inception(
&mut self,
signing_key: &SigningKey,
next_key_digest: Option<&str>,
) -> Result<&KeyEvent>
pub fn inception( &mut self, signing_key: &SigningKey, next_key_digest: Option<&str>, ) -> Result<&KeyEvent>
Create an inception event establishing the identifier with an initial key.
Sourcepub fn rotation(
&mut self,
current_key: &SigningKey,
new_key: &SigningKey,
next_key_digest: Option<&str>,
) -> Result<&KeyEvent>
pub fn rotation( &mut self, current_key: &SigningKey, new_key: &SigningKey, next_key_digest: Option<&str>, ) -> Result<&KeyEvent>
Create a rotation event replacing the current key with a new key.
Trait Implementations§
Source§impl Default for KeyEventLog
impl Default for KeyEventLog
Source§fn default() -> KeyEventLog
fn default() -> KeyEventLog
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for KeyEventLog
impl RefUnwindSafe for KeyEventLog
impl Send for KeyEventLog
impl Sync for KeyEventLog
impl Unpin for KeyEventLog
impl UnsafeUnpin for KeyEventLog
impl UnwindSafe for KeyEventLog
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.