pub struct Respond<R, P> { /* private fields */ }
Trait Implementations§
Source§impl<T, S, P, R> Reactor<T, S> for Respond<R, P>
impl<T, S, P, R> Reactor<T, S> for Respond<R, P>
Source§fn react(
&mut self,
event: Timed<Event<T>>,
context: Context<'_, S>,
) -> Result<Self::Response, Self::Error>
fn react( &mut self, event: Timed<Event<T>>, context: Context<'_, S>, ) -> Result<Self::Response, Self::Error>
fn map_response<P, F>(self, f: F) -> MapResponse<Self, F>
fn map_error<E, F>(self, f: F) -> MapError<Self, F>
Source§fn respond<P>(self, response: P) -> Respond<Self, P>
fn respond<P>(self, response: P) -> Respond<Self, P>
Reacts with this reactor and then responds with the given
response
, regardless of this
reactor’s output.Source§fn fail<E>(self, error: E) -> Fail<Self, E>
fn fail<E>(self, error: E) -> Fail<Self, E>
Reacts with this reactor and then fails with the given
error
, regardless of this
reactor’s output.Source§fn then<R>(self, reactor: R) -> Then<Self, R>
fn then<R>(self, reactor: R) -> Then<Self, R>
Reacts with this reactor and then the given reactor (regardless of outputs). Read more
Source§fn and<R>(self, reactor: R) -> And<Self, R>
fn and<R>(self, reactor: R) -> And<Self, R>
Reacts with this reactor and then the given reactor if and only if this reactor returns
Ok
. Read moreimpl<R: Copy, P: Copy> Copy for Respond<R, P>
Auto Trait Implementations§
impl<R, P> Freeze for Respond<R, P>
impl<R, P> RefUnwindSafe for Respond<R, P>where
R: RefUnwindSafe,
P: RefUnwindSafe,
impl<R, P> Send for Respond<R, P>
impl<R, P> Sync for Respond<R, P>
impl<R, P> Unpin for Respond<R, P>
impl<R, P> UnwindSafe for Respond<R, P>where
R: UnwindSafe,
P: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, T> ReactorExt<T> for Rwhere
R: Reactor<T>,
impl<R, T> ReactorExt<T> for Rwhere
R: Reactor<T>,
Source§fn react_to_data_record(
&mut self,
record: T,
) -> Result<Self::Response, Self::Error>where
S: Default,
fn react_to_data_record(
&mut self,
record: T,
) -> Result<Self::Response, Self::Error>where
S: Default,
Reacts to a data record. Read more