pub struct DynamicManagedLazy { /* private fields */ }
Implementations§
Source§impl DynamicManagedLazy
impl DynamicManagedLazy
pub fn new<T: ?Sized>(data: &mut T, lifetime: LifetimeLazy) -> Self
Sourcepub unsafe fn new_raw(
type_hash: TypeHash,
lifetime: LifetimeLazy,
data: *mut u8,
) -> Option<Self>
pub unsafe fn new_raw( type_hash: TypeHash, lifetime: LifetimeLazy, data: *mut u8, ) -> Option<Self>
§Safety
pub fn make<T: ?Sized>(data: &mut T) -> (Self, Lifetime)
pub fn into_inner(self) -> (TypeHash, LifetimeLazy, *mut u8)
pub fn into_typed<T>(self) -> Result<ManagedLazy<T>, Self>
pub fn type_hash(&self) -> &TypeHash
pub fn lifetime(&self) -> &LifetimeLazy
pub fn is<T>(&self) -> bool
pub fn read<T>(&self) -> Option<ValueReadAccess<'_, T>>
pub fn write<T>(&self) -> Option<ValueWriteAccess<'_, T>>
pub fn borrow(&self) -> Option<DynamicManagedRef>
pub fn borrow_mut(&mut self) -> Option<DynamicManagedRefMut>
Sourcepub unsafe fn try_map<T, U>(
self,
f: impl FnOnce(&mut T) -> Option<&mut U>,
) -> Option<Self>
pub unsafe fn try_map<T, U>( self, f: impl FnOnce(&mut T) -> Option<&mut U>, ) -> Option<Self>
§Safety
Sourcepub unsafe fn as_mut_ptr<T>(&self) -> Option<*mut T>
pub unsafe fn as_mut_ptr<T>(&self) -> Option<*mut T>
§Safety
Trait Implementations§
Source§impl Clone for DynamicManagedLazy
impl Clone for DynamicManagedLazy
Source§impl From<DynamicManagedLazy> for DynamicManagedValue
impl From<DynamicManagedLazy> for DynamicManagedValue
Source§fn from(value: DynamicManagedLazy) -> Self
fn from(value: DynamicManagedLazy) -> Self
Converts to this type from the input type.
impl Send for DynamicManagedLazy
impl Sync for DynamicManagedLazy
Auto Trait Implementations§
impl Freeze for DynamicManagedLazy
impl RefUnwindSafe for DynamicManagedLazy
impl Unpin for DynamicManagedLazy
impl UnwindSafe for DynamicManagedLazy
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