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§
- The
Expose
phase of routing. - The
Offer
phase of routing. - The environment
Registration
phase of routing. - Defines which capability source types are supported.
Enums§
- A bundle of one or more routing declarations to route together, that share the same target_name
Traits§
- Visitor pattern trait for visiting all
CapabilityDecl
during a route. - Implemented by declaration types to emit a proper error when a matching offer is not found in the parent.
- Implemented by declaration types to emit a proper error when a matching expose is not found in the child.
- Visitor pattern trait for visiting all
ExposeDecl
during a route. - Visitor pattern trait for visiting all
OfferDecl
during a route.
Functions§
- Routes a capability from its
Expose
declaration to its source by followingExpose
declarations. - Routes a capability from its
Offer
declaration to its source by followingOffer
andExpose
declarations. - Routes a capability from its environment
Registration
declaration to its source by followingOffer
andExpose
declarations. - Routes a capability from its
Use
declaration to its source by capabilities declarations, i.e. whatever capabilities that this component itself provides. - Routes a capability from a capability name to its source by capabilities declarations, i.e. whatever capabilities that this component itself provides.
- Routes a capability from its
Use
declaration to its source by followingOffer
andExpose
declarations.