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