pub enum RouteDecision<'a> {
Explicit {
source: &'a str,
reference: &'a str,
},
Prefix {
source: &'a str,
prefix: &'a str,
settings: &'a BTreeMap<String, Value>,
},
Default {
source: &'a str,
fallback: Option<&'a str>,
},
}Expand description
Outcome of resolving a path against a RouterConfig.
All variants borrow from the input config (lifetime 'a); the
queried path is owned by the caller and is not copied into the
decision. The caller computes the path-tail (path.strip_prefix (decision.prefix())) only when it needs to call into a source
plugin.
Variants§
Explicit
[secret."<path>"] matched — both the source and the
backend-specific reference are user-supplied.
Fields
Prefix
One of the [[route]] prefixes matched. The source plugin
is responsible for joining settings with the path tail to
produce its actual reference.
Fields
Default
No [secret] and no [[route]] matched — falls back to
[default].source. The optional fallback hint lets the
caller retry against [default].fallback when the primary
reports is_available() == NotInstalled (per ADR-021 §2
step 3).
Implementations§
Trait Implementations§
Source§impl<'a> Clone for RouteDecision<'a>
impl<'a> Clone for RouteDecision<'a>
Source§fn clone(&self) -> RouteDecision<'a>
fn clone(&self) -> RouteDecision<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for RouteDecision<'a>
impl<'a> Debug for RouteDecision<'a>
Source§impl<'a> PartialEq for RouteDecision<'a>
impl<'a> PartialEq for RouteDecision<'a>
Source§fn eq(&self, other: &RouteDecision<'a>) -> bool
fn eq(&self, other: &RouteDecision<'a>) -> bool
self and other values to be equal, and is used by ==.