Skip to main content

EntryStore

Trait EntryStore 

Source
pub trait EntryStore {
    // Required methods
    fn current(&self) -> Credential;
    fn commit(
        &mut self,
        new: &Credential,
        generation: u64,
    ) -> Result<(), String>;
    fn restore(&mut self, old: &Credential) -> Result<(), String>;
}
Expand description

The vault entry being rotated.

Required Methods§

Source

fn current(&self) -> Credential

Source

fn commit(&mut self, new: &Credential, generation: u64) -> Result<(), String>

Writes the new value as the next generation, with the old one kept in history.

Source

fn restore(&mut self, old: &Credential) -> Result<(), String>

Puts the old value back as the current one (a rollback).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§