pub struct AsyncRwLock<T>where
T: ?Sized,{ /* private fields */ }Implementations§
Source§impl<T> AsyncRwLock<T>
impl<T> AsyncRwLock<T>
pub fn new(t: T) -> AsyncRwLock<T>
pub async fn read_arc(self: &Arc<Self>) -> AsyncRwLockReadGuardArc<T>
pub fn try_read_arc(self: &Arc<Self>) -> Option<AsyncRwLockReadGuardArc<T>>
Source§impl<T: ?Sized> AsyncRwLock<T>
impl<T: ?Sized> AsyncRwLock<T>
pub fn try_read(&self) -> Option<AsyncRwLockReadGuard<'_, T>>
pub async fn read(&self) -> AsyncRwLockReadGuard<'_, T>
pub fn try_write(&self) -> Option<AsyncRwLockWriteGuard<'_, T>>
pub async fn write(&self) -> AsyncRwLockWriteGuard<'_, T>
pub fn try_write_arc(self: &Arc<Self>) -> Option<AsyncRwLockWriteGuardArc<T>>
pub async fn write_arc(self: &Arc<Self>) -> AsyncRwLockWriteGuardArc<T>
Trait Implementations§
Source§impl<T> Debug for AsyncRwLock<T>
impl<T> Debug for AsyncRwLock<T>
Source§impl<T> From<T> for AsyncRwLock<T>
impl<T> From<T> for AsyncRwLock<T>
Source§fn from(val: T) -> AsyncRwLock<T>
fn from(val: T) -> AsyncRwLock<T>
Converts to this type from the input type.
Auto Trait Implementations§
impl<T> Freeze for AsyncRwLock<T>where
T: ?Sized,
impl<T> !RefUnwindSafe for AsyncRwLock<T>
impl<T> Send for AsyncRwLock<T>
impl<T> Sync for AsyncRwLock<T>
impl<T> Unpin for AsyncRwLock<T>where
T: ?Sized,
impl<T> !UnwindSafe for AsyncRwLock<T>
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
Source§impl<T> FromFd for T
impl<T> FromFd for T
Source§impl<T> FromFilelike for T
impl<T> FromFilelike for T
Source§fn from_filelike(owned: OwnedFd) -> T
fn from_filelike(owned: OwnedFd) -> T
Constructs a new instance of
Self from the given filelike object. Read moreSource§fn from_into_filelike<Owned>(owned: Owned) -> Twhere
Owned: IntoFilelike,
fn from_into_filelike<Owned>(owned: Owned) -> Twhere
Owned: IntoFilelike,
Constructs a new instance of
Self from the given filelike object
converted from into_owned. Read moreSource§impl<T> FromSocketlike for T
impl<T> FromSocketlike for T
Source§fn from_socketlike(owned: OwnedFd) -> T
fn from_socketlike(owned: OwnedFd) -> T
Constructs a new instance of
Self from the given socketlike object.Source§fn from_into_socketlike<Owned>(owned: Owned) -> Twhere
Owned: IntoSocketlike,
fn from_into_socketlike<Owned>(owned: Owned) -> Twhere
Owned: IntoSocketlike,
Constructs a new instance of
Self from the given socketlike object
converted from into_owned.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more