pub enum SecurityMode {
Plain,
Signed,
AuthCrypt,
AnonCrypt,
Any,
}Expand description
Security mode for message packing and unpacking.
Defines the level of protection applied to messages:
Plain: No encryption or signing (insecure, only for testing)Signed: Message is signed but not encrypted (integrity protected)AuthCrypt: Message is authenticated and encrypted (confidentiality + integrity, sender revealed)AnonCrypt: Message is anonymously encrypted (confidentiality only, sender hidden)Any: Accept any security mode when unpacking (only used for receiving)
Variants§
Plain
Plaintext - no encryption or signatures
Signed
Signed - message is signed but not encrypted
AuthCrypt
Authenticated and Encrypted - message is both signed and encrypted (sender revealed)
AnonCrypt
Anonymous Encrypted - message is encrypted but not signed (sender hidden)
Any
Any security mode - used for unpacking when any mode is acceptable
Trait Implementations§
Source§impl Clone for SecurityMode
impl Clone for SecurityMode
Source§fn clone(&self) -> SecurityMode
fn clone(&self) -> SecurityMode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SecurityMode
impl Debug for SecurityMode
Source§impl PartialEq for SecurityMode
impl PartialEq for SecurityMode
impl Copy for SecurityMode
impl Eq for SecurityMode
impl StructuralPartialEq for SecurityMode
Auto Trait Implementations§
impl Freeze for SecurityMode
impl RefUnwindSafe for SecurityMode
impl Send for SecurityMode
impl Sync for SecurityMode
impl Unpin for SecurityMode
impl UnsafeUnpin for SecurityMode
impl UnwindSafe for SecurityMode
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.