pub enum SignStrategy {
Sign,
ReSign,
Strict,
Proxy,
Strip,
}Expand description
serde | specta
Message signing strategy.
Defines how message signing will be applied.
By default, the SignStrategy::Sign strategy will be applied.
Variants§
Sign
Apply message signing for all messages. Sign unsigned messages.
Unsigned messages will be signed. Messages with incorrect signature will be rejected.
For messages with unknown links the main link_id and key will be used for
validation.
When set as a strategy for unknown_links, then valid messages with unknown links will
keep their signature for ReSign outgoing / incoming strategies.
Versionless frames of MAVLink 1 protocol will be passed without change.
ReSign
Enforce message signing for all messages. Re-sign messages with correct signing using the
main link_id and key.
Unsigned messages will be signed. Messages with incorrect signature will be rejected.
For messages with unknown links the main link_id and key will be used for
validation.
When set as a strategy for unknown_links, then valid messages with unknown links will
be re-signed for both Sign and ReSign outgoing / incoming strategies using the main
link_id and key.
Versionless frames of MAVLink 1 protocol will be passed without change.
Strict
Apply message signing for all messages. Reject messages without signing or with incorrect signatures.
Unsigned messages will be rejected. Messages with incorrect signature will be rejected.
Messages with unknown links will be rejected.
When set as a strategy for unknown_links, then messages with unknown links
(even when valid) will be considered invalid for Sign and ReSign incoming / outgoing
strategies.
Versionless frames of MAVLink 1 protocol will be rejected.
Proxy
Pass messages as they are.
Strip
Strip any signing information from messages.
Trait Implementations§
Source§impl Clone for SignStrategy
impl Clone for SignStrategy
Source§fn clone(&self) -> SignStrategy
fn clone(&self) -> SignStrategy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SignStrategy
Source§impl Debug for SignStrategy
impl Debug for SignStrategy
Source§impl Default for SignStrategy
impl Default for SignStrategy
Source§fn default() -> SignStrategy
fn default() -> SignStrategy
Source§impl<'de> Deserialize<'de> for SignStrategy
impl<'de> Deserialize<'de> for SignStrategy
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>,
impl Eq for SignStrategy
Source§impl NamedType for SignStrategy
impl NamedType for SignStrategy
fn sid() -> SpectaID
Source§fn named_data_type(
type_map: &mut TypeCollection,
generics: &[DataType],
) -> NamedDataType
fn named_data_type( type_map: &mut TypeCollection, generics: &[DataType], ) -> NamedDataType
Source§fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
Source§impl PartialEq for SignStrategy
impl PartialEq for SignStrategy
Source§fn eq(&self, other: &SignStrategy) -> bool
fn eq(&self, other: &SignStrategy) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for SignStrategy
impl Serialize for SignStrategy
impl StructuralPartialEq for SignStrategy
Source§impl Type for SignStrategy
impl Type for SignStrategy
Source§fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
Source§fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
definition will be put into the type map.Auto Trait Implementations§
impl Freeze for SignStrategy
impl RefUnwindSafe for SignStrategy
impl Send for SignStrategy
impl Sync for SignStrategy
impl Unpin for SignStrategy
impl UnsafeUnpin for SignStrategy
impl UnwindSafe for SignStrategy
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.