pub struct EnvRung<'a> {
pub locator: Option<&'a str>,
pub domain_id: Option<u32>,
pub mode: Option<SessionMode>,
pub node_name: Option<&'a str>,
pub rmw: Option<&'a str>,
}Expand description
The environment rung of precedence model A, as VALUES.
issue 0687 — try_resolve used to take hosted_env: bool and read the
process environment itself, which is why this crate needed std. A rung is
a set of values, not a place they come from: the hosted edge
(nros::env::resolve_hosted) reads $NROS_LOCATOR, $ROS_DOMAIN_ID,
$NROS_SESSION_MODE, $NROS_NODE_NAME and $NROS_RMW and fills this in;
an embedded caller that wants the same precedence from some other source (a
settings partition, a Kconfig blob) can fill it too, which the bool could
never express.
None on a field means “the environment did not speak” — resolution falls
through to baked, then to the compiled default. The old bool’s
hosted_env=false is None here at the whole-rung level.
Fields§
§locator: Option<&'a str>$NROS_LOCATOR / legacy $ZENOH_LOCATOR.
domain_id: Option<u32>$ROS_DOMAIN_ID, already parsed — a malformed value is the EDGE’s
error (BootConfigError::DomainIdParse), reported before it gets
here, because only the edge knows the text.
mode: Option<SessionMode>$NROS_SESSION_MODE / legacy $ZENOH_MODE.
node_name: Option<&'a str>$NROS_NODE_NAME.
rmw: Option<&'a str>$NROS_RMW — the backend selector, resolved through
nros::rmw_selector so every reader agrees on what “unset” means.