Struct ws::Builder [] [src]

pub struct Builder {
    // some fields omitted
}

Utility for constructing a WebSocket from various settings.

Methods

impl Builder
[src]

fn new() -> Builder

Create a new Builder with default settings.

fn build<F>(&self, factory: F) -> Result<WebSocket<F>> where F: Factory

Build a WebSocket using this builder and a factory. It is possible to use the same builder to create multiple WebSockets.

fn with_config(&mut self, config: EventLoopConfig) -> &mut Builder

Set the EventLoopConfig to use with this WebSocket. If this is not set the builder will use a default EventLoopConfig based on other settings.

fn with_settings(&mut self, settings: Settings) -> &mut Builder

Set the WebSocket settings to use.

Trait Implementations

impl Debug for Builder
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.