pub trait BoardConfig {
// Required methods
fn locator(&self) -> &str;
fn domain_id(&self) -> u32;
// Provided method
fn zenoh_locator(&self) -> &str { ... }
}Expand description
Universal board configuration accessors.
Implemented by every board crate’s top-level config struct
(Config, NodeConfig, etc.). Generic code that needs to read the
transport locator or the ROS 2 domain ID can take &impl BoardConfig
instead of cfg-gating on each board type.
Required Methods§
Sourcefn locator(&self) -> &str
fn locator(&self) -> &str
Transport locator string the RMW backend connects through
(e.g. "tcp/192.168.1.50:7447", "serial/UART_0#baudrate=115200",
"ivc/2").
The name matches the RMW vtable’s own locator parameter and
ExecutorConfig::new. It is deliberately backend-neutral: this is a
core, RMW-agnostic trait, so it must not name a concrete backend
(issue 0330 — the same class as issue 0225).
Provided Methods§
Sourcefn zenoh_locator(&self) -> &str
👎Deprecated since 0.6.0: renamed to locator() — the core trait must not name a backend (issue 0330)
fn zenoh_locator(&self) -> &str
renamed to locator() — the core trait must not name a backend (issue 0330)
Deprecated alias for locator.
Kept as a defaulted method (not a required one) so out-of-tree board crates that still spell the old name keep compiling: they get the forwarding default for free once they rename their own impl, and callers of the old name keep working with a deprecation warning.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".