#[non_exhaustive]pub struct Ros2PrimitiveMessageDefinitionBuilder { /* private fields */ }
Expand description
A builder for Ros2PrimitiveMessageDefinition
.
Implementations§
source§impl Ros2PrimitiveMessageDefinitionBuilder
impl Ros2PrimitiveMessageDefinitionBuilder
sourcepub fn primitive_type(self, input: Ros2PrimitiveType) -> Self
pub fn primitive_type(self, input: Ros2PrimitiveType) -> Self
The primitive type (integer, floating point, boolean, etc.) for the ROS 2 primitive message definition.
This field is required.sourcepub fn set_primitive_type(self, input: Option<Ros2PrimitiveType>) -> Self
pub fn set_primitive_type(self, input: Option<Ros2PrimitiveType>) -> Self
The primitive type (integer, floating point, boolean, etc.) for the ROS 2 primitive message definition.
sourcepub fn get_primitive_type(&self) -> &Option<Ros2PrimitiveType>
pub fn get_primitive_type(&self) -> &Option<Ros2PrimitiveType>
The primitive type (integer, floating point, boolean, etc.) for the ROS 2 primitive message definition.
sourcepub fn offset(self, input: f64) -> Self
pub fn offset(self, input: f64) -> Self
The offset used to calculate the signal value. Combined with scaling, the calculation is value = raw_value * scaling + offset
.
sourcepub fn set_offset(self, input: Option<f64>) -> Self
pub fn set_offset(self, input: Option<f64>) -> Self
The offset used to calculate the signal value. Combined with scaling, the calculation is value = raw_value * scaling + offset
.
sourcepub fn get_offset(&self) -> &Option<f64>
pub fn get_offset(&self) -> &Option<f64>
The offset used to calculate the signal value. Combined with scaling, the calculation is value = raw_value * scaling + offset
.
sourcepub fn set_scaling(self, input: Option<f64>) -> Self
pub fn set_scaling(self, input: Option<f64>) -> Self
A multiplier used to decode the message.
sourcepub fn get_scaling(&self) -> &Option<f64>
pub fn get_scaling(&self) -> &Option<f64>
A multiplier used to decode the message.
sourcepub fn upper_bound(self, input: i64) -> Self
pub fn upper_bound(self, input: i64) -> Self
An optional attribute specifying the upper bound for STRING
and WSTRING
.
sourcepub fn set_upper_bound(self, input: Option<i64>) -> Self
pub fn set_upper_bound(self, input: Option<i64>) -> Self
An optional attribute specifying the upper bound for STRING
and WSTRING
.
sourcepub fn get_upper_bound(&self) -> &Option<i64>
pub fn get_upper_bound(&self) -> &Option<i64>
An optional attribute specifying the upper bound for STRING
and WSTRING
.
sourcepub fn build(self) -> Result<Ros2PrimitiveMessageDefinition, BuildError>
pub fn build(self) -> Result<Ros2PrimitiveMessageDefinition, BuildError>
Consumes the builder and constructs a Ros2PrimitiveMessageDefinition
.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for Ros2PrimitiveMessageDefinitionBuilder
impl Clone for Ros2PrimitiveMessageDefinitionBuilder
source§fn clone(&self) -> Ros2PrimitiveMessageDefinitionBuilder
fn clone(&self) -> Ros2PrimitiveMessageDefinitionBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for Ros2PrimitiveMessageDefinitionBuilder
impl Default for Ros2PrimitiveMessageDefinitionBuilder
source§fn default() -> Ros2PrimitiveMessageDefinitionBuilder
fn default() -> Ros2PrimitiveMessageDefinitionBuilder
source§impl PartialEq for Ros2PrimitiveMessageDefinitionBuilder
impl PartialEq for Ros2PrimitiveMessageDefinitionBuilder
source§fn eq(&self, other: &Ros2PrimitiveMessageDefinitionBuilder) -> bool
fn eq(&self, other: &Ros2PrimitiveMessageDefinitionBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.