pub struct Signature {
pub link_id: SignedLinkId,
pub timestamp: MavTimestamp,
pub value: SignatureValue,
}
Expand description
Fields§
§link_id: SignedLinkId
ID
of link on which packet is sent.
timestamp: MavTimestamp
Timestamp in 10 microsecond units since the beginning of MAVLink epoch (1st January 2015 GMT).
value: SignatureValue
Value of a signature.
Implementations§
source§impl Signature
impl Signature
sourcepub fn link_id(&self) -> SignedLinkId
pub fn link_id(&self) -> SignedLinkId
Signature link_id
is an 8-bit identifier of a MAVLink channel.
Peers may have different semantics or rules for different links. For example, some links may have higher priority over another during routing. Or even different secret keys for authorization.
sourcepub fn timestamp(&self) -> MavTimestamp
pub fn timestamp(&self) -> MavTimestamp
Signature MavTimestamp
is a 48-bit value that specifies the moment when message was sent.
The unit of measurement is the number of millisecond * 10 since MAVLink epoch (1st January 2015 GMT).
According to MAVLink protocol, the sender must guarantee that the next timestamp is greater than the previous one.
§Links
MavTimestamp
struct.- Timestamp handling in MAVLink documentation.
sourcepub fn value(&self) -> SignatureValue
pub fn value(&self) -> SignatureValue
Signature value
is cryptographic 48-bit hash that depends on the entire frame content.
§Links
- Signature specification in MAVLink docs.
sourcepub fn from_byte_array(bytes: SignatureBytes) -> Self
pub fn from_byte_array(bytes: SignatureBytes) -> Self
Decodes an array of bytes into Signature
.
sourcepub fn to_byte_array(&self) -> SignatureBytes
pub fn to_byte_array(&self) -> SignatureBytes
Encodes Signature
into SignatureBytes
byte array.
Used in From<MavLinkV2Signature>
trait implementation for SignatureBytes
.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Signature
impl<'de> Deserialize<'de> for Signature
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl From<[u8; 13]> for Signature
impl From<[u8; 13]> for Signature
source§fn from(value: SignatureBytes) -> Self
fn from(value: SignatureBytes) -> Self
impl Copy for Signature
Auto Trait Implementations§
impl Freeze for Signature
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)