pub struct DynamicManagedRef { /* private fields */ }
Implementations§
Source§impl DynamicManagedRef
impl DynamicManagedRef
pub fn new<T: ?Sized>(data: &T, lifetime: LifetimeRef) -> Self
Sourcepub unsafe fn new_raw(
type_hash: TypeHash,
lifetime: LifetimeRef,
data: *const u8,
) -> Option<Self>
pub unsafe fn new_raw( type_hash: TypeHash, lifetime: LifetimeRef, data: *const u8, ) -> Option<Self>
§Safety
pub fn make<T: ?Sized>(data: &T) -> (Self, Lifetime)
pub fn into_inner(self) -> (TypeHash, LifetimeRef, *const u8)
pub fn into_typed<T>(self) -> Result<ManagedRef<T>, Self>
pub fn type_hash(&self) -> &TypeHash
pub fn lifetime(&self) -> &LifetimeRef
pub fn borrow(&self) -> Option<DynamicManagedRef>
pub fn is<T>(&self) -> bool
pub fn read<T>(&self) -> Option<ValueReadAccess<'_, T>>
Trait Implementations§
Source§impl From<DynamicManagedRef> for DynamicManagedValue
impl From<DynamicManagedRef> for DynamicManagedValue
Source§fn from(value: DynamicManagedRef) -> Self
fn from(value: DynamicManagedRef) -> Self
Converts to this type from the input type.
impl Send for DynamicManagedRef
impl Sync for DynamicManagedRef
Auto Trait Implementations§
impl Freeze for DynamicManagedRef
impl RefUnwindSafe for DynamicManagedRef
impl Unpin for DynamicManagedRef
impl UnwindSafe for DynamicManagedRef
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