pub struct ParamAssignment {
pub node_name: Option<String>,
pub name: String,
pub value: Yaml,
}Expand description
Represents a parameter assignment
Parameters can be either global (applying to all nodes) or node-specific. Values are stored as YAML types to preserve type information.
§Examples
- Global:
use_sim_time:=true - Node-specific:
my_node:use_sim_time:=true
Fields§
§node_name: Option<String>Optional node name to target (None means applies to all nodes)
name: StringParameter name
value: YamlParameter value (stored as YAML value to preserve type information)
Implementations§
Source§impl ParamAssignment
impl ParamAssignment
Sourcepub fn new_global(name: String, value: Yaml) -> Self
pub fn new_global(name: String, value: Yaml) -> Self
Create a new global parameter assignment
Sourcepub fn new_node_specific(node_name: String, name: String, value: Yaml) -> Self
pub fn new_node_specific(node_name: String, name: String, value: Yaml) -> Self
Create a new node-specific parameter assignment
Sourcepub fn applies_to_node(&self, node_name: &str) -> bool
pub fn applies_to_node(&self, node_name: &str) -> bool
Check if this parameter applies to a specific node
Trait Implementations§
Source§impl Clone for ParamAssignment
impl Clone for ParamAssignment
Source§fn clone(&self) -> ParamAssignment
fn clone(&self) -> ParamAssignment
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParamAssignment
impl Debug for ParamAssignment
Source§impl PartialEq for ParamAssignment
impl PartialEq for ParamAssignment
impl StructuralPartialEq for ParamAssignment
Auto Trait Implementations§
impl Freeze for ParamAssignment
impl RefUnwindSafe for ParamAssignment
impl Send for ParamAssignment
impl Sync for ParamAssignment
impl Unpin for ParamAssignment
impl UnsafeUnpin for ParamAssignment
impl UnwindSafe for ParamAssignment
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more