#[non_exhaustive]#[repr(i32)]pub enum SecurityMechanism {
Null,
Plain {
username: String,
password: String,
},
CurveClient {
server_key: Vec<u8>,
public_key: Vec<u8>,
secret_key: Vec<u8>,
},
CurveServer {
secret_key: Vec<u8>,
},
GssApiClient {
service_principal: String,
},
GssApiServer,
}Expand description
§0MQ security mechanisms
A 0MQ socket can select a security mechanism. Both peers must use the same security mechanism.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Null
Null security
Plain
Plain-textauthentication using username and password
CurveClient
Available on
zmq_has=curve only.Elliptic curve client authentication and encryption
CurveServer
Available on
zmq_has=curve only.Elliptic curve server authentication and encryption
GssApiClient
Available on
zmq_has=gssapi only.GSSAPI client authentication and encryption
GssApiServer
Available on
zmq_has=gssapi only.GSSAPI server authentication and encryption
Implementations§
Trait Implementations§
Source§impl Clone for SecurityMechanism
impl Clone for SecurityMechanism
Source§fn clone(&self) -> SecurityMechanism
fn clone(&self) -> SecurityMechanism
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SecurityMechanism
impl Debug for SecurityMechanism
Source§impl Default for SecurityMechanism
impl Default for SecurityMechanism
Source§fn default() -> SecurityMechanism
fn default() -> SecurityMechanism
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SecurityMechanism
impl<'de> Deserialize<'de> for SecurityMechanism
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for SecurityMechanism
impl Display for SecurityMechanism
impl Eq for SecurityMechanism
Source§impl Hash for SecurityMechanism
impl Hash for SecurityMechanism
Source§impl PartialEq for SecurityMechanism
impl PartialEq for SecurityMechanism
Source§fn eq(&self, other: &SecurityMechanism) -> bool
fn eq(&self, other: &SecurityMechanism) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SecurityMechanism
impl Serialize for SecurityMechanism
impl StructuralPartialEq for SecurityMechanism
Auto Trait Implementations§
impl Freeze for SecurityMechanism
impl RefUnwindSafe for SecurityMechanism
impl Send for SecurityMechanism
impl Sync for SecurityMechanism
impl Unpin for SecurityMechanism
impl UnsafeUnpin for SecurityMechanism
impl UnwindSafe for SecurityMechanism
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