pub struct ServerConfigBuilder { /* private fields */ }Expand description
Builder for ServerConfig.
Implementations§
Source§impl ServerConfigBuilder
impl ServerConfigBuilder
Sourcepub fn max_frame_size(self, value: usize) -> Self
pub fn max_frame_size(self, value: usize) -> Self
Set the maximum total frame size (bytes).
Sourcepub fn max_bulk_len(self, value: usize) -> Self
pub fn max_bulk_len(self, value: usize) -> Self
Set the maximum bulk string length (bytes).
Sourcepub fn max_array_len(self, value: usize) -> Self
pub fn max_array_len(self, value: usize) -> Self
Set the maximum array length (elements).
Sourcepub fn max_inflight_requests(self, value: usize) -> Self
pub fn max_inflight_requests(self, value: usize) -> Self
Set the maximum number of buffered in-flight requests.
Sourcepub fn max_connections(self, value: usize) -> Self
pub fn max_connections(self, value: usize) -> Self
Set the maximum number of concurrent connections.
Sourcepub fn read_timeout(self, value: Option<Duration>) -> Self
pub fn read_timeout(self, value: Option<Duration>) -> Self
Set the read timeout for socket reads.
Sourcepub fn write_timeout(self, value: Option<Duration>) -> Self
pub fn write_timeout(self, value: Option<Duration>) -> Self
Set the write timeout for socket writes.
Sourcepub fn idle_timeout(self, value: Option<Duration>) -> Self
pub fn idle_timeout(self, value: Option<Duration>) -> Self
Set the idle timeout for connections.
Sourcepub fn push_queue_len(self, value: usize) -> Self
pub fn push_queue_len(self, value: usize) -> Self
Set the push queue length.
Sourcepub fn response_queue_len(self, value: usize) -> Self
pub fn response_queue_len(self, value: usize) -> Self
Set the response queue length.
Sourcepub fn write_batch_bytes(self, value: usize) -> Self
pub fn write_batch_bytes(self, value: usize) -> Self
Set the write batch size (bytes).
Sourcepub fn tcp_nodelay(self, value: bool) -> Self
pub fn tcp_nodelay(self, value: bool) -> Self
Enable or disable TCP_NODELAY.
Sourcepub fn backlog(self, value: Option<u32>) -> Self
pub fn backlog(self, value: Option<u32>) -> Self
Set the listener backlog (may be ignored depending on platform).
Sourcepub fn build(self) -> ServerConfig
pub fn build(self) -> ServerConfig
Finalize the configuration.
Trait Implementations§
Source§impl Clone for ServerConfigBuilder
impl Clone for ServerConfigBuilder
Source§fn clone(&self) -> ServerConfigBuilder
fn clone(&self) -> ServerConfigBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ServerConfigBuilder
impl RefUnwindSafe for ServerConfigBuilder
impl Send for ServerConfigBuilder
impl Sync for ServerConfigBuilder
impl Unpin for ServerConfigBuilder
impl UnwindSafe 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