pub struct SelfRatchets<C>where
C: SelfRatchetTable,{ /* private fields */ }Implementations§
Source§impl<C> SelfRatchets<C>where
C: SelfRatchetTable,
impl<C> SelfRatchets<C>where
C: SelfRatchetTable,
pub fn track( &mut self, destination: DestinationHash, ) -> Result<(), TrackRatchetsError>
pub fn is_tracked(&self, destination: &DestinationHash) -> bool
pub fn has_room(&self) -> bool
Sourcepub fn rotate_if_due(
&mut self,
destination: &DestinationHash,
now: InstantMillis,
fill_entropy: &mut impl FnMut(&mut [u8]),
) -> RatchetRotation
pub fn rotate_if_due( &mut self, destination: &DestinationHash, now: InstantMillis, fill_entropy: &mut impl FnMut(&mut [u8]), ) -> RatchetRotation
RNS 1.4.2 Destination.rotate_ratchets; a never-rotated row is always due.
Entropy is drawn only once a rotation is actually due.
pub fn persisted_rows( &self, ) -> impl Iterator<Item = (DestinationHash, LastRotated, &[X25519SecretKey])>
pub fn persisted_row( &self, destination: &DestinationHash, ) -> Option<(LastRotated, &[X25519SecretKey])>
pub fn last_rotated_of( &self, destination: &DestinationHash, ) -> Option<LastRotated>
Sourcepub fn seed(
&mut self,
destination: &DestinationHash,
last_rotated: LastRotated,
secrets_newest_first: impl DoubleEndedIterator<Item = X25519SecretKey>,
) -> SeedSelfRatchetsOutcome
pub fn seed( &mut self, destination: &DestinationHash, last_rotated: LastRotated, secrets_newest_first: impl DoubleEndedIterator<Item = X25519SecretKey>, ) -> SeedSelfRatchetsOutcome
Boot-restore: lands only into a tracked, never-minted row — live secrets win over storage, and an untracked destination refuses because registration is config-derived: the vault only re-supplies what this boot re-registered. Secrets insert oldest-first, so retention keeps the newest when the stored record outsizes this table’s per-destination depth.
pub fn replace_persisted( &mut self, destination: &DestinationHash, last_rotated: LastRotated, secrets_newest_first: impl DoubleEndedIterator<Item = X25519SecretKey>, ) -> SeedSelfRatchetsOutcome
pub fn newest_ratchet_key( &self, destination: &DestinationHash, ) -> Option<RatchetKey>
pub fn secrets_newest_first( &self, destination: &DestinationHash, ) -> &[X25519SecretKey]
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl<C> Debug for SelfRatchets<C>where
C: SelfRatchetTable,
impl<C> Debug for SelfRatchets<C>where
C: SelfRatchetTable,
Source§impl<C> Default for SelfRatchets<C>where
C: Default + SelfRatchetTable,
impl<C> Default for SelfRatchets<C>where
C: Default + SelfRatchetTable,
Source§fn default() -> SelfRatchets<C>
fn default() -> SelfRatchets<C>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<C> Freeze for SelfRatchets<C>where
C: Freeze,
impl<C> RefUnwindSafe for SelfRatchets<C>where
C: RefUnwindSafe,
impl<C> Send for SelfRatchets<C>where
C: Send,
impl<C> Sync for SelfRatchets<C>where
C: Sync,
impl<C> Unpin for SelfRatchets<C>where
C: Unpin,
impl<C> UnsafeUnpin for SelfRatchets<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for SelfRatchets<C>where
C: UnwindSafe,
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