pub struct Config {
pub websocket: WebSocketConfig,
pub tcp: Config,
}Fields§
§websocket: WebSocketConfig§tcp: ConfigImplementations§
Source§impl Config
impl Config
pub fn new() -> Self
Sourcepub fn read_buffer_size(self, read_buffer_size: usize) -> Self
pub fn read_buffer_size(self, read_buffer_size: usize) -> Self
Sourcepub fn write_buffer_size(self, write_buffer_size: usize) -> Self
pub fn write_buffer_size(self, write_buffer_size: usize) -> Self
Sourcepub fn max_write_buffer_size(self, max_write_buffer_size: usize) -> Self
pub fn max_write_buffer_size(self, max_write_buffer_size: usize) -> Self
Sourcepub fn max_message_size(self, max_message_size: Option<usize>) -> Self
pub fn max_message_size(self, max_message_size: Option<usize>) -> Self
Sourcepub fn max_frame_size(self, max_frame_size: Option<usize>) -> Self
pub fn max_frame_size(self, max_frame_size: Option<usize>) -> Self
Set Self::max_frame_size.
Sourcepub fn accept_unmasked_frames(self, accept_unmasked_frames: bool) -> Self
pub fn accept_unmasked_frames(self, accept_unmasked_frames: bool) -> Self
Trait Implementations§
Source§impl Transport for Config
impl Transport for Config
type Output = RwStreamSink<BytesWebSocketStream<TcpStream>>
type Error = Error
type Dialer = Pin<Box<dyn Future<Output = Result<<Config as Transport>::Output, <Config as Transport>::Error>> + Send>>
type ListenerUpgrade = Pin<Box<dyn Future<Output = Result<RwStreamSink<BytesWebSocketStream<TcpStream>>, Error>> + Send>>
type Listener = ListenStream
fn connect(&self, addr: SocketAddr) -> Result<Self::Dialer, Self::Error>
fn listen(&self, addr: SocketAddr) -> Result<Self::Listener, Self::Error>
fn map<F, O>(self, f: F) -> Map<Self, F>
fn and_then<TMap, TFut, O>(self, f: TMap) -> AndThen<Self, TMap>
fn map_err<F, O>(self, f: F) -> MapErr<Self, F>
fn upgrade(self) -> Builder<Self>
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more