Struct deno_core::AsyncRefCell [−][src]
pub struct AsyncRefCell<T> { /* fields omitted */ }
Implementations
pub fn borrow_sync<M: BorrowModeTrait, R: RcLike<AsyncRefCell<T>>>(
cell: R
) -> Option<AsyncBorrowImpl<T, M>>
pub fn borrow_sync<M: BorrowModeTrait, R: RcLike<AsyncRefCell<T>>>(
cell: R
) -> Option<AsyncBorrowImpl<T, M>>
Borrow the cell’s contents synchronouslym without creating an
intermediate future. If the cell has already been borrowed and either
the existing or the requested borrow is exclusive, this function returns
None
.
Create a new AsyncRefCell
that encapsulates the specified value.
Note that in order to borrow the inner value, the AsyncRefCell
needs to be wrapped in an Rc
or an RcRef
. These can be created
either manually, or by using the convenience method
AsyncRefCell::new_rc()
.
Trait Implementations
Auto Trait Implementations
impl<T> !RefUnwindSafe for AsyncRefCell<T>
impl<T> Send for AsyncRefCell<T> where
T: Send,
impl<T> !Sync for AsyncRefCell<T>
impl<T> Unpin for AsyncRefCell<T> where
T: Unpin,
impl<T> UnwindSafe for AsyncRefCell<T> where
T: UnwindSafe,