pub struct ValueBox<T: Any> { /* private fields */ }Implementations§
Source§impl<T: Any> ValueBox<T>
impl<T: Any> ValueBox<T>
pub fn new(object: T) -> Self
pub fn has_value(&self) -> bool
pub fn replace_value(&mut self, object: T) -> T
pub fn set_value(&mut self, object: T)
pub fn clone_value(&self) -> Twhere
T: Clone,
pub fn into_value(self) -> T
pub fn into_raw(self) -> *mut Self
pub fn into_erased_raw(self) -> *mut ErasedValueBox
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for ValueBox<T>where
T: Freeze,
impl<T> RefUnwindSafe for ValueBox<T>where
T: RefUnwindSafe,
impl<T> Send for ValueBox<T>where
T: Send,
impl<T> Sync for ValueBox<T>where
T: Sync,
impl<T> Unpin for ValueBox<T>where
T: Unpin,
impl<T> UnsafeUnpin for ValueBox<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ValueBox<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