pub struct DynamicObjectRef { /* private fields */ }
Implementations§
Source§impl DynamicObjectRef
impl DynamicObjectRef
pub fn new(data: DynamicManagedRef) -> Self
pub fn actual_type_hash(&self) -> TypeHash
pub fn current_type_hash(&self) -> TypeHash
pub fn upcast(self, type_hash: TypeHash, registry: &Registry) -> Option<Self>
pub fn downcast(self, type_hash: TypeHash, registry: &Registry) -> Option<Self>
pub fn into_inner(self, registry: &Registry) -> Option<DynamicManagedRef>
pub fn into_typed<T>(self) -> Result<ObjectRef<T>, Self>
Methods from Deref<Target = DynamicManagedRef>§
pub fn type_hash(&self) -> &TypeHash
pub fn lifetime(&self) -> &LifetimeRef
pub fn borrow(&self) -> Option<DynamicManagedRef>
pub async fn borrow_async(&self) -> DynamicManagedRef
pub fn is<T>(&self) -> bool
pub fn read<T>(&self) -> Option<ValueReadAccess<'_, T>>
pub async fn read_async<'a, T>(&'a self) -> Option<ValueReadAccess<'a, T>>where
T: 'a,
Trait Implementations§
Source§impl Deref for DynamicObjectRef
impl Deref for DynamicObjectRef
Auto Trait Implementations§
impl Freeze for DynamicObjectRef
impl RefUnwindSafe for DynamicObjectRef
impl Send for DynamicObjectRef
impl Sync for DynamicObjectRef
impl Unpin for DynamicObjectRef
impl UnwindSafe for DynamicObjectRef
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