Crate mavspec_rust_spec

Source
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.

§Incompatible Features

  • Specta requires std feature to be enabled.

Re-exports§

pub use bitflags;
pub use tbytes;

Modules§

consts
Constants
types
Tiny types and type aliases

Structs§

DialectSpec
Dialect specification.
MessageInfo
Generic information about MAVLink message.
Payload
MAVlink message payload.

Enums§

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

Traits§

Dialect
Interface for autogenerated or custom MAVLink dialect specification.
IntoPayload
MAVLink message encoder.
Message
MAVLink message implementation.
MessageSpec
Generic MAVLink message specification.
MessageSpecStatic
Generic MAVLink message specification with constant functions.