pub enum DynValue<T: Clone + Send + Sync + 'static> {
Static(T),
Signal {
id: u64,
default: T,
},
}Expand description
Dynamic value that can be static, signal, or spring
This is more efficient than BoxedValue for common cases because it avoids
the indirection of Arc<dyn Value<T>>.
Variants§
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for DynValue<T>where
T: Freeze,
impl<T> RefUnwindSafe for DynValue<T>where
T: RefUnwindSafe,
impl<T> Send for DynValue<T>
impl<T> Sync for DynValue<T>
impl<T> Unpin for DynValue<T>where
T: Unpin,
impl<T> UnsafeUnpin for DynValue<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for DynValue<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