pub struct DynamicManagedLazy { /* private fields */ }
Implementations§
source§impl DynamicManagedLazy
impl DynamicManagedLazy
pub fn new<T>(data: &mut T, lifetime: LifetimeLazy) -> DynamicManagedLazywhere
T: ?Sized,
sourcepub unsafe fn new_raw(
type_hash: TypeHash,
lifetime: LifetimeLazy,
data: *mut u8,
) -> Option<DynamicManagedLazy>
pub unsafe fn new_raw( type_hash: TypeHash, lifetime: LifetimeLazy, data: *mut u8, ) -> Option<DynamicManagedLazy>
§Safety
pub fn make<T>(data: &mut T) -> (DynamicManagedLazy, Lifetime)where
T: ?Sized,
pub fn into_inner(self) -> (TypeHash, LifetimeLazy, *mut u8)
pub fn into_typed<T>(self) -> Result<ManagedLazy<T>, DynamicManagedLazy>
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>>
sourcepub unsafe fn map<T, U>(
self,
f: impl FnOnce(&mut T) -> &mut U,
) -> Option<DynamicManagedLazy>
pub unsafe fn map<T, U>( self, f: impl FnOnce(&mut T) -> &mut U, ) -> Option<DynamicManagedLazy>
§Safety
sourcepub unsafe fn try_map<T, U>(
self,
f: impl FnOnce(&mut T) -> Option<&mut U>,
) -> Option<DynamicManagedLazy>
pub unsafe fn try_map<T, U>( self, f: impl FnOnce(&mut T) -> Option<&mut U>, ) -> Option<DynamicManagedLazy>
§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§fn clone(&self) -> DynamicManagedLazy
fn clone(&self) -> DynamicManagedLazy
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl From<DynamicManagedLazy> for DynamicManagedValue
impl From<DynamicManagedLazy> for DynamicManagedValue
source§fn from(value: DynamicManagedLazy) -> DynamicManagedValue
fn from(value: DynamicManagedLazy) -> DynamicManagedValue
Converts to this type from the input type.
source§impl TryFrom<DynamicManagedValue> for DynamicManagedLazy
impl TryFrom<DynamicManagedValue> for DynamicManagedLazy
source§fn try_from(
value: DynamicManagedValue,
) -> Result<DynamicManagedLazy, <DynamicManagedLazy as TryFrom<DynamicManagedValue>>::Error>
fn try_from( value: DynamicManagedValue, ) -> Result<DynamicManagedLazy, <DynamicManagedLazy as TryFrom<DynamicManagedValue>>::Error>
Performs the conversion.
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
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
)