Skip to main content

ClientConfigBuilder

Struct ClientConfigBuilder 

Source
pub struct ClientConfigBuilder { /* private fields */ }
Expand description

Builder for client configuration

Implementations§

Source§

impl ClientConfigBuilder

Source

pub fn new(name: &str, remote_host: &str) -> Self

Create a new builder

Source

pub fn port(self, port: u16) -> Self

Set remote port

Source

pub fn protocol(self, proto: &str) -> Self

Set protocol

Source

pub fn ca_cert(self, cert: &str) -> Self

Set CA certificate

Source

pub fn client_cert(self, cert: &str) -> Self

Set client certificate

Source

pub fn client_key(self, key: &str) -> Self

Set client private key

Source

pub fn tls_auth(self, key: &str, direction: u8) -> Self

Set tls-auth key

Source

pub fn tls_crypt(self, key: &str) -> Self

Set tls-crypt key

Source

pub fn cipher(self, cipher: &str) -> Self

Set cipher

Source

pub fn extra_option(self, opt: &str) -> Self

Add extra option

Source

pub fn build(self) -> ClientConfig

Build the configuration

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V