pub struct ManagedRef<T>where
T: ?Sized,{ /* private fields */ }
Implementations§
source§impl<T> ManagedRef<T>where
T: ?Sized,
impl<T> ManagedRef<T>where
T: ?Sized,
pub fn new(data: &T, lifetime: LifetimeRef) -> ManagedRef<T>
sourcepub unsafe fn new_raw(
data: *const T,
lifetime: LifetimeRef,
) -> Option<ManagedRef<T>>
pub unsafe fn new_raw( data: *const T, lifetime: LifetimeRef, ) -> Option<ManagedRef<T>>
§Safety
pub fn make(data: &T) -> (ManagedRef<T>, 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>) -> ManagedValue<T>
fn from(value: ManagedRef<T>) -> ManagedValue<T>
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>
source§fn try_from(
value: ManagedValue<T>,
) -> Result<ManagedRef<T>, <ManagedRef<T> as TryFrom<ManagedValue<T>>>::Error>
fn try_from( value: ManagedValue<T>, ) -> Result<ManagedRef<T>, <ManagedRef<T> as TryFrom<ManagedValue<T>>>::Error>
Performs the conversion.
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