[][src]Struct krill::commons::eventsourcing::DiskKeyStore

pub struct DiskKeyStore { /* fields omitted */ }

This type can store and retrieve values to/from disk, using json serialization.

Implementations

impl DiskKeyStore[src]

pub fn new(work_dir: &PathBuf, name_space: &str) -> Self[src]

pub fn under_work_dir(
    work_dir: &PathBuf,
    name_space: &str
) -> Result<Self, Error>
[src]

Creates a directory for the name_space under the work_dir.

pub fn update_aggregate<A: Aggregate>(
    &self,
    id: &Handle,
    aggregate: &mut A
) -> Result<(), KeyStoreError>
[src]

Trait Implementations

impl KeyStore for DiskKeyStore[src]

type Key = PathBuf

fn get_event<V: Event>(
    &self,
    id: &Handle,
    version: u64
) -> Result<Option<V>, KeyStoreError>
[src]

Get the value for this key, if any exists.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.