Struct jarida::Store[][src]

pub struct Store { /* fields omitted */ }

A store of journal entries

Implementations

impl Store[src]

pub fn open<P: AsRef<Path>>(path: P) -> Result<Store>[src]

Open the journal stored at the specified path.

pub fn get_salt(&self) -> Result<Vec<u8>>[src]

Get the database’s unique salt (for use in encryption).

pub fn get_key(&mut self) -> Result<Option<Vec<u8>>>[src]

Get the database’s encryption key. This key is used to encrypt/decrypt all data in the database. However, it is encrypted using the user’s name and password.

pub fn update_key(&mut self, encrypted_key: &[u8]) -> Result<()>[src]

Update the database’s encryption key. It must already be encrypted with the user’s name and password. Note that the key itself should never change as then there will be no way to decrypt existing entries in the database. It can be reencrypted with a new username and password, however.

pub fn guard<'a>(
    &'a mut self,
    guard: &'a mut DataGuard,
    username: &'a str
) -> GuardedStore<'a>
[src]

Use the specified guard to encrypt/decrypt the database.

Trait Implementations

impl Debug for Store[src]

Auto Trait Implementations

impl RefUnwindSafe for Store

impl Send for Store

impl Sync for Store

impl Unpin for Store

impl UnwindSafe for Store

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,