pub struct ServerConfigBuilder { /* private fields */ }Expand description
Builder for ServerConfig.
Implementations§
Source§impl ServerConfigBuilder
impl ServerConfigBuilder
Sourcepub fn with_rustls(self, config: Arc<ServerConfig>) -> Result<Self>
pub fn with_rustls(self, config: Arc<ServerConfig>) -> Result<Self>
Uses an already configured Rustls server configuration.
Sourcepub fn with_transport_config(
self,
configure: impl FnOnce(&mut TransportConfig),
) -> Self
pub fn with_transport_config( self, configure: impl FnOnce(&mut TransportConfig), ) -> Self
Applies transport settings before building the server configuration.
Sourcepub fn with_max_concurrent_connections(self, max: usize) -> Self
pub fn with_max_concurrent_connections(self, max: usize) -> Self
Sets the maximum number of concurrent active connections.
Sourcepub fn with_migration(self, enable: bool) -> Self
pub fn with_migration(self, enable: bool) -> Self
Enables or disables connection migration support.
Sourcepub fn with_preferred_address(self, addr: SocketAddr) -> Self
pub fn with_preferred_address(self, addr: SocketAddr) -> Self
Sets the server preferred address (RFC 9000 §18.2).
Sourcepub fn build(self) -> Result<ServerConfig>
pub fn build(self) -> Result<ServerConfig>
Builds the server configuration.
Trait Implementations§
Source§impl Default for ServerConfigBuilder
impl Default for ServerConfigBuilder
Source§fn default() -> ServerConfigBuilder
fn default() -> ServerConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ServerConfigBuilder
impl !UnwindSafe for ServerConfigBuilder
impl Freeze for ServerConfigBuilder
impl Send for ServerConfigBuilder
impl Sync for ServerConfigBuilder
impl Unpin for ServerConfigBuilder
impl UnsafeUnpin for ServerConfigBuilder
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