#[repr(i32)]pub enum WellKnownSchemaEncoding {
Unspecified = 0,
Protobuf = 1,
Flatbuffer = 2,
Ros1Msg = 3,
Ros2Msg = 4,
Ros2Idl = 5,
OmgIdl = 6,
JsonSchema = 7,
}Expand description
Well-known encoding for schema definition.
Mirrors the well-known schema encodings from the MCAP spec: https://mcap.dev/spec/registry#schema-encodings
Variants§
Unspecified = 0
Protobuf = 1
Protocol Buffer IDL: describes PROTOBUF frame encoding.
Flatbuffer = 2
FlatBuffer IDL: describes FLATBUFFER frame encoding.
Ros1Msg = 3
ROS 1 Message: describes ROS1 frame encoding.
Ros2Msg = 4
ROS 2 Message: describes CDR frame encoding.
Ros2Idl = 5
ROS 2 IDL: describes CDR frame encoding.
OmgIdl = 6
OMG IDL: describes CDR frame encoding.
JsonSchema = 7
JSON Schema: describes JSON frame encoding.
Implementations§
Source§impl WellKnownSchemaEncoding
impl WellKnownSchemaEncoding
Sourcepub fn is_valid(value: i32) -> bool
pub fn is_valid(value: i32) -> bool
Returns true if value is a variant of WellKnownSchemaEncoding.
Sourcepub fn from_i32(value: i32) -> Option<WellKnownSchemaEncoding>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<WellKnownSchemaEncoding>
Use the TryFrom<i32> implementation instead
Converts an i32 to a WellKnownSchemaEncoding, or None if value is not a valid variant.
Source§impl WellKnownSchemaEncoding
impl WellKnownSchemaEncoding
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 WellKnownSchemaEncoding
impl Clone for WellKnownSchemaEncoding
Source§fn clone(&self) -> WellKnownSchemaEncoding
fn clone(&self) -> WellKnownSchemaEncoding
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more