pub struct ServerBuilder { /* private fields */ }Expand description
Builder for WebSocket server.
Implementations§
Source§impl ServerBuilder
impl ServerBuilder
Sourcepub fn max_connections(self, max: usize) -> Self
pub fn max_connections(self, max: usize) -> Self
Set maximum connections.
Sourcepub fn message_buffer_size(self, size: usize) -> Self
pub fn message_buffer_size(self, size: usize) -> Self
Set message buffer size.
Sourcepub fn default_format(self, format: MessageFormat) -> Self
pub fn default_format(self, format: MessageFormat) -> Self
Set default message format.
Sourcepub fn default_compression(self, compression: Compression) -> Self
pub fn default_compression(self, compression: Compression) -> Self
Set default compression.
Sourcepub fn enable_cors(self, enable: bool) -> Self
pub fn enable_cors(self, enable: bool) -> Self
Enable CORS.
Sourcepub fn build(self) -> WebSocketServer
pub fn build(self) -> WebSocketServer
Build the server.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ServerBuilder
impl RefUnwindSafe for ServerBuilder
impl Send for ServerBuilder
impl Sync for ServerBuilder
impl Unpin for ServerBuilder
impl UnsafeUnpin 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