pub struct ManagedBox<T> { /* private fields */ }
Implementations§
source§impl<T> ManagedBox<T>
impl<T> ManagedBox<T>
pub fn new(value: T) -> Selfwhere
T: Finalize,
pub fn into_dynamic(self) -> DynamicManagedBox
pub fn instances_count(&self) -> usize
pub fn type_hash(&self) -> TypeHash
pub fn read(&self) -> Option<ValueReadAccess<'_, T>>
pub fn write(&mut self) -> Option<ValueWriteAccess<'_, T>>
pub fn borrow(&self) -> Option<ManagedRef<T>>
pub fn borrow_mut(&mut self) -> Option<ManagedRefMut<T>>
pub fn lazy(&self) -> Option<ManagedLazy<T>>
sourcepub unsafe fn as_ptr_mut(&mut self) -> Option<*mut T>
pub unsafe fn as_ptr_mut(&mut self) -> Option<*mut T>
§Safety
Trait Implementations§
source§impl<T> Clone for ManagedBox<T>
impl<T> Clone for ManagedBox<T>
source§impl<T: Default> Default for ManagedBox<T>
impl<T: Default> Default for ManagedBox<T>
Auto Trait Implementations§
impl<T> Freeze for ManagedBox<T>
impl<T> RefUnwindSafe for ManagedBox<T>where
T: RefUnwindSafe,
impl<T> !Send for ManagedBox<T>
impl<T> !Sync for ManagedBox<T>
impl<T> Unpin for ManagedBox<T>
impl<T> UnwindSafe for ManagedBox<T>where
T: RefUnwindSafe,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)