pub struct IntermediateRouter { /* private fields */ }Expand description
A router that attempts to find a router to forward to in a source dictionary, validates (and potentially mutates) the route request, and then forwards the request to next router.
Implementations§
Source§impl IntermediateRouter
impl IntermediateRouter
Sourcepub fn new(
source_dictionary: WeakDictionaryOrRouter,
source_path: RelativePath,
default_request: RouteRequest,
default_token: Arc<WeakInstanceToken>,
moniker: Moniker,
route_verb: RouteVerb,
source: Ref,
) -> Capability
pub fn new( source_dictionary: WeakDictionaryOrRouter, source_path: RelativePath, default_request: RouteRequest, default_token: Arc<WeakInstanceToken>, moniker: Moniker, route_verb: RouteVerb, source: Ref, ) -> Capability
Returns an IntermediateRouter wrapped in a Router type, with an appropriate type for the
default_request.build_type_name.
Trait Implementations§
Source§impl<C> Routable<C> for IntermediateRouterwhere
Arc<Router<C>>: TryFrom<Capability>,
Arc<C>: TryFrom<Capability>,
Router<C>: CapabilityBound,
C: Debug + CapabilityBound,
impl<C> Routable<C> for IntermediateRouterwhere
Arc<Router<C>>: TryFrom<Capability>,
Arc<C>: TryFrom<Capability>,
Router<C>: CapabilityBound,
C: Debug + CapabilityBound,
fn route<'life0, 'async_trait>(
&'life0 self,
request: RouteRequest,
target: Arc<WeakInstanceToken>,
) -> Pin<Box<dyn Future<Output = Result<Option<Arc<C>>, RouterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§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,
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.Source§fn error_info(&self) -> Option<RouterErrorInfo>
fn error_info(&self) -> Option<RouterErrorInfo>
Returns diagnostic data about the capability being routed.
Auto Trait Implementations§
impl !RefUnwindSafe for IntermediateRouter
impl !UnwindSafe for IntermediateRouter
impl Freeze for IntermediateRouter
impl Send for IntermediateRouter
impl Sync for IntermediateRouter
impl Unpin for IntermediateRouter
impl UnsafeUnpin for IntermediateRouter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more