pub struct StateWaiter { /* private fields */ }Implementations§
Source§impl StateWaiter
impl StateWaiter
pub fn new() -> Self
pub fn transfer(&mut self) -> Self
pub fn transfer_into(&mut self, waiter: &mut Self)
pub fn new_waiter(&mut self) -> AbortRegistration
pub async fn wait<T, S: FnOnce() -> T>(waiter: AbortRegistration, state: S) -> T
pub async fn abort_wait<A: Future<Output = BuckyError>, T, S: FnOnce() -> T>( t: A, waiter: AbortRegistration, state: S, ) -> BuckyResult<T>
pub fn wake(self)
pub fn pop(&mut self) -> Option<AbortHandle>
pub fn len(&self) -> usize
Auto Trait Implementations§
impl Freeze for StateWaiter
impl !RefUnwindSafe for StateWaiter
impl Send for StateWaiter
impl Sync for StateWaiter
impl Unpin for StateWaiter
impl !UnwindSafe for StateWaiter
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> 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