Trait key_store::traits::KeyStore [−][src]
The Key Store trait
Associated Types
type KeyStoreId[src]
The type of the identifier used by the key store to identify values in the key store.
type Error: Debug + Clone + PartialEq + Into<String>[src]
The error type returned by the KeyStore.
Required methods
fn store_with_status(
&self,
k: &Self::KeyStoreId,
v: &impl KeyStoreValue,
s: Status
) -> Result<(), Self::Error> where
Self: Sized, [src]
&self,
k: &Self::KeyStoreId,
v: &impl KeyStoreValue,
s: Status
) -> Result<(), Self::Error> where
Self: Sized,
Store a value v that implements the KeyStoreValue trait for
serialization with Status s under ID k.
Returns an error if storing fails.
fn store(
&self,
k: &Self::KeyStoreId,
v: &impl KeyStoreValue
) -> Result<(), Self::Error> where
Self: Sized, [src]
&self,
k: &Self::KeyStoreId,
v: &impl KeyStoreValue
) -> Result<(), Self::Error> where
Self: Sized,
Store a value v that implements the KeyStoreValue trait for
serialization for ID k.
The status will always be Status::Extractable.
To set the status of the value v use
store_with_status.
Returns an error if storing fails.
fn read<V: KeyStoreValue>(&self, k: &Self::KeyStoreId) -> Result<V, Self::Error> where
Self: Sized, [src]
Self: Sized,
Read and return a value stored for ID k that implements the
KeyStoreValue trait for deserialization.
If the value is marked as Status::Hidden, an error will be returned.
Returns an error if storing fails.
fn update(
&self,
k: &Self::KeyStoreId,
v: &impl KeyStoreValue
) -> Result<(), Self::Error> where
Self: Sized, [src]
&self,
k: &Self::KeyStoreId,
v: &impl KeyStoreValue
) -> Result<(), Self::Error> where
Self: Sized,
Update a value stored for ID k with a new value v that implements the
KeyStoreValue trait for serialization.
Returns an error if storing fails.
fn delete(&self, k: &Self::KeyStoreId) -> Result<(), Self::Error> where
Self: Sized, [src]
Self: Sized,
Delete a value stored for ID k.
Returns an error if storing fails.