pub trait Routable<T>: Send + Syncwhere
T: CapabilityBound,{
// Required methods
fn route<'life0, 'async_trait>(
&'life0 self,
request: RouteRequest,
target: Arc<WeakInstanceToken>,
) -> Pin<Box<dyn Future<Output = Result<Option<Arc<T>>, RouterError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn route_debug<'life0, 'async_trait>(
&'life0 self,
request: RouteRequest,
target: Arc<WeakInstanceToken>,
) -> Pin<Box<dyn Future<Output = Result<CapabilitySource, RouterError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn error_info(&self) -> Option<RouterErrorInfo> { ... }
}Expand description
Types that implement Routable let the holder asynchronously request capabilities
from them.
Required Methods§
fn route<'life0, 'async_trait>(
&'life0 self,
request: RouteRequest,
target: Arc<WeakInstanceToken>,
) -> Pin<Box<dyn Future<Output = Result<Option<Arc<T>>, RouterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn route_debug<'life0, 'async_trait>(
&'life0 self,
request: RouteRequest,
target: Arc<WeakInstanceToken>,
) -> Pin<Box<dyn Future<Output = Result<CapabilitySource, RouterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn route_debug<'life0, 'async_trait>(
&'life0 self,
request: RouteRequest,
target: Arc<WeakInstanceToken>,
) -> Pin<Box<dyn Future<Output = Result<CapabilitySource, RouterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Performs the same operation as route, but returns a
fidl_fuchsia_internal::CapabilitySource persisted into bytes.
Provided Methods§
Sourcefn error_info(&self) -> Option<RouterErrorInfo>
fn error_info(&self) -> Option<RouterErrorInfo>
Returns diagnostic data about the capability being routed.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".