Expand description

§Rust core interfaces for MAVSpec

🇺🇦 repository crates.io docs.rs issues

This crate provides interfaces for MAVLink dialect definitions generated by MAVSpec.

Entities generated by MAVSpec-Rust depend on these interfaces. This crate also re-exports several 3rd party libraries to simplify dependency management.

§Payload

Payload encapsulates MAVLink message payload and additional meta information required for encoding and decoding. This struct depends on alloc conditional compilation feature.

IntoPayload trait is implemented by objects which are capable to transform themselves into MAVLink payload.

§Message

MessageSpec trait should be implemented by objects which carry information about a message.

Message trait corresponds to a concrete message implementation which both are MessageSpec and IntoPayload.

§Dialect

DialectSpec trait is implemented by dialect specifications. It contains metadata like dialect name, dialect ID, dialect capabilities, or minor dialect version. It also exposes DialectSpec::message_info method which provides message specifications for dialect messages.

§Types & Conventions

Modules consts and types provide constants, type aliases, enums and wrapper types. The entities are intended to grasp MAVLink protocol conventions and provide semantic meaning for otherwise unclear types and magic numbers.

§Errors

All fallible functions and methods return SpecError on failure.

Re-exports§

Modules§

Structs§

Enums§

  • MAVLink protocol version.
  • Errors related to MAVLink message specification and encoding/decoding.

Traits§

  • Interface for autogenerated or custom MAVLink dialect specification.
  • MAVLink message encoder.
  • MAVLink message implementation.
  • Generic MAVLink message specification.
  • Generic MAVLink message specification with constant functions.