Skip to main content

Then

Struct Then 

Source
pub struct Then<First, Second> { /* private fields */ }
Expand description

Two middleware stages evaluated from first to second.

Trait Implementations§

Source§

impl<State, First, Second> BackendPipelineMiddleware<State> for Then<First, Second>
where First: BackendPipelineMiddleware<State>, Second: BackendPipelineMiddleware<State>,

Source§

type Error = ChainError<<First as BackendPipelineMiddleware<State>>::Error, <Second as BackendPipelineMiddleware<State>>::Error>

An error which prevents the message from continuing through the pipeline.
Source§

async fn backend_asynchronous( &mut self, state: &mut State, message: AsynchronousBackendMessage, ) -> Result<AsynchronousBackendMessage, Self::Error>

Intercepts backend messages in generated AsynchronousBackendMessage phase.
Source§

async fn backend_simple( &mut self, state: &mut State, message: SimpleInternalMessage, ) -> Result<SimpleInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: SimpleInternalMessage phase.
Source§

async fn backend_simple_error( &mut self, state: &mut State, message: SimpleErrorInternalMessage, ) -> Result<SimpleErrorInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: SimpleErrorInternalMessage phase.
Source§

async fn backend_parse_response( &mut self, state: &mut State, message: ParseResponseInternalMessage, ) -> Result<ParseResponseInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: ParseResponseInternalMessage phase.
Source§

async fn backend_bind_response( &mut self, state: &mut State, message: BindResponseInternalMessage, ) -> Result<BindResponseInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: BindResponseInternalMessage phase.
Source§

async fn backend_describe_response( &mut self, state: &mut State, message: DescribeResponseInternalMessage, ) -> Result<DescribeResponseInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: DescribeResponseInternalMessage phase.
Source§

async fn backend_execute_response( &mut self, state: &mut State, message: ExecuteResponseInternalMessage, ) -> Result<ExecuteResponseInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: ExecuteResponseInternalMessage phase.
Source§

async fn backend_close_response( &mut self, state: &mut State, message: CloseResponseInternalMessage, ) -> Result<CloseResponseInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: CloseResponseInternalMessage phase.
Source§

async fn backend_sync_response( &mut self, state: &mut State, message: SyncResponseInternalMessage, ) -> Result<SyncResponseInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: SyncResponseInternalMessage phase.
Source§

async fn backend_function_response( &mut self, state: &mut State, message: FunctionResponseInternalMessage, ) -> Result<FunctionResponseInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: FunctionResponseInternalMessage phase.
Source§

async fn backend_function_ready( &mut self, state: &mut State, message: FunctionReadyInternalMessage, ) -> Result<FunctionReadyInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: FunctionReadyInternalMessage phase.
Source§

async fn backend_simple_copy_in_done( &mut self, state: &mut State, message: SimpleCopyInDoneInternalMessage, ) -> Result<SimpleCopyInDoneInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: SimpleCopyInDoneInternalMessage phase.
Source§

async fn backend_simple_copy_in_failed( &mut self, state: &mut State, message: SimpleCopyInFailedInternalMessage, ) -> Result<SimpleCopyInFailedInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: SimpleCopyInFailedInternalMessage phase.
Source§

async fn backend_simple_copy_out( &mut self, state: &mut State, message: SimpleCopyOutInternalMessage, ) -> Result<SimpleCopyOutInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: SimpleCopyOutInternalMessage phase.
Source§

async fn backend_simple_copy_out_done( &mut self, state: &mut State, message: SimpleCopyOutDoneInternalMessage, ) -> Result<SimpleCopyOutDoneInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: SimpleCopyOutDoneInternalMessage phase.
Source§

async fn backend_simple_copy_ready( &mut self, state: &mut State, message: SimpleCopyReadyInternalMessage, ) -> Result<SimpleCopyReadyInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: SimpleCopyReadyInternalMessage phase.
Source§

async fn backend_extended_copy_in_done( &mut self, state: &mut State, message: ExtendedCopyInDoneInternalMessage, ) -> Result<ExtendedCopyInDoneInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: ExtendedCopyInDoneInternalMessage phase.
Source§

