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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
//! Common types.
//!
//! Some of the types has been reexported from [MAVSpec](https://crates.io/crates/mavspec) for
//! convenience.
use crate;
/// <sup>[`mavspec`](https://crates.io/crates/mavspec)</sup>
pub use ;
/// Packet sequence number.
pub type Sequence = u8;
/// Payload length.
pub type PayloadLength = u8;
/// MAVLink packet checksum.
///
/// MAVLink checksum is encoded with little endian (low byte, high byte).
///
/// # Links
///
/// * [`Frame::checksum`](crate::Frame::checksum).
/// * [`Frame::calculate_crc`](crate::Frame::calculate_crc).
pub type Checksum = u16;
/// `MAVLink 1` header as array of bytes.
pub type HeaderV1Bytes = ;
/// `MAVLink 2` header as array of bytes.
pub type HeaderV2Bytes = ;
/// `MAVLink 2` signature as array of bytes.
///
/// # Links
///
/// * [`Signature`](crate::protocol::Signature).
/// * [MAVLink 2 message signing](https://mavlink.io/en/guide/message_signing.html).
pub type SignatureBytes = ;
/// `MAVLink 2` signed link `ID`.
///
/// Link `ID` is an identifier of a communication channel in
/// [MAVLink 2 message signing](https://mavlink.io/en/guide/message_signing.html) protocol.
///
/// # Links
///
/// * [`Signature`](crate::protocol::Signature).
pub type SignedLinkId = u8;
/// `MAVLink 2` signature timestamp.
///
/// # Links
///
/// * [`Signature`](crate::protocol::Signature).
/// * `tm.timestamp` field in [MAVLink 2 message signing](https://mavlink.io/en/guide/message_signing.html).
pub type SignatureTimestampBytes = ;
/// `MAVLink 2` signature value.
///
/// # Links
///
/// * [`Signature`](crate::protocol::Signature).
/// * `signature` field in [MAVLink 2 message signing](https://mavlink.io/en/guide/message_signing.html).
pub type SignatureValue = ;
/// Return type for operations which require attention from the caller.
///
/// Such operations may lead to data corruption or return data that may be misleading in some
/// circumstances. In other scenarios, [`Behold`] marks seemingly "innocent" methods or functions,
/// that perform costly operations, clone large amounts of data, or spawn treads. By any means, this
/// is just a reminder for the caller that certain aspects of the operation require their close
/// attention.
///
/// In some sense, [`Behold`] serves as an opinionated replacement for a relatively widespread
/// practice of marking with `unsafe` methods and functions that, while being safe from the Rust
/// perspective, still require certain care from the caller. We've decided to refrain from such
/// practice since: (a) some projects may restrict using unsafe Rust, (b) our use cases do not
/// strictly coincide with operations, that may lead to undecided behavior (even in wider sense).
///
/// Once [`Behold`] is obtained, the caller can either explicitly accept the consequences,
/// retrieving the result by calling [`Behold::unwrap`], or discard the value with
/// [`Behold::discard`].
;