1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//! # Rust core interfaces for MAVSpec
//!
//! <span style="font-size:24px">[🇺🇦](https://mavka.gitlab.io/home/a_note_on_the_war_in_ukraine/)</span>
//! [![`repository`](https://img.shields.io/gitlab/pipeline-status/mavka/libs/mavspec.svg?branch=main&label=repository)](https://gitlab.com/mavka/libs/mavspec)
//! [![`crates.io`](https://img.shields.io/crates/v/mavspec.svg)](https://crates.io/crates/mavspec)
//! [![`docs.rs`](https://img.shields.io/docsrs/mavspec.svg?label=docs.rs)](https://docs.rs/mavspec/latest/mavspec/)
//! [![`issues`](https://img.shields.io/gitlab/issues/open/mavka/libs/mavspec.svg)](https://gitlab.com/mavka/libs/mavspec/-/issues/)
//!
//! This crate provides interfaces for [MAVLink](https://mavlink.io/en/) dialect definitions generated by
//! [MAVSpec](https://gitlab.com/mavka/libs/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.

#![warn(missing_docs)]
#![deny(rustdoc::broken_intra_doc_links)]
#![doc(
    html_logo_url = "https://gitlab.com/mavka/libs/mavspec/-/raw/main/avatar.png?ref_type=heads",
    html_favicon_url = "https://gitlab.com/mavka/libs/mavspec/-/raw/main/avatar.png?ref_type=heads"
)]
#![cfg_attr(not(feature = "std"), no_std)]

pub mod consts;
mod dialect;
mod error;
mod message;
mod payload;
pub mod types;

pub use bitflags;
pub use tbytes;

pub use dialect::{Dialect, DialectSpec};
pub use error::SpecError;
pub use message::{Message, MessageInfo, MessageSpec, MessageSpecStatic};
pub use payload::{IntoPayload, Payload};
#[doc(inline)]
pub use types::MavLinkVersion;