async fn backend_extended_copy_in_failed( &mut self, state: &mut State, message: ExtendedCopyInFailedInternalMessage, ) -> Result<ExtendedCopyInFailedInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: ExtendedCopyInFailedInternalMessage phase.
Source§

async fn backend_extended_copy_out( &mut self, state: &mut State, message: ExtendedCopyOutInternalMessage, ) -> Result<ExtendedCopyOutInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: ExtendedCopyOutInternalMessage phase.
Source§

async fn backend_extended_copy_out_done( &mut self, state: &mut State, message: ExtendedCopyOutDoneInternalMessage, ) -> Result<ExtendedCopyOutDoneInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: ExtendedCopyOutDoneInternalMessage phase.
Source§

async fn backend_simple_copy_both( &mut self, state: &mut State, message: SimpleCopyBothInternalMessage, ) -> Result<SimpleCopyBothInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: SimpleCopyBothInternalMessage phase.
Source§

async fn backend_simple_copy_both_client_done( &mut self, state: &mut State, message: SimpleCopyBothClientDoneInternalMessage, ) -> Result<SimpleCopyBothClientDoneInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: SimpleCopyBothClientDoneInternalMessage phase.
Source§

async fn backend_simple_copy_both_done( &mut self, state: &mut State, message: SimpleCopyBothDoneInternalMessage, ) -> Result<SimpleCopyBothDoneInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: SimpleCopyBothDoneInternalMessage phase.
Source§

async fn backend_simple_copy_both_failed( &mut self, state: &mut State, message: SimpleCopyBothFailedInternalMessage, ) -> Result<SimpleCopyBothFailedInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: SimpleCopyBothFailedInternalMessage phase.
Source§

async fn backend_extended_copy_both( &mut self, state: &mut State, message: ExtendedCopyBothInternalMessage, ) -> Result<ExtendedCopyBothInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: ExtendedCopyBothInternalMessage phase.
Source§

async fn backend_extended_copy_both_client_done( &mut self, state: &mut State, message: ExtendedCopyBothClientDoneInternalMessage, ) -> Result<ExtendedCopyBothClientDoneInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: ExtendedCopyBothClientDoneInternalMessage phase.
Source§

async fn backend_extended_copy_both_done( &mut self, state: &mut State, message: ExtendedCopyBothDoneInternalMessage, ) -> Result<ExtendedCopyBothDoneInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: ExtendedCopyBothDoneInternalMessage phase.
Source§

async fn backend_extended_copy_both_failed( &mut self, state: &mut State, message: ExtendedCopyBothFailedInternalMessage, ) -> Result<ExtendedCopyBothFailedInternalMessage, Self::Error>

Intercepts backend messages in generated backend :: ExtendedCopyBothFailedInternalMessage phase.
Source§

impl<First: Clone, Second: Clone> Clone for Then<First, Second>

Source§

fn clone(&self) -> Then<First, Second>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<First: Copy, Second: Copy> Copy for Then<First, Second>

Source§

impl<First: Debug, Second: Debug> Debug for Then<First, Second>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<First: Eq, Second: Eq> Eq for Then<First, Second>

Source§

impl<State, First, Second> FrontendPipelineMiddleware<State> for Then<First, Second>
where First: FrontendPipelineMiddleware<State>, Second: FrontendPipelineMiddleware<State>,

Source§

type Error = ChainError<<First as FrontendPipelineMiddleware<State>>::Error, <Second as FrontendPipelineMiddleware<State>>::Error>

An error which prevents the message from continuing through the pipeline.
Source§

async fn frontend_ready( &mut self, state: &mut State, message: ReadyExternalMessage, ) -> Result<ReadyExternalMessage, Self::Error>

Intercepts backend messages in generated backend :: ReadyExternalMessage phase.
Source§

async fn frontend_building( &mut self, state: &mut State, message: BuildingExternalMessage, ) -> Result<BuildingExternalMessage, Self::Error>

