pub struct DynamicManagedBox { /* private fields */ }
Implementations§
source§impl DynamicManagedBox
impl DynamicManagedBox
pub fn new<T: Finalize>(value: T) -> Self
pub fn new_uninitialized( type_hash: TypeHash, layout: Layout, finalizer: unsafe fn(_: *mut ()), ) -> Self
pub fn into_typed<T>(self) -> Result<ManagedBox<T>, Self>
pub fn instances_count(&self) -> usize
pub fn type_hash(&self) -> Option<TypeHash>
pub fn is<T>(&self) -> bool
pub fn borrow(&self) -> Option<DynamicManagedRef>
pub fn borrow_mut(&mut self) -> Option<DynamicManagedRefMut>
pub fn lazy(&self) -> Option<DynamicManagedLazy>
pub fn read<T>(&self) -> Option<ValueReadAccess<'_, T>>
pub fn write<T>(&mut self) -> Option<ValueWriteAccess<'_, T>>
sourcepub unsafe fn memory_mut(&mut self) -> Option<&mut [u8]>
pub unsafe fn memory_mut(&mut self) -> Option<&mut [u8]>
§Safety
sourcepub unsafe fn as_ptr_mut<T>(&mut self) -> Option<*mut T>
pub unsafe fn as_ptr_mut<T>(&mut self) -> Option<*mut T>
§Safety
Trait Implementations§
source§impl Clone for DynamicManagedBox
impl Clone for DynamicManagedBox
Auto Trait Implementations§
impl Freeze for DynamicManagedBox
impl RefUnwindSafe for DynamicManagedBox
impl !Send for DynamicManagedBox
impl !Sync for DynamicManagedBox
impl Unpin for DynamicManagedBox
impl UnwindSafe for DynamicManagedBox
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
)