Struct deno_core::AsyncRefCell
source · [−]pub struct AsyncRefCell<T> { /* private fields */ }
Implementations
sourceimpl<T> AsyncRefCell<T>
impl<T> AsyncRefCell<T>
sourcepub 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
.
sourceimpl<T: 'static> AsyncRefCell<T>
impl<T: 'static> AsyncRefCell<T>
sourcepub fn new(value: T) -> Self
pub fn new(value: T) -> Self
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()
.
pub fn new_rc(value: T) -> Rc<Self>
pub fn as_ptr(&self) -> *mut T
pub fn into_inner(self) -> T
sourceimpl<T: Default + 'static> AsyncRefCell<T>
impl<T: Default + 'static> AsyncRefCell<T>
pub fn default_rc() -> Rc<Self>
sourceimpl<T> AsyncRefCell<T>
impl<T> AsyncRefCell<T>
pub fn borrow(self: &Rc<Self>) -> AsyncRefFuture<T>
pub fn borrow_mut(self: &Rc<Self>) -> AsyncMutFuture<T>
pub fn try_borrow(self: &Rc<Self>) -> Option<AsyncRef<T>>
pub fn try_borrow_mut(self: &Rc<Self>) -> Option<AsyncMut<T>>
Trait Implementations
sourceimpl<T> Debug for AsyncRefCell<T>
impl<T> Debug for AsyncRefCell<T>
sourceimpl<T: Default + 'static> Default for AsyncRefCell<T>
impl<T: Default + 'static> Default for AsyncRefCell<T>
sourceimpl<T: 'static> From<T> for AsyncRefCell<T>
impl<T: 'static> From<T> for AsyncRefCell<T>
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,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more