pub struct DynamicManagedGc { /* private fields */ }Implementations§
Source§impl DynamicManagedGc
impl DynamicManagedGc
pub fn new<T: Finalize>(data: T) -> Self
pub fn new_raw( type_hash: TypeHash, lifetime: Lifetime, memory: *mut u8, layout: Layout, finalizer: unsafe fn(*mut ()), ) -> Self
pub fn new_uninitialized( type_hash: TypeHash, layout: Layout, finalizer: unsafe fn(*mut ()), ) -> Self
pub fn consume<T>(self) -> Result<T, Self>
pub fn into_typed<T>(self) -> ManagedGc<T>
pub fn renew(&mut self)
pub fn type_hash(&self) -> TypeHash
pub fn lifetime(&self) -> ManagedGcLifetime<'_>
pub fn exists(&self) -> bool
pub fn is_owning(&self) -> bool
pub fn is_referencing(&self) -> bool
pub fn is_owned_by(&self, other: &Self) -> bool
pub fn is<T>(&self) -> bool
pub fn try_read<T>(&self) -> Option<ValueReadAccess<'_, T>>
pub fn try_write<T>(&mut self) -> Option<ValueWriteAccess<'_, T>>
pub fn read<const LOCKING: bool, T>(&self) -> ValueReadAccess<'_, T>
pub fn write<const LOCKING: bool, T>(&mut self) -> ValueWriteAccess<'_, T>
pub fn borrow<const LOCKING: bool>(&self) -> DynamicManagedRef
pub fn borrow_mut<const LOCKING: bool>(&mut self) -> DynamicManagedRefMut
pub fn lazy(&self) -> DynamicManagedLazy
Sourcepub unsafe fn as_ptr_raw(&self) -> *const u8
pub unsafe fn as_ptr_raw(&self) -> *const u8
§Safety
Sourcepub unsafe fn as_mut_ptr_raw(&mut self) -> *mut u8
pub unsafe fn as_mut_ptr_raw(&mut self) -> *mut u8
§Safety
Trait Implementations§
Source§impl Clone for DynamicManagedGc
impl Clone for DynamicManagedGc
Source§impl Drop for DynamicManagedGc
impl Drop for DynamicManagedGc
impl Send for DynamicManagedGc
impl Sync for DynamicManagedGc
Auto Trait Implementations§
impl Freeze for DynamicManagedGc
impl RefUnwindSafe for DynamicManagedGc
impl Unpin for DynamicManagedGc
impl UnwindSafe for DynamicManagedGc
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