pub trait ChildProviders: Send + Sync {
// Required methods
fn routes(&self) -> Vec<RouteInfo>;
fn default_route(&self) -> String;
fn provider(&self, route: &str) -> Result<ChildRoute, String>;
// Provided method
fn refusal(&self, _route: &str) -> Option<String> { ... }
}Expand description
Where children get their providers. A trait so the tool can be tested without a server and so it never holds the configuration itself.
Required Methods§
Sourcefn routes(&self) -> Vec<RouteInfo>
fn routes(&self) -> Vec<RouteInfo>
The routes a call may name, in the order they are listed to the model.
Sourcefn default_route(&self) -> String
fn default_route(&self) -> String
The route a call that names none goes to.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".