#[repr(i32)]pub enum WellKnownFrameEncoding {
Unspecified = 0,
Ros1 = 1,
Cdr = 2,
Protobuf = 3,
Flatbuffer = 4,
Cbor = 5,
Msgpack = 6,
Json = 7,
}Expand description
Well-known encoding for frame payloads.
Mirrors the well-known message encodings from the MCAP spec: https://mcap.dev/spec/registry#message-encodings
Variants§
Unspecified = 0
Ros1 = 1
ROS 1: must be described by ROS1_MSG schema encoding.
Cdr = 2
CDR: must be described by ROS2_MSG, ROS2_IDL, or OMG_IDL schema encoding.
Protobuf = 3
Protocol Buffer: must be described by PROTOBUF schema encoding.
Flatbuffer = 4
FlatBuffer: must be described by FLATBUFFER schema encoding.
Cbor = 5
CBOR: self-describing.
Msgpack = 6
MessagePack: self-describing.
Json = 7
JSON: self-describing or described by JSON_SCHEMA schema encoding.
Implementations§
Source§impl WellKnownFrameEncoding
impl WellKnownFrameEncoding
Sourcepub fn is_valid(value: i32) -> bool
pub fn is_valid(value: i32) -> bool
Returns true if value is a variant of WellKnownFrameEncoding.
Sourcepub fn from_i32(value: i32) -> Option<WellKnownFrameEncoding>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<WellKnownFrameEncoding>
Use the TryFrom<i32> implementation instead
Converts an i32 to a WellKnownFrameEncoding, or None if value is not a valid variant.
Source§impl WellKnownFrameEncoding
impl WellKnownFrameEncoding
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for WellKnownFrameEncoding
impl Clone for WellKnownFrameEncoding
Source§fn clone(&self) -> WellKnownFrameEncoding
fn clone(&self) -> WellKnownFrameEncoding
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more