pub struct AsyncMutex<T: ?Sized> { /* private fields */ }Implementations§
Source§impl<T: ?Sized> AsyncMutex<T>
impl<T: ?Sized> AsyncMutex<T>
pub fn new(t: T) -> Selfwhere
T: Sized,
pub async fn lock(&self) -> AsyncMutexGuard<'_, T>
pub async fn lock_arc(self: &Arc<Self>) -> AsyncMutexGuardArc<T>
pub fn try_lock(&self) -> Option<AsyncMutexGuard<'_, T>>
pub fn try_lock_arc(self: &Arc<Self>) -> Option<AsyncMutexGuardArc<T>>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for AsyncMutex<T>where
T: ?Sized,
impl<T> !RefUnwindSafe for AsyncMutex<T>
impl<T> Send for AsyncMutex<T>
impl<T> Sync for AsyncMutex<T>
impl<T> Unpin for AsyncMutex<T>where
T: ?Sized,
impl<T> !UnwindSafe for AsyncMutex<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