pub struct ServerBuilder<H> { /* private fields */ }Expand description
Builder for configuring and creating a server.
Implementations§
Source§impl<H: MessageHandler> ServerBuilder<H>
impl<H: MessageHandler> ServerBuilder<H>
Sourcepub fn bind(self, addr: SocketAddr) -> Self
pub fn bind(self, addr: SocketAddr) -> Self
Sets the bind address.
Sourcepub fn max_connections(self, max: usize) -> Self
pub fn max_connections(self, max: usize) -> Self
Sets the maximum number of connections.
Sourcepub fn max_frame_size(self, size: usize) -> Self
pub fn max_frame_size(self, size: usize) -> Self
Sets the maximum frame size.
Sourcepub fn channel_capacity(self, capacity: usize) -> Self
pub fn channel_capacity(self, capacity: usize) -> Self
Sets the channel capacity.
Sourcepub fn build(self) -> (Server<H>, ServerHandle)
pub fn build(self) -> (Server<H>, ServerHandle)
Trait Implementations§
Source§impl<H: MessageHandler> Default for ServerBuilder<H>
impl<H: MessageHandler> Default for ServerBuilder<H>
Auto Trait Implementations§
impl<H> Freeze for ServerBuilder<H>where
H: Freeze,
impl<H> RefUnwindSafe for ServerBuilder<H>where
H: RefUnwindSafe,
impl<H> Send for ServerBuilder<H>where
H: Send,
impl<H> Sync for ServerBuilder<H>where
H: Sync,
impl<H> Unpin for ServerBuilder<H>where
H: Unpin,
impl<H> UnwindSafe for ServerBuilder<H>where
H: UnwindSafe,
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