Skip to main content

DynamicBackend

Trait DynamicBackend 

Source
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§

Source

fn backend_id(&self) -> &str

Source

fn dynamic_capability(&self) -> Option<&DynamicCapability>

The opt-in declaration, or None: then every request is refused before dispatch.

Source

fn cost_bound(&self, projection: &[u8]) -> CostBound

Per-call disclosure before dispatch; only bounded is admitted.

Source

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".

Implementors§