[−][src]Enum eff::next_event::NextEvent
A combinator created by next_event
.
This struct polls the given computation until the first event occurs. It's valid to poll again after this computation completes.
Variants
the computation has not generated an event yet
An event occured
The event has been taken by take_event
Methods
impl<C: Effectful> NextEvent<C>
[src]
pub fn occured(&self) -> bool
[src]
Checks if the underlying computation generated an event
pub fn take_event(self: Pin<&mut Self>) -> Option<Event<C::Output, C::Effect>>
[src]
Take the event if occured
Trait Implementations
impl<C: Effectful> Effectful for NextEvent<C>
[src]
type Output = ()
The type of the final result
type Effect = !
The type of the effects this computation will produce
fn poll(self: Pin<&mut Self>, cx: &Context) -> Poll<Self::Output, Self::Effect>
[src]
fn handle<H, HC, Effect, I>(self, handler: H) -> Handled<Self, H, HC, Effect, I> where
Self: Sized,
HC: Effectful,
H: FnMut(Event<Self::Output, Effect>) -> HC,
Self::Effect: Subset<Effect, I>,
[src]
Self: Sized,
HC: Effectful,
H: FnMut(Event<Self::Output, Effect>) -> HC,
Self::Effect: Subset<Effect, I>,
fn embed<Target, Indices>(self) -> EmbedEffect<Self, Target, Indices> where
Self: Sized,
[src]
Self: Sized,
fn left<R>(self) -> Either<Self, R> where
Self: Sized,
[src]
Self: Sized,
fn right<L>(self) -> Either<L, Self> where
Self: Sized,
[src]
Self: Sized,
fn boxed<'a>(
self
) -> Pin<Box<dyn Effectful<Output = Self::Output, Effect = Self::Effect> + 'a>> where
Self: Sized + 'a,
[src]
self
) -> Pin<Box<dyn Effectful<Output = Self::Output, Effect = Self::Effect> + 'a>> where
Self: Sized + 'a,
fn output<T>(self) -> Self where
Self: Effectful<Output = T> + Sized,
[src]
Self: Effectful<Output = T> + Sized,
fn effect<E>(self) -> Self where
Self: Effectful<Effect = E> + Sized,
[src]
Self: Effectful<Effect = E> + Sized,
ⓘImportant traits for IntoFuture<C>fn into_future(self) -> IntoFuture<Self> where
Self: Effectful<Effect = !> + Sized,
[src]
ⓘImportant traits for IntoFuture<C>
Self: Effectful<Effect = !> + Sized,
fn block_on(self) -> Self::Output where
Self: Sized + Effectful<Effect = !>,
[src]
Self: Sized + Effectful<Effect = !>,
fn next_event(self) -> NextEvent<Self> where
Self: Sized,
[src]
Self: Sized,
Auto Trait Implementations
impl<C> Send for NextEvent<C> where
C: Send,
<C as Effectful>::Effect: Send,
<C as Effectful>::Output: Send,
C: Send,
<C as Effectful>::Effect: Send,
<C as Effectful>::Output: Send,
impl<C> Sync for NextEvent<C> where
C: Sync,
<C as Effectful>::Effect: Sync,
<C as Effectful>::Output: Sync,
C: Sync,
<C as Effectful>::Effect: Sync,
<C as Effectful>::Output: Sync,
impl<C> Unpin for NextEvent<C> where
C: Unpin,
<C as Effectful>::Effect: Unpin,
<C as Effectful>::Output: Unpin,
C: Unpin,
<C as Effectful>::Effect: Unpin,
<C as Effectful>::Output: Unpin,
impl<C> UnwindSafe for NextEvent<C> where
C: UnwindSafe,
<C as Effectful>::Effect: UnwindSafe,
<C as Effectful>::Output: UnwindSafe,
C: UnwindSafe,
<C as Effectful>::Effect: UnwindSafe,
<C as Effectful>::Output: UnwindSafe,
impl<C> RefUnwindSafe for NextEvent<C> where
C: RefUnwindSafe,
<C as Effectful>::Effect: RefUnwindSafe,
<C as Effectful>::Output: RefUnwindSafe,
C: RefUnwindSafe,
<C as Effectful>::Effect: RefUnwindSafe,
<C as Effectful>::Output: RefUnwindSafe,
Blanket Implementations
impl<T> EmbedRest<T, Zero> for T
[src]
fn embed_rest(Self) -> T
[src]
impl<Head, Tail, N, Rest> EmbedRest<Either<Head, Tail>, Succ<N>> for Rest where
Head: Effect,
Rest: EmbedRest<Tail, N>,
[src]
Head: Effect,
Rest: EmbedRest<Tail, N>,
fn embed_rest(Self) -> Either<Head, Tail>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,