Struct intuicio_data::managed::ManagedLazy
source · 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
sourcepub unsafe fn new_raw(data: *mut T, lifetime: LifetimeLazy) -> Self
pub unsafe fn new_raw(data: *mut T, lifetime: LifetimeLazy) -> Self
pub fn into_inner(self) -> (LifetimeLazy, NonNull<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(&mut self) -> Option<ValueWriteAccess<'_, T>>
pub fn map<U>(self, f: impl FnOnce(&mut T) -> &mut U) -> ManagedLazy<U>
pub fn try_map<U>( self, f: impl FnOnce(&mut T) -> Option<&mut U> ) -> Result<ManagedLazy<U>, Self>
sourcepub unsafe fn as_mut_ptr(&mut self) -> Option<*mut T>
pub unsafe fn as_mut_ptr(&mut self) -> Option<*mut T>
Trait Implementations§
source§impl<T: Clone + ?Sized> Clone for ManagedLazy<T>
impl<T: Clone + ?Sized> Clone for ManagedLazy<T>
source§fn clone(&self) -> ManagedLazy<T>
fn clone(&self) -> ManagedLazy<T>
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<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>where T: Send + ?Sized,
impl<T> Sync for ManagedLazy<T>where T: Sync + ?Sized,
Auto Trait Implementations§
impl<T: ?Sized> RefUnwindSafe for ManagedLazy<T>where T: RefUnwindSafe,
impl<T: ?Sized> Unpin for ManagedLazy<T>
impl<T: ?Sized> UnwindSafe for ManagedLazy<T>where T: RefUnwindSafe,
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