pub trait Checkable<Op>: Sized {
type Out;
// Required method
fn check(
self,
op: &Op,
) -> impl Future<Output = Result<CheckOutcome<Self, Self::Out>, ProximaError>> + Send;
}Expand description
A value that can check itself against an op and decide pass/reject.
Implement this on any input type to make Validate work over it.
HTTP: Request<Bytes>: Checkable<ValidateOp> with Out = Response<Bytes>.
Required Associated Types§
Required Methods§
fn check( self, op: &Op, ) -> impl Future<Output = Result<CheckOutcome<Self, Self::Out>, ProximaError>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".