Expand description
Each routing method’s name begins with route_*
, and is an async function that returns
Result<CapabilitySource, RoutingError>, i.e. finds the capability source by walking the
route declarations and resolving components if necessary. Routing always walks in the direction
from the consuming side to the providing side.
The most commonly used implementation is route_from_use, which starts from a Use
declaration, walks along the chain of Offer
s, and then the chain of Expose
s. Similarly,
route_from_registration starts from a registration of a capability into an environment, then
walks the Offer
s and Expose
s.
You can also start walking from halfway in this chain, e.g. route_from_offer, route_from_expose.
Structs§
- Expose
- The
Expose
phase of routing. - Noop
Visitor - Offer
- The
Offer
phase of routing. - Registration
- The environment
Registration
phase of routing. - Route
Bundle Iter - Immutable iterator over a
RouteBundle
. Thisstruct
is created byRouteBundle::iter
. - Sources
- Defines which capability source types are supported.
- Use
Enums§
- Route
Bundle - A bundle of one or more routing declarations to route together, that share the same target_name
Traits§
- Capability
Visitor - Visitor pattern trait for visiting all
CapabilityDecl
during a route. - Error
NotFound From Parent - Implemented by declaration types to emit a proper error when a matching offer is not found in the parent.
- Error
NotFound InChild - Implemented by declaration types to emit a proper error when a matching expose is not found in the child.
- Expose
Visitor - Visitor pattern trait for visiting all
ExposeDecl
during a route. - Offer
Visitor - Visitor pattern trait for visiting all
OfferDecl
during a route.
Functions§
- find_
matching_ exposes - find_
matching_ offers - route_
from_ expose - Routes a capability from its
Expose
declaration to its source by followingExpose
declarations. - route_
from_ offer - Routes a capability from its
Offer
declaration to its source by followingOffer
andExpose
declarations. - route_
from_ registration - Routes a capability from its environment
Registration
declaration to its source by followingOffer
andExpose
declarations. - route_
from_ self - Routes a capability from its
Use
declaration to its source by capabilities declarations, i.e. whatever capabilities that this component itself provides. - route_
from_ self_ by_ name - Routes a capability from a capability name to its source by capabilities declarations, i.e. whatever capabilities that this component itself provides.
- route_
from_ use - Routes a capability from its
Use
declaration to its source by followingOffer
andExpose
declarations.