AsyncLockableMaker

Struct AsyncLockableMaker 

Source
pub struct AsyncLockableMaker<Locker, Wakers> { /* private fields */ }
Expand description

Type factory for AsyncLockable

Implementations§

Source§

impl<Locker, Wakers> AsyncLockableMaker<Locker, Wakers>
where Locker: LockableNew, Wakers: Default,

Source

pub fn new(value: Locker::Value) -> Self

Trait Implementations§

Source§

impl<Locker, Wakers, Mediator> AsyncLockable for AsyncLockableMaker<Locker, Wakers>
where Locker: Lockable + Send + Sync, for<'a> Locker::GuardMut<'a>: Send + Unpin, Wakers: Lockable + Send + Sync, for<'b> Wakers::GuardMut<'b>: DerefMut<Target = Mediator>, Mediator: AsyncLockableMediator + 'static,

Source§

type GuardMut<'a> = AsyncLockableMakerGuard<'a, Locker, Wakers, Mediator> where Self: 'a

RAII scoped lock guard type. Read more
Source§

type GuardMutFuture<'a> = AsyncLockableMakerFuture<'a, Locker, Wakers, Mediator> where Self: 'a

Future created by lock function
Source§

fn lock(&self) -> Self::GuardMutFuture<'_>

Acquire the lock asynchronously.
Source§

fn unlock<'a>(guard: Self::GuardMut<'a>) -> &'a Self

Immediately drops the guard, and consequently unlocks the Lockable object. Read more
Source§

impl<Locker, Wakers> Default for AsyncLockableMaker<Locker, Wakers>
where Locker: Default, Wakers: Default,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<Locker, Wakers> Freeze for AsyncLockableMaker<Locker, Wakers>
where Locker: Freeze, Wakers: Freeze,

§

impl<Locker, Wakers> RefUnwindSafe for AsyncLockableMaker<Locker, Wakers>
where Locker: RefUnwindSafe, Wakers: RefUnwindSafe,

§

impl<Locker, Wakers> Send for AsyncLockableMaker<Locker, Wakers>
where Locker: Send, Wakers: Send,

§

impl<Locker, Wakers> Sync for AsyncLockableMaker<Locker, Wakers>
where Locker: Sync, Wakers: Sync,

§

impl<Locker, Wakers> Unpin for AsyncLockableMaker<Locker, Wakers>
where Locker: Unpin, Wakers: Unpin,

§

impl<Locker, Wakers> UnwindSafe for AsyncLockableMaker<Locker, Wakers>
where Locker: UnwindSafe, Wakers: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.