pub struct NomadServerBuilder { /* private fields */ }Available on crate feature
server only.Expand description
Builder for creating a NomadServer.
Implementations§
Source§impl NomadServerBuilder
impl NomadServerBuilder
Sourcepub fn bind_addr(self, addr: SocketAddr) -> Self
pub fn bind_addr(self, addr: SocketAddr) -> Self
Set the bind address.
Sourcepub fn private_key(self, key: [u8; 32]) -> Self
pub fn private_key(self, key: [u8; 32]) -> Self
Set the server’s private key.
Sourcepub fn max_sessions(self, max: usize) -> Self
pub fn max_sessions(self, max: usize) -> Self
Set the maximum number of concurrent sessions.
Sourcepub fn session_timeout(self, timeout: Duration) -> Self
pub fn session_timeout(self, timeout: Duration) -> Self
Set the session timeout.
Sourcepub fn compression(self, enabled: bool) -> Self
pub fn compression(self, enabled: bool) -> Self
Enable or disable compression.
Sourcepub fn build(self) -> ServerConfig
pub fn build(self) -> ServerConfig
Build the server configuration.
Trait Implementations§
Source§impl Debug for NomadServerBuilder
impl Debug for NomadServerBuilder
Auto Trait Implementations§
impl Freeze for NomadServerBuilder
impl RefUnwindSafe for NomadServerBuilder
impl Send for NomadServerBuilder
impl Sync for NomadServerBuilder
impl Unpin for NomadServerBuilder
impl UnwindSafe for NomadServerBuilder
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