pub struct NomadClientBuilder { /* private fields */ }Available on crate feature
client only.Expand description
Builder for creating a NomadClient.
Implementations§
Source§impl NomadClientBuilder
impl NomadClientBuilder
Sourcepub fn server_addr(self, addr: SocketAddr) -> Self
pub fn server_addr(self, addr: SocketAddr) -> Self
Set the server address.
Sourcepub fn server_public_key(self, key: [u8; 32]) -> Self
pub fn server_public_key(self, key: [u8; 32]) -> Self
Set the server’s public key.
Sourcepub fn client_private_key(self, key: [u8; 32]) -> Self
pub fn client_private_key(self, key: [u8; 32]) -> Self
Set the client’s private key.
Sourcepub fn connect_timeout(self, timeout: Duration) -> Self
pub fn connect_timeout(self, timeout: Duration) -> Self
Set the connection timeout.
Sourcepub fn compression(self, enabled: bool) -> Self
pub fn compression(self, enabled: bool) -> Self
Enable or disable compression.
Sourcepub fn build(self) -> ClientConfig
pub fn build(self) -> ClientConfig
Build the client configuration.
Trait Implementations§
Source§impl Debug for NomadClientBuilder
impl Debug for NomadClientBuilder
Auto Trait Implementations§
impl Freeze for NomadClientBuilder
impl RefUnwindSafe for NomadClientBuilder
impl Send for NomadClientBuilder
impl Sync for NomadClientBuilder
impl Unpin for NomadClientBuilder
impl UnwindSafe for NomadClientBuilder
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