pub struct MessageStructure {
pub fields: Vec<MessageFieldInfo>,
pub size: usize,
pub namespace: String,
pub type_name: String,
}Expand description
A description of the structure of a message.
Namely, the list of fields and their types.
Fields§
§fields: Vec<MessageFieldInfo>The set of fields in the message, ordered by their offset in the message.
A Vec is easier to handle and faster than a HashMap for typical numbers of message fields.
If you need a HashMap, simply create your own from this Vec.
size: usizeThe size of this structure in bytes.
namespace: StringThe namespace of this type. This is something like geometry_msgs__msg.
type_name: StringThe name of this type. This does not contain the package name.
Implementations§
Source§impl MessageStructure
impl MessageStructure
Sourcepub fn get_field_info(&self, field_name: &str) -> Option<&MessageFieldInfo>
pub fn get_field_info(&self, field_name: &str) -> Option<&MessageFieldInfo>
Gets the field info corresponding to the specified field name, if any.
Trait Implementations§
Source§impl Clone for MessageStructure
impl Clone for MessageStructure
Source§fn clone(&self) -> MessageStructure
fn clone(&self) -> MessageStructure
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 MessageStructure
impl Debug for MessageStructure
Source§impl PartialEq for MessageStructure
impl PartialEq for MessageStructure
impl Eq for MessageStructure
impl StructuralPartialEq for MessageStructure
Auto Trait Implementations§
impl Freeze for MessageStructure
impl RefUnwindSafe for MessageStructure
impl Send for MessageStructure
impl Sync for MessageStructure
impl Unpin for MessageStructure
impl UnwindSafe for MessageStructure
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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