pub struct ManagedRefMut<T>where
T: ?Sized,{ /* private fields */ }
Implementations§
source§impl<T> ManagedRefMut<T>where
T: ?Sized,
impl<T> ManagedRefMut<T>where
T: ?Sized,
pub fn new(data: &mut T, lifetime: LifetimeRefMut) -> ManagedRefMut<T>
sourcepub unsafe fn new_raw(
data: *mut T,
lifetime: LifetimeRefMut,
) -> Option<ManagedRefMut<T>>
pub unsafe fn new_raw( data: *mut T, lifetime: LifetimeRefMut, ) -> Option<ManagedRefMut<T>>
§Safety
pub fn make(data: &mut T) -> (ManagedRefMut<T>, Lifetime)
pub fn into_inner(self) -> (LifetimeRefMut, *mut T)
pub fn into_dynamic(self) -> DynamicManagedRefMut
pub fn lifetime(&self) -> &LifetimeRefMut
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>>
sourcepub unsafe fn try_map<U>(
self,
f: impl FnOnce(&mut T) -> Option<&mut U>,
) -> Option<ManagedRefMut<U>>
pub unsafe fn try_map<U>( self, f: impl FnOnce(&mut T) -> Option<&mut U>, ) -> Option<ManagedRefMut<U>>
§Safety
sourcepub unsafe fn as_mut_ptr(&mut self) -> Option<*mut T>
pub unsafe fn as_mut_ptr(&mut self) -> Option<*mut T>
§Safety
Trait Implementations§
source§impl<T> From<ManagedRefMut<T>> for ManagedValue<T>
impl<T> From<ManagedRefMut<T>> for ManagedValue<T>
source§fn from(value: ManagedRefMut<T>) -> ManagedValue<T>
fn from(value: ManagedRefMut<T>) -> ManagedValue<T>
Converts to this type from the input type.
source§impl<T> TryFrom<ManagedValue<T>> for ManagedRefMut<T>
impl<T> TryFrom<ManagedValue<T>> for ManagedRefMut<T>
source§fn try_from(
value: ManagedValue<T>,
) -> Result<ManagedRefMut<T>, <ManagedRefMut<T> as TryFrom<ManagedValue<T>>>::Error>
fn try_from( value: ManagedValue<T>, ) -> Result<ManagedRefMut<T>, <ManagedRefMut<T> as TryFrom<ManagedValue<T>>>::Error>
Performs the conversion.
impl<T> Send for ManagedRefMut<T>
impl<T> Sync for ManagedRefMut<T>
Auto Trait Implementations§
impl<T> Freeze for ManagedRefMut<T>where
T: ?Sized,
impl<T> RefUnwindSafe for ManagedRefMut<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Unpin for ManagedRefMut<T>where
T: ?Sized,
impl<T> UnwindSafe for ManagedRefMut<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