Struct embedded_async_helpers::fair_share::FairShare
source · [−]pub struct FairShare<T> { /* private fields */ }
Expand description
Async fair sharing of an underlying value.
Implementations
sourcepub const fn new(val: T) -> Self
pub const fn new(val: T) -> Self
Create a new fair share, generally place this in static storage and pass around references.
sourcepub fn access<'a>(&'a self) -> FairShareAccessFuture<'a, T>ⓘNotable traits for FairShareAccessFuture<'a, T>impl<'a, T> Future for FairShareAccessFuture<'a, T> type Output = FairShareExclusiveAccess<'a, T>;
pub fn access<'a>(&'a self) -> FairShareAccessFuture<'a, T>ⓘNotable traits for FairShareAccessFuture<'a, T>impl<'a, T> Future for FairShareAccessFuture<'a, T> type Output = FairShareExclusiveAccess<'a, T>;
Request access, await the returned future to be woken when its available.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more