Struct aries_askar::Store

source ·
pub struct Store<B: Backend>(_);
Expand description

An instance of an opened store

Implementations§

source§

impl<B: Backend> Store<B>

source

pub fn get_profile_name(&self) -> &str

Get the default profile name used when starting a scan or a session

source

pub async fn rekey( &mut self, method: StoreKeyMethod, pass_key: PassKey<'_> ) -> Result<(), Error>

Replace the wrapping key on a store

source

pub async fn create_profile( &self, name: Option<String> ) -> Result<String, Error>

Create a new profile with the given profile name

source

pub async fn remove_profile(&self, name: String) -> Result<bool, Error>

Remove an existing profile with the given profile name

source

pub async fn scan( &self, profile: Option<String>, category: String, tag_filter: Option<TagFilter>, offset: Option<i64>, limit: Option<i64> ) -> Result<Scan<'static, Entry>, Error>

Create a new scan instance against the store

The result will keep an open connection to the backend until it is consumed

source

pub async fn session( &self, profile: Option<String> ) -> Result<Session<B::Session>, Error>

Create a new session against the store

source

pub async fn transaction( &self, profile: Option<String> ) -> Result<Session<B::Session>, Error>

Create a new transaction session against the store

source

pub async fn close(self) -> Result<(), Error>

Close the store instance, waiting for any shutdown procedures to complete.

Trait Implementations§

source§

impl<B: Debug + Backend> Debug for Store<B>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<B> RefUnwindSafe for Store<B>where B: RefUnwindSafe,

§

impl<B> Send for Store<B>

§

impl<B> Sync for Store<B>

§

impl<B> Unpin for Store<B>where B: Unpin,

§

impl<B> UnwindSafe for Store<B>where B: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

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

§

fn vzip(self) -> V