pub struct ManagedLazy<T: ?Sized> { /* private fields */ }
Implementations§
source§impl<T: ?Sized> ManagedLazy<T>
impl<T: ?Sized> ManagedLazy<T>
pub fn new(data: &mut T, lifetime: LifetimeLazy) -> Self
pub fn make(data: &mut T) -> (Self, Lifetime)
pub fn into_inner(self) -> (LifetimeLazy, *mut T)
pub fn into_dynamic(self) -> DynamicManagedLazy
pub fn lifetime(&self) -> &LifetimeLazy
pub fn borrow(&self) -> Option<ManagedRef<T>>
pub fn borrow_mut(&self) -> Option<ManagedRefMut<T>>
pub fn read(&self) -> Option<ValueReadAccess<'_, T>>
pub fn write(&self) -> Option<ValueWriteAccess<'_, T>>
sourcepub unsafe fn try_map<U>(
self,
f: impl FnOnce(&mut T) -> Option<&mut U>,
) -> Option<ManagedLazy<U>>
pub unsafe fn try_map<U>( self, f: impl FnOnce(&mut T) -> Option<&mut U>, ) -> Option<ManagedLazy<U>>
§Safety
sourcepub unsafe fn as_mut_ptr(&self) -> Option<*mut T>
pub unsafe fn as_mut_ptr(&self) -> Option<*mut T>
§Safety
Trait Implementations§
source§impl<T: ?Sized> Clone for ManagedLazy<T>
impl<T: ?Sized> Clone for ManagedLazy<T>
source§impl<T> From<ManagedLazy<T>> for ManagedValue<T>
impl<T> From<ManagedLazy<T>> for ManagedValue<T>
source§fn from(value: ManagedLazy<T>) -> Self
fn from(value: ManagedLazy<T>) -> Self
Converts to this type from the input type.
source§impl<T> TryFrom<ManagedValue<T>> for ManagedLazy<T>
impl<T> TryFrom<ManagedValue<T>> for ManagedLazy<T>
impl<T> Send for ManagedLazy<T>
impl<T> Sync for ManagedLazy<T>
Auto Trait Implementations§
impl<T> Freeze for ManagedLazy<T>where
T: ?Sized,
impl<T> RefUnwindSafe for ManagedLazy<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Unpin for ManagedLazy<T>where
T: ?Sized,
impl<T> UnwindSafe for ManagedLazy<T>where
T: RefUnwindSafe + ?Sized,
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
)