pub trait DynGateHooks: Send + Sync {
// Required methods
fn on_protected_request<'a>(
&'a self,
req: &'a Request<Body>,
) -> Pin<Box<dyn Future<Output = ProtectedRequestOutcome> + Send + 'a>>;
fn on_payment_verified<'a>(
&'a self,
req: &'a mut Request<Body>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>>;
}Available on crate feature
server only.Expand description
Object-safe erasure of GateHooks.
Required Methods§
Sourcefn on_protected_request<'a>(
&'a self,
req: &'a Request<Body>,
) -> Pin<Box<dyn Future<Output = ProtectedRequestOutcome> + Send + 'a>>
fn on_protected_request<'a>( &'a self, req: &'a Request<Body>, ) -> Pin<Box<dyn Future<Output = ProtectedRequestOutcome> + Send + 'a>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".