Struct Security
pub struct Security {
pub tls: Option<Tls>,
pub token: Option<Token>,
}Expand description
Security settings for one side of a connection.
For a listener, tls needs a certificate and key, and its CA
(if any) makes client certificates mandatory. For a connecting side, TLS
needs a CA to verify the listener, and a certificate and key are sent
when the listener asks for them. A replica uses one value for both roles
and needs all three. The default is neither TLS nor a token.
Fields§
§tls: Option<Tls>§token: Option<Token>Implementations§
§impl Security
impl Security
pub fn from_options(options: &str) -> Result<Self>
pub fn from_options(options: &str) -> Result<Self>
Parses connection options, the part of an address after ?:
ca=PATH, cert=PATH, key=PATH, name=SERVER_NAME and
token-file=PATH, separated by &. A CA turns TLS on. Unknown keys
are refused, so a misspelt option never silently drops security.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Security
impl RefUnwindSafe for Security
impl Send for Security
impl Sync for Security
impl Unpin for Security
impl UnsafeUnpin for Security
impl UnwindSafe for Security
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