pub struct ManagedRef<T: ?Sized> { /* private fields */ }
Implementations§
Source§impl<T: ?Sized> ManagedRef<T>
impl<T: ?Sized> ManagedRef<T>
pub fn new(data: &T, lifetime: LifetimeRef) -> Self
pub fn make(data: &T) -> (Self, Lifetime)
pub fn into_inner(self) -> (LifetimeRef, *const T)
pub fn into_dynamic(self) -> DynamicManagedRef
pub fn lifetime(&self) -> &LifetimeRef
pub fn borrow(&self) -> Option<ManagedRef<T>>
pub fn read(&self) -> Option<ValueReadAccess<'_, T>>
Trait Implementations§
Source§impl<T> From<ManagedRef<T>> for ManagedValue<T>
impl<T> From<ManagedRef<T>> for ManagedValue<T>
Source§fn from(value: ManagedRef<T>) -> Self
fn from(value: ManagedRef<T>) -> Self
Converts to this type from the input type.
Source§impl<T> TryFrom<ManagedValue<T>> for ManagedRef<T>
impl<T> TryFrom<ManagedValue<T>> for ManagedRef<T>
impl<T> Send for ManagedRef<T>
impl<T> Sync for ManagedRef<T>
Auto Trait Implementations§
impl<T> Freeze for ManagedRef<T>where
T: ?Sized,
impl<T> RefUnwindSafe for ManagedRef<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Unpin for ManagedRef<T>where
T: ?Sized,
impl<T> UnwindSafe for ManagedRef<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