routing

Module legacy_router

Source
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§

Enums§

  • A bundle of one or more routing declarations to route together, that share the same target_name

Traits§

Functions§

  • Routes a capability from its Expose declaration to its source by following Expose declarations.
  • Routes a capability from its Offer declaration to its source by following Offer and Expose declarations.
  • Routes a capability from its environment Registration declaration to its source by following Offer and Expose 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 following Offer and Expose declarations.