pub struct ServerBuilder { /* private fields */ }Expand description
Server builder
Implementations§
Source§impl ServerBuilder
impl ServerBuilder
Sourcepub fn bind<A: ToSocketAddrs>(self, addr: A) -> Result<Self>
pub fn bind<A: ToSocketAddrs>(self, addr: A) -> Result<Self>
Bind to the given address
Sourcepub fn max_connections(self, max: usize) -> Self
pub fn max_connections(self, max: usize) -> Self
Set maximum connections
Sourcepub fn max_frame_size(self, size: usize) -> Self
pub fn max_frame_size(self, size: usize) -> Self
Set maximum frame size
Sourcepub fn max_message_size(self, size: usize) -> Self
pub fn max_message_size(self, size: usize) -> Self
Set maximum message size
Sourcepub fn handshake_timeout(self, timeout: Duration) -> Self
pub fn handshake_timeout(self, timeout: Duration) -> Self
Set handshake timeout
Sourcepub fn idle_timeout(self, timeout: Duration) -> Self
pub fn idle_timeout(self, timeout: Duration) -> Self
Set idle timeout
Sourcepub fn compression(self, enabled: bool) -> Self
pub fn compression(self, enabled: bool) -> Self
Enable/disable compression
Sourcepub fn backpressure(self, strategy: BackpressureStrategy) -> Self
pub fn backpressure(self, strategy: BackpressureStrategy) -> Self
Set backpressure strategy
Trait Implementations§
Source§impl Clone for ServerBuilder
impl Clone for ServerBuilder
Source§fn clone(&self) -> ServerBuilder
fn clone(&self) -> ServerBuilder
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 moreSource§impl Debug for ServerBuilder
impl Debug for ServerBuilder
Auto Trait Implementations§
impl Freeze for ServerBuilder
impl RefUnwindSafe for ServerBuilder
impl Send for ServerBuilder
impl Sync for ServerBuilder
impl Unpin for ServerBuilder
impl UnwindSafe for ServerBuilder
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