pub trait Dispatcher: Send + Sync {
// Required method
fn dispatch(&self, req: Request) -> Response;
// Provided methods
fn config_value(&self, _key: &str) -> Option<ConfigValue> { ... }
fn resolve_any(
&self,
_type_name: &'static str,
) -> Result<Arc<dyn Any + Send + Sync>, RivetError> { ... }
}Expand description
Required Methods§
Provided Methods§
Sourcefn config_value(&self, _key: &str) -> Option<ConfigValue>
fn config_value(&self, _key: &str) -> Option<ConfigValue>
Read a config value when available (default: unsupported).
Sourcefn resolve_any(
&self,
_type_name: &'static str,
) -> Result<Arc<dyn Any + Send + Sync>, RivetError>
fn resolve_any( &self, _type_name: &'static str, ) -> Result<Arc<dyn Any + Send + Sync>, RivetError>
Resolve a typed service by type name from the underlying app container.