pub enum DynamicManagedValue {
Owned(DynamicManaged),
Ref(DynamicManagedRef),
RefMut(DynamicManagedRefMut),
Lazy(DynamicManagedLazy),
}
Variants§
Implementations§
source§impl DynamicManagedValue
impl DynamicManagedValue
pub fn as_owned(&self) -> Option<&DynamicManaged>
pub fn as_mut_owned(&mut self) -> Option<&mut DynamicManaged>
pub fn as_ref(&self) -> Option<&DynamicManagedRef>
pub fn as_mut_ref(&mut self) -> Option<&mut DynamicManagedRef>
pub fn as_ref_mut(&self) -> Option<&DynamicManagedRefMut>
pub fn as_mut_ref_mut(&mut self) -> Option<&mut DynamicManagedRefMut>
pub fn as_lazy(&self) -> Option<&DynamicManagedLazy>
pub fn as_mut_lazy(&mut self) -> Option<&mut DynamicManagedLazy>
pub fn read<T>(&self) -> Option<ValueReadAccess<'_, T>>
pub fn write<T>(&mut self) -> Option<ValueWriteAccess<'_, T>>
pub fn borrow(&self) -> Option<DynamicManagedRef>
pub fn borrow_mut(&mut self) -> Option<DynamicManagedRefMut>
pub fn lazy(&self) -> Option<DynamicManagedLazy>
Trait Implementations§
source§impl From<DynamicManaged> for DynamicManagedValue
impl From<DynamicManaged> for DynamicManagedValue
source§fn from(value: DynamicManaged) -> DynamicManagedValue
fn from(value: DynamicManaged) -> DynamicManagedValue
Converts to this type from the input type.
source§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 From<DynamicManagedRef> for DynamicManagedValue
impl From<DynamicManagedRef> for DynamicManagedValue
source§fn from(value: DynamicManagedRef) -> DynamicManagedValue
fn from(value: DynamicManagedRef) -> DynamicManagedValue
Converts to this type from the input type.
source§impl From<DynamicManagedRefMut> for DynamicManagedValue
impl From<DynamicManagedRefMut> for DynamicManagedValue
source§fn from(value: DynamicManagedRefMut) -> DynamicManagedValue
fn from(value: DynamicManagedRefMut) -> DynamicManagedValue
Converts to this type from the input type.
source§impl TryFrom<DynamicManagedValue> for DynamicManaged
impl TryFrom<DynamicManagedValue> for DynamicManaged
source§fn try_from(
value: DynamicManagedValue,
) -> Result<DynamicManaged, <DynamicManaged as TryFrom<DynamicManagedValue>>::Error>
fn try_from( value: DynamicManagedValue, ) -> Result<DynamicManaged, <DynamicManaged as TryFrom<DynamicManagedValue>>::Error>
Performs the conversion.
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.
source§impl TryFrom<DynamicManagedValue> for DynamicManagedRef
impl TryFrom<DynamicManagedValue> for DynamicManagedRef
source§fn try_from(
value: DynamicManagedValue,
) -> Result<DynamicManagedRef, <DynamicManagedRef as TryFrom<DynamicManagedValue>>::Error>
fn try_from( value: DynamicManagedValue, ) -> Result<DynamicManagedRef, <DynamicManagedRef as TryFrom<DynamicManagedValue>>::Error>
Performs the conversion.
source§impl TryFrom<DynamicManagedValue> for DynamicManagedRefMut
impl TryFrom<DynamicManagedValue> for DynamicManagedRefMut
source§fn try_from(
value: DynamicManagedValue,
) -> Result<DynamicManagedRefMut, <DynamicManagedRefMut as TryFrom<DynamicManagedValue>>::Error>
fn try_from( value: DynamicManagedValue, ) -> Result<DynamicManagedRefMut, <DynamicManagedRefMut as TryFrom<DynamicManagedValue>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for DynamicManagedValue
impl RefUnwindSafe for DynamicManagedValue
impl Send for DynamicManagedValue
impl Sync for DynamicManagedValue
impl Unpin for DynamicManagedValue
impl UnwindSafe for DynamicManagedValue
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