pub trait Provider: Send + Sync {
// Required method
fn ask<'a>(&'a self, request: &'a Request) -> ProviderFuture<'a>;
}Expand description
A provider must be lazy, cancellation-safe, and free of implicit retries.
Consumers should use ask to check response coverage and normalization.
Required Methods§
Sourcefn ask<'a>(&'a self, request: &'a Request) -> ProviderFuture<'a>
fn ask<'a>(&'a self, request: &'a Request) -> ProviderFuture<'a>
Answer the state and all its questions in one semantic invocation.
§Errors
The returned future may fail with provider, timeout, unsupported-capability, or input/response-validation errors. Implementations must preserve errors as errors; uncertainty belongs in a successful answer.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".