Struct generational_box::GenerationalBox
source · pub struct GenerationalBox<T> { /* private fields */ }
Expand description
The core Copy state type. The generational box will be dropped when the Owner is dropped.
Implementations§
source§impl<T: 'static> GenerationalBox<T>
impl<T: 'static> GenerationalBox<T>
sourcepub fn try_read(&self) -> Option<Ref<'static, T>>
pub fn try_read(&self) -> Option<Ref<'static, T>>
Try to read the value. Returns None if the value is no longer valid.
sourcepub fn try_write(&self) -> Option<RefMut<'static, T>>
pub fn try_write(&self) -> Option<RefMut<'static, T>>
Try to write the value. Returns None if the value is no longer valid.
Trait Implementations§
source§impl<T> Clone for GenerationalBox<T>
impl<T> Clone for GenerationalBox<T>
source§impl<T: 'static> Debug for GenerationalBox<T>
impl<T: 'static> Debug for GenerationalBox<T>
impl<T> Copy for GenerationalBox<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for GenerationalBox<T>
impl<T> !Send for GenerationalBox<T>
impl<T> !Sync for GenerationalBox<T>
impl<T> Unpin for GenerationalBox<T>where T: Unpin,
impl<T> !UnwindSafe for GenerationalBox<T>
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