Skip to main content

StoreMut

Struct StoreMut 

Source
pub struct StoreMut<S, Extra = ()> { /* private fields */ }

Implementations§

Source§

impl<S> StoreMut<S>

Source

pub const fn new(store: S) -> Self

Source§

impl<S, Extra> StoreMut<S, Extra>

Source

pub const fn new_extra(store: S, extra: Extra) -> Self

Source§

impl<S: RainbowStoreMut, Extra: 'static + Send + Sync + Clone> StoreMut<S, Extra>

Source

pub async fn exists<K: Send + Sync + AsRef<str>>(&self, key: K) -> Result<bool>

Source

pub async fn create<T: Object<Extra>>( &self, point: Point<T>, ) -> Result<StoreRef<S, impl 'static + Send + Sync + AsRef<str>, T, Extra>>

Source

pub async fn update<T: Object<Extra>, K: Send + Sync + AsRef<str>>( &self, key: K, point: Point<T>, ) -> Result<StoreRef<S, K, T, Extra>>

Source

pub async fn init<T: Object<Extra>, K: Send + Sync + AsRef<str>>( &self, key: K, point: Point<T>, ) -> Result<StoreRef<S, K, T, Extra>>

Source

pub async fn load<T: Object<Extra>, K: Send + Sync + AsRef<str>>( &self, key: K, ) -> Result<StoreRef<S, K, T, Extra>>

Source

pub async fn load_or_init<T: Object<Extra> + Default + Clone, K: Send + Sync + AsRef<str>>( &self, key: K, ) -> Result<StoreRef<S, K, T, Extra>>

Source

pub async fn reference<T: Object<Extra>, K: Send + Sync + AsRef<str>>( &self, key: K, point: Point<T>, ) -> Result<StoreRef<S, K, T, Extra>>

Trait Implementations§

Source§

impl<S: Clone, Extra: Clone> Clone for StoreMut<S, Extra>

Source§

fn clone(&self) -> StoreMut<S, Extra>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl<S, Extra> Freeze for StoreMut<S, Extra>
where S: Freeze, Extra: Freeze,

§

impl<S, Extra> RefUnwindSafe for StoreMut<S, Extra>
where S: RefUnwindSafe, Extra: RefUnwindSafe,

§

impl<S, Extra> Send for StoreMut<S, Extra>
where S: Send, Extra: Send,

§

impl<S, Extra> Sync for StoreMut<S, Extra>
where S: Sync, Extra: Sync,

§

impl<S, Extra> Unpin for StoreMut<S, Extra>
where S: Unpin, Extra: Unpin,

§

impl<S, Extra> UnsafeUnpin for StoreMut<S, Extra>
where S: UnsafeUnpin, Extra: UnsafeUnpin,

§

impl<S, Extra> UnwindSafe for StoreMut<S, Extra>
where S: UnwindSafe, Extra: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsAny for T

Source§

fn any_ref(&self) -> &(dyn Any + 'static)
where T: 'static,

Get a shared RTTI reference.
Source§

fn any_mut(&mut self) -> &mut (dyn Any + 'static)
where T: 'static,

Get an exclusive RTTI reference.
Source§

fn any_box(self: Box<T>) -> Box<dyn Any>
where T: 'static,

Get an RTTI Box.
Source§

fn any_arc(self: Arc<T>) -> Arc<dyn Any>
where T: 'static,

Get an RTTI Arc.
Source§

fn any_arc_sync(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
where T: 'static + Send + Sync,

Get an RTTI Arc which is also Send.
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T, Extra> ExtraFor<T> for Extra
where T: for<'a> Parse<Input<'a, Extra>>, Extra: Clone,

Source§

fn parse(&self, data: &[u8], resolve: &Arc<dyn Resolve>) -> Result<T, Error>

Source§

fn parse_checked( &self, hash: Hash, data: &[u8], resolve: &Arc<dyn Resolve>, ) -> Result<T, Error>
where T: FullHash,

Self::parse, then check that FullHash::full_hash matches.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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 for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.