pub struct OpaqueRefCounted<T>(/* private fields */);Expand description
A wrapper for C++ objects that are known to use fbl::RefCounted
and have their reference count at offset 0.
Implementations§
Source§impl<T> OpaqueRefCounted<T>
impl<T> OpaqueRefCounted<T>
Trait Implementations§
Source§impl<T> HasRefCount for OpaqueRefCounted<T>
impl<T> HasRefCount for OpaqueRefCounted<T>
Source§fn ref_count(&self) -> &RefCounted
fn ref_count(&self) -> &RefCounted
Returns a reference to the contained
RefCounted field.Auto Trait Implementations§
impl<T> !Freeze for OpaqueRefCounted<T>
impl<T> !RefUnwindSafe for OpaqueRefCounted<T>
impl<T> Send for OpaqueRefCounted<T>where
T: Send,
impl<T> !Sync for OpaqueRefCounted<T>
impl<T> Unpin for OpaqueRefCounted<T>where
T: Unpin,
impl<T> UnsafeUnpin for OpaqueRefCounted<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for OpaqueRefCounted<T>where
T: UnwindSafe,
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
Source§impl<T> PinInit<T> for T
impl<T> PinInit<T> for T
Source§unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
Initializes
slot. Read moreSource§fn pin_chain<F>(self, f: F) -> ChainPinInit<Self, F, T, E>where
F: FnOnce(Pin<&mut T>) -> Result<(), E>,
fn pin_chain<F>(self, f: F) -> ChainPinInit<Self, F, T, E>where
F: FnOnce(Pin<&mut T>) -> Result<(), E>,
First initializes the value using
self then calls the function f with the initialized
value. Read more