pub trait GateHooks: Send + Sync {
// Provided methods
fn on_protected_request<'a>(
&'a self,
_req: &'a Request<Body>,
) -> impl Future<Output = ProtectedRequestOutcome> + Send + 'a { ... }
fn on_payment_verified<'a>(
&'a self,
_req: &'a mut Request<Body>,
) -> impl Future<Output = ()> + Send + 'a { ... }
}Available on crate feature
server only.Expand description
HTTP-layer hooks. Defaults are no-ops.
Provided Methods§
Sourcefn on_protected_request<'a>(
&'a self,
_req: &'a Request<Body>,
) -> impl Future<Output = ProtectedRequestOutcome> + Send + 'a
fn on_protected_request<'a>( &'a self, _req: &'a Request<Body>, ) -> impl Future<Output = ProtectedRequestOutcome> + Send + 'a
Fires on every protected request, before the payment check.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".