Skip to main content

StoreRef

Struct StoreRef 

Source
pub struct StoreRef<S, K, T, Extra> { /* private fields */ }

Implementations§

Source§

impl<S: RainbowStoreMut, K: Send + Sync + AsRef<str>, T: Object<Extra>, Extra: 'static + Send + Sync + Clone> StoreRef<S, K, T, Extra>

Source

pub fn is_modified(&self) -> bool

Source

pub fn is_new(&self) -> bool

Source

pub async fn save_point(&mut self) -> Result<()>

Source

pub async fn save(&mut self) -> Result<()>

Methods from Deref<Target = Point<T>>§

Source

pub fn with_resolve<Extra>( &self, resolve: Arc<dyn Resolve>, extra: Extra, ) -> Point<T>
where Extra: 'static + Send + Sync + Clone + ExtraFor<T>,

Source

pub fn get(&self) -> Option<&T>

Source

pub fn try_fetch_local(&self) -> Result<Option<(T, Arc<dyn Resolve>)>, Error>

Source

pub async fn fetch_mut(&mut self) -> Result<PointMut<'_, T>, Error>

Source

pub async fn fetch_ref(&mut self) -> Result<&T, Error>

Source

pub fn is_default(&self) -> bool

Trait Implementations§

Source§

impl<S, K, T, Extra> Deref for StoreRef<S, K, T, Extra>

Source§

type Target = Point<T>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<S, K, T, Extra> DerefMut for StoreRef<S, K, T, Extra>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.

Auto Trait Implementations§

§

impl<S, K, T, Extra> Freeze for StoreRef<S, K, T, Extra>
where S: Freeze, K: Freeze, Extra: Freeze,

§

impl<S, K, T, Extra> !RefUnwindSafe for StoreRef<S, K, T, Extra>

§

impl<S, K, T, Extra> Send for StoreRef<S, K, T, Extra>
where S: Send, K: Send, Extra: Send,

§

impl<S, K, T, Extra> Sync for StoreRef<S, K, T, Extra>
where S: Sync, K: Sync, Extra: Sync,

§

impl<S, K, T, Extra> Unpin for StoreRef<S, K, T, Extra>
where S: Unpin, K: Unpin, Extra: Unpin,

§

impl<S, K, T, Extra> UnsafeUnpin for StoreRef<S, K, T, Extra>
where S: UnsafeUnpin, K: UnsafeUnpin, Extra: UnsafeUnpin,

§

impl<S, K, T, Extra> !UnwindSafe for StoreRef<S, K, T, Extra>

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> 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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.