pub struct SyncStorage;Expand description
A form of Storage that stores the type as itself, with no wrapper.
Trait Implementations§
Source§impl Clone for SyncStorage
impl Clone for SyncStorage
Source§fn clone(&self) -> SyncStorage
fn clone(&self) -> SyncStorage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SyncStorage
impl Debug for SyncStorage
Source§impl<T> Storage<T> for SyncStorage
impl<T> Storage<T> for SyncStorage
Source§fn wrap(value: T) -> <SyncStorage as Storage<T>>::Wrapped
fn wrap(value: T) -> <SyncStorage as Storage<T>>::Wrapped
Adds any needed wrapper to the type.
Source§fn try_with<U>(node: NodeId, fun: impl FnOnce(&T) -> U) -> Option<U>
fn try_with<U>(node: NodeId, fun: impl FnOnce(&T) -> U) -> Option<U>
Applies the given function to the stored value, if it exists and can be accessed from this
thread.
Source§fn try_with_mut<U>(node: NodeId, fun: impl FnOnce(&mut T) -> U) -> Option<U>
fn try_with_mut<U>(node: NodeId, fun: impl FnOnce(&mut T) -> U) -> Option<U>
Applies the given function to a mutable reference to the stored value, if it exists and can be accessed from this
thread.
impl Copy for SyncStorage
Auto Trait Implementations§
impl Freeze for SyncStorage
impl RefUnwindSafe for SyncStorage
impl Send for SyncStorage
impl Sync for SyncStorage
impl Unpin for SyncStorage
impl UnwindSafe for SyncStorage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.