#[non_exhaustive]pub struct Ros2PrimitiveMessageDefinition {
pub primitive_type: Ros2PrimitiveType,
pub offset: Option<f64>,
pub scaling: Option<f64>,
pub upper_bound: Option<i64>,
}Expand description
Represents a ROS 2 compliant primitive type message of the complex data structure.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.primitive_type: Ros2PrimitiveTypeThe primitive type (integer, floating point, boolean, etc.) for the ROS 2 primitive message definition.
offset: Option<f64>The offset used to calculate the signal value. Combined with scaling, the calculation is value = raw_value * scaling + offset.
scaling: Option<f64>A multiplier used to decode the message.
upper_bound: Option<i64>An optional attribute specifying the upper bound for STRING and WSTRING.
Implementations§
source§impl Ros2PrimitiveMessageDefinition
impl Ros2PrimitiveMessageDefinition
sourcepub fn primitive_type(&self) -> &Ros2PrimitiveType
pub fn primitive_type(&self) -> &Ros2PrimitiveType
The primitive type (integer, floating point, boolean, etc.) for the ROS 2 primitive message definition.
sourcepub fn offset(&self) -> Option<f64>
pub fn 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 upper_bound(&self) -> Option<i64>
pub fn upper_bound(&self) -> Option<i64>
An optional attribute specifying the upper bound for STRING and WSTRING.
source§impl Ros2PrimitiveMessageDefinition
impl Ros2PrimitiveMessageDefinition
sourcepub fn builder() -> Ros2PrimitiveMessageDefinitionBuilder
pub fn builder() -> Ros2PrimitiveMessageDefinitionBuilder
Creates a new builder-style object to manufacture Ros2PrimitiveMessageDefinition.
Trait Implementations§
source§impl Clone for Ros2PrimitiveMessageDefinition
impl Clone for Ros2PrimitiveMessageDefinition
source§fn clone(&self) -> Ros2PrimitiveMessageDefinition
fn clone(&self) -> Ros2PrimitiveMessageDefinition
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl PartialEq for Ros2PrimitiveMessageDefinition
impl PartialEq for Ros2PrimitiveMessageDefinition
source§fn eq(&self, other: &Ros2PrimitiveMessageDefinition) -> bool
fn eq(&self, other: &Ros2PrimitiveMessageDefinition) -> bool
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for Ros2PrimitiveMessageDefinition
Auto Trait Implementations§
impl Freeze for Ros2PrimitiveMessageDefinition
impl RefUnwindSafe for Ros2PrimitiveMessageDefinition
impl Send for Ros2PrimitiveMessageDefinition
impl Sync for Ros2PrimitiveMessageDefinition
impl Unpin for Ros2PrimitiveMessageDefinition
impl UnwindSafe for Ros2PrimitiveMessageDefinition
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more