Struct routing::legacy_router::Sources
source · pub struct Sources(/* private fields */);
Implementations§
source§impl Sources
impl Sources
pub fn new(builder: AllowedSourcesBuilder) -> Self
sourcepub fn framework_source(
&self,
name: Name,
mapper: &mut dyn DebugRouteMapper
) -> Result<InternalCapability, RoutingError>
pub fn framework_source( &self, name: Name, mapper: &mut dyn DebugRouteMapper ) -> Result<InternalCapability, RoutingError>
Return the InternalCapability
representing this framework capability source, or
RoutingError::UnsupportedRouteSource
if unsupported.
sourcepub fn capability_source(&self) -> Result<(), RoutingError>
pub fn capability_source(&self) -> Result<(), RoutingError>
Checks whether capability sources are supported, returning RoutingError::UnsupportedRouteSource
if they are not.
sourcepub fn is_namespace_supported(&self) -> bool
pub fn is_namespace_supported(&self) -> bool
Checks whether namespace capability sources are supported.
sourcepub fn find_namespace_source<V>(
&self,
name: &Name,
capabilities: &[CapabilityDecl],
visitor: &mut V,
mapper: &mut dyn DebugRouteMapper
) -> Result<Option<ComponentCapability>, RoutingError>where
V: CapabilityVisitor,
pub fn find_namespace_source<V>(
&self,
name: &Name,
capabilities: &[CapabilityDecl],
visitor: &mut V,
mapper: &mut dyn DebugRouteMapper
) -> Result<Option<ComponentCapability>, RoutingError>where
V: CapabilityVisitor,
Looks for a namespace capability in the list of capability sources.
If found, the declaration is visited by visitor
and the declaration is wrapped
in a ComponentCapability
.
Returns RoutingError::UnsupportedRouteSource
if namespace capabilities are unsupported.
sourcepub fn find_builtin_source<V>(
&self,
name: &Name,
capabilities: &[CapabilityDecl],
visitor: &mut V,
mapper: &mut dyn DebugRouteMapper
) -> Result<Option<InternalCapability>, RoutingError>where
V: CapabilityVisitor,
pub fn find_builtin_source<V>(
&self,
name: &Name,
capabilities: &[CapabilityDecl],
visitor: &mut V,
mapper: &mut dyn DebugRouteMapper
) -> Result<Option<InternalCapability>, RoutingError>where
V: CapabilityVisitor,
Looks for a built-in capability in the list of capability sources.
If found, the capability’s name is wrapped in an InternalCapability
.
Returns RoutingError::UnsupportedRouteSource
if built-in capabilities are unsupported.
sourcepub fn find_component_source<V>(
&self,
name: &Name,
moniker: &Moniker,
capabilities: &[CapabilityDecl],
visitor: &mut V,
mapper: &mut dyn DebugRouteMapper
) -> Result<ComponentCapability, RoutingError>where
V: CapabilityVisitor,
pub fn find_component_source<V>(
&self,
name: &Name,
moniker: &Moniker,
capabilities: &[CapabilityDecl],
visitor: &mut V,
mapper: &mut dyn DebugRouteMapper
) -> Result<ComponentCapability, RoutingError>where
V: CapabilityVisitor,
Looks for a component capability in the list of capability sources for the component instance
with moniker moniker
.
If found, the declaration is visited by visitor
and the declaration is wrapped
in a ComponentCapability
.
Returns RoutingError::UnsupportedRouteSource
if component capabilities are unsupported.