pub trait DynamicBackend: Send + Sync {
// Required methods
fn backend_id(&self) -> &str;
fn dynamic_capability(&self) -> Option<&DynamicCapability>;
fn cost_bound(&self, projection: &[u8]) -> CostBound;
fn ask<'a>(&'a self, call: DynamicCall<'a>) -> BoxFuture<'a, DynamicReport>;
}Expand description
Answers dynamic questions (spec 019, 3.4). Separate from
DecisionBackend: implementing that trait never makes a backend
dynamic, and a backend answers only when it returns a dynamic
capability. It is offered no tool, function or retrieval surface.
Required Methods§
fn backend_id(&self) -> &str
Sourcefn dynamic_capability(&self) -> Option<&DynamicCapability>
fn dynamic_capability(&self) -> Option<&DynamicCapability>
The opt-in declaration, or None: then every request is refused
before dispatch.
Sourcefn cost_bound(&self, projection: &[u8]) -> CostBound
fn cost_bound(&self, projection: &[u8]) -> CostBound
Per-call disclosure before dispatch; only bounded is admitted.
fn ask<'a>(&'a self, call: DynamicCall<'a>) -> BoxFuture<'a, DynamicReport>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".