pub trait Dependency:
Send
+ Sync
+ Sized
+ 'static {
// Required method
fn resolve(
ctx: &mut ResolveContext<'_>,
) -> impl Future<Output = Result<Self, ApiError>> + Send;
// Provided method
fn describe(_op: &mut Operation, _registry: &mut SchemaRegistry) { ... }
}Expand description
A type that can be built from a request and injected with Depends.
Required Methods§
Provided Methods§
Sourcefn describe(_op: &mut Operation, _registry: &mut SchemaRegistry)
fn describe(_op: &mut Operation, _registry: &mut SchemaRegistry)
Document this dependency on op (parameters, security, …).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".