pub struct ManagedRefMut<T: ?Sized> { /* private fields */ }
Implementations§
Source§impl<T: ?Sized> ManagedRefMut<T>
impl<T: ?Sized> ManagedRefMut<T>
pub fn new(data: &mut T, lifetime: LifetimeRefMut) -> Self
pub fn make(data: &mut T) -> (Self, 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(&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>) -> Self
fn from(value: ManagedRefMut<T>) -> Self
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>
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