pub struct ManagedLazy<T>where
T: ?Sized,{ /* private fields */ }
Implementations§
source§impl<T> ManagedLazy<T>where
T: ?Sized,
impl<T> ManagedLazy<T>where
T: ?Sized,
pub fn new(data: &mut T, lifetime: LifetimeLazy) -> ManagedLazy<T>
sourcepub unsafe fn new_raw(
data: *mut T,
lifetime: LifetimeLazy,
) -> Option<ManagedLazy<T>>
pub unsafe fn new_raw( data: *mut T, lifetime: LifetimeLazy, ) -> Option<ManagedLazy<T>>
§Safety
pub fn make(data: &mut T) -> (ManagedLazy<T>, 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> Clone for ManagedLazy<T>where
T: ?Sized,
impl<T> Clone for ManagedLazy<T>where
T: ?Sized,
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>) -> ManagedValue<T>
fn from(value: ManagedLazy<T>) -> ManagedValue<T>
Converts to this type from the input type.
source§impl<T: OptionsViewProxy + 'static> From<ManagedLazy<T>> for OptionsInput
impl<T: OptionsViewProxy + 'static> From<ManagedLazy<T>> for OptionsInput
source§fn from(value: ManagedLazy<T>) -> Self
fn from(value: ManagedLazy<T>) -> Self
Converts to this type from the input type.
source§impl<T: SliderViewProxy + 'static> From<ManagedLazy<T>> for SliderInput
impl<T: SliderViewProxy + 'static> From<ManagedLazy<T>> for SliderInput
source§fn from(value: ManagedLazy<T>) -> Self
fn from(value: ManagedLazy<T>) -> Self
Converts to this type from the input type.
source§impl<T: TextInputProxy + 'static> From<ManagedLazy<T>> for TextInput
impl<T: TextInputProxy + 'static> From<ManagedLazy<T>> for TextInput
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>
source§fn try_from(
value: ManagedValue<T>,
) -> Result<ManagedLazy<T>, <ManagedLazy<T> as TryFrom<ManagedValue<T>>>::Error>
fn try_from( value: ManagedValue<T>, ) -> Result<ManagedLazy<T>, <ManagedLazy<T> as TryFrom<ManagedValue<T>>>::Error>
Performs the conversion.
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
)