Intercepts backend messages in generated backend :: BuildingExternalMessage phase.
Source§

async fn frontend_extended_error( &mut self, state: &mut State, message: ExtendedErrorExternalMessage, ) -> Result<ExtendedErrorExternalMessage, Self::Error>

Intercepts backend messages in generated backend :: ExtendedErrorExternalMessage phase.
Source§

async fn frontend_simple_copy_in( &mut self, state: &mut State, message: SimpleCopyInExternalMessage, ) -> Result<SimpleCopyInExternalMessage, Self::Error>

Intercepts backend messages in generated backend :: SimpleCopyInExternalMessage phase.
Source§

async fn frontend_extended_copy_in( &mut self, state: &mut State, message: ExtendedCopyInExternalMessage, ) -> Result<ExtendedCopyInExternalMessage, Self::Error>

Intercepts backend messages in generated backend :: ExtendedCopyInExternalMessage phase.
Source§

async fn frontend_simple_copy_both( &mut self, state: &mut State, message: SimpleCopyBothExternalMessage, ) -> Result<SimpleCopyBothExternalMessage, Self::Error>

Intercepts backend messages in generated backend :: SimpleCopyBothExternalMessage phase.
Source§

async fn frontend_extended_copy_both( &mut self, state: &mut State, message: ExtendedCopyBothExternalMessage, ) -> Result<ExtendedCopyBothExternalMessage, Self::Error>

Intercepts backend messages in generated backend :: ExtendedCopyBothExternalMessage phase.
Source§

impl<Message, State, First, Second> MessageMiddleware<Message, State> for Then<First, Second>
where First: MessageMiddleware<Message, State>, Second: MessageMiddleware<Message, State>,

Source§

type Error = ChainError<<First as MessageMiddleware<Message, State>>::Error, <Second as MessageMiddleware<Message, State>>::Error>

An error which prevents the message from continuing through the chain.
Source§

async fn intercept( &mut self, state: &mut State, message: Message, ) -> Result<Message, Self::Error>

Observes, mutates, or replaces one message and may await external policy, storage, or telemetry work before returning it. Read more
Source§

impl<First: PartialEq, Second: PartialEq> PartialEq for Then<First, Second>

Source§

fn eq(&self, other: &Then<First, Second>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<First: PartialEq, Second: PartialEq> StructuralPartialEq for Then<First, Second>

Source§

impl<Role, Phase, Message, State, First, Second> TypedMiddleware<Role, Phase, Message, State> for Then<First, Second>
where First: TypedMiddleware<Role, Phase, Message, State>, Second: TypedMiddleware<Role, Phase, Message, State>,

Source§

type Error = ChainError<<First as TypedMiddleware<Role, Phase, Message, State>>::Error, <Second as TypedMiddleware<Role, Phase, Message, State>>::Error>

An error which prevents the message from continuing through the chain.
Source§

async fn intercept_typed( &mut self, state: &mut State, message: Message, ) -> Result<Message, Self::Error>

Observes, mutates, or replaces one phase-legal message and may await while borrowing both the handler and caller-defined state. Read more

Auto Trait Implementations§

§

impl<First, Second> Freeze for Then<First, Second>
where First: Freeze, Second: Freeze,

§

impl<First, Second> RefUnwindSafe for Then<First, Second>
where First: RefUnwindSafe, Second: RefUnwindSafe,

§

impl<First, Second> Send for Then<First, Second>
where First: Send, Second: Send,

§

impl<First, Second> Sync for Then<First, Second>
where First: Sync, Second: Sync,

§

impl<First, Second> Unpin for Then<First, Second>
where First: Unpin, Second: Unpin,

§

impl<First, Second> UnsafeUnpin for Then<First, Second>
where First: UnsafeUnpin, Second: UnsafeUnpin,

§

impl<First, Second> UnwindSafe for Then<First, Second>
where First: UnwindSafe, Second: 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<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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<Handler> MessageMiddlewareExt for Handler

Source§

fn then<Next>(self, next: Next) -> Then<Self, Next>

Runs this value followed by next whenever both implement middleware for the intercepted message and state types.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.