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 Offers, and then the chain of Exposes. Similarly,
route_from_registration starts from a registration of a capability into an environment, then
walks the Offers and Exposes.
You can also start walking from halfway in this chain, e.g. route_from_offer, route_from_expose.
Structs§
- Expose
- The
Exposephase of routing. - Noop
Visitor - Offer
- The
Offerphase of routing. - Registration
- The environment
Registrationphase of routing. - Route
Bundle Iter - Immutable iterator over a
RouteBundle. Thisstructis 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
CapabilityDeclduring 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
ExposeDeclduring a route. - Offer
Visitor - Visitor pattern trait for visiting all
OfferDeclduring a route.
Functions§
- find_
matching_ exposes - find_
matching_ offers - route_
from_ expose - Routes a capability from its
Exposedeclaration to its source by followingExposedeclarations. - route_
from_ offer - Routes a capability from its
Offerdeclaration to its source by followingOfferandExposedeclarations. - route_
from_ registration - Routes a capability from its environment
Registrationdeclaration to its source by followingOfferandExposedeclarations. - route_
from_ self - Routes a capability from its
Usedeclaration 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
Usedeclaration to its source by followingOfferandExposedeclarations.