pub struct Value<T> { /* private fields */ }
Expand description
Dynamic value.
Cache values are dynamic, but need to be able to be cast into a concrete type. The Value
type helps here. By default, it contains a dyn Any
, so is able to store any type of data. It
is able to be cast into a concrete type. It also contains as state the validity of the type.
Implementations§
Trait Implementations§
impl<T: Eq> Eq for Value<T>
impl<T> StructuralPartialEq for Value<T>
Auto Trait Implementations§
impl<T> Freeze for Value<T>where
T: Freeze,
impl<T> RefUnwindSafe for Value<T>where
T: RefUnwindSafe,
impl<T> Send for Value<T>where
T: Send,
impl<T> Sync for Value<T>where
T: Sync,
impl<T> Unpin for Value<T>where
T: Unpin,
impl<T> UnwindSafe for Value<T>where
T: UnwindSafe,
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