pub trait Plugin {
// Required method
fn serve<N: Next + Send>(
&self,
cx: &mut Context<'_>,
next: N,
) -> impl Future<Output = Outcome> + Send;
// Provided method
fn readiness(&self) -> Option<&dyn Readiness> { ... }
}Expand description
A Plugin may await Next and inspect or modify its outcome and Response.
Required Methods§
fn serve<N: Next + Send>( &self, cx: &mut Context<'_>, next: N, ) -> impl Future<Output = Outcome> + Send
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".