pub enum MavSTX {
V1,
V2,
Unknown(u8),
}Expand description
mavio
Packet start marker.
Protocol-specific start-of-text (STX) marker used to indicate the beginning of a new packet.
Any system that does not understand protocol version will skip the packet.
See:
Variants§
V1
Designates MAVLink 1 protocol, equals to STX_V1.
V2
Designates MAVLink 2 protocol, equals to STX_V2.
Unknown(u8)
Unknown protocol.
Implementations§
Source§impl MavSTX
impl MavSTX
Sourcepub fn is_magic_byte(value: u8) -> bool
pub fn is_magic_byte(value: u8) -> bool
Checks that value represents MAVLink magic (start-of-text) byte.
Sourcepub fn to_mavlink_version(&self) -> Option<MavLinkVersion>
pub fn to_mavlink_version(&self) -> Option<MavLinkVersion>
Attempt to convert MavSTX into MavLinkVersion. Otherwise, returns None.
Trait Implementations§
impl Copy for MavSTX
Source§impl<'de> Deserialize<'de> for MavSTX
impl<'de> Deserialize<'de> for MavSTX
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<MavSTX, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<MavSTX, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Flatten for MavSTX
Source§impl From<MavLinkVersion> for MavSTX
impl From<MavLinkVersion> for MavSTX
Source§fn from(value: MavLinkVersion) -> MavSTX
fn from(value: MavLinkVersion) -> MavSTX
Creates MavSTX from MavLinkVersion.
Source§impl From<MavSTX> for Option<MavLinkVersion>
impl From<MavSTX> for Option<MavLinkVersion>
Source§fn from(value: MavSTX) -> Option<MavLinkVersion>
fn from(value: MavSTX) -> Option<MavLinkVersion>
Converts MavSTX into Option<MavLinkVersion>.
Source§impl NamedType for MavSTX
impl NamedType for MavSTX
fn sid() -> SpectaID
Source§fn named_data_type(
type_map: &mut TypeCollection,
generics: &[DataType],
) -> NamedDataType
fn named_data_type( type_map: &mut TypeCollection, generics: &[DataType], ) -> NamedDataType
this is equivalent to Type::inline but returns a NamedDataType instead.
Source§fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
this is equivalent to [Type::definition] but returns a NamedDataType instead.
Source§impl Serialize for MavSTX
impl Serialize for MavSTX
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl Type for MavSTX
impl Type for MavSTX
Source§fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
Returns the definition of a type using the provided generics. Read more
Source§fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
Generates a datatype corresponding to a reference to this type,
as determined by its category. Getting a reference to a type implies that
it should belong in the type map (since it has to be referenced from somewhere),
so the output of
definition will be put into the type map.Auto Trait Implementations§
impl Freeze for MavSTX
impl RefUnwindSafe for MavSTX
impl Send for MavSTX
impl Sync for MavSTX
impl Unpin for MavSTX
impl UnsafeUnpin for MavSTX
impl UnwindSafe for MavSTX
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