pub struct Config { /* private fields */ }Available on crate feature
ws only.Expand description
Configuration for compio-ws.
§API Interface
_with_config functions in this crate accept impl Into<Config>, so
following are all valid:
ConfigWebSocketConfig(use custom WebSocket config with default remaining settings)None(use default value)
Implementations§
Source§impl Config
impl Config
Sourcepub fn websocket_config(&self) -> Option<&WebSocketConfig>
pub fn websocket_config(&self) -> Option<&WebSocketConfig>
Get the WebSocket configuration.
Sourcepub fn disable_nagle(self, disable: bool) -> Config
pub fn disable_nagle(self, disable: bool) -> Config
Disable Nagle’s algorithm, i.e. set_nodelay(true).
Default to false. If you don’t know what the Nagle’s algorithm is,
better leave it to false.
Trait Implementations§
Source§impl From<WebSocketConfig> for Config
impl From<WebSocketConfig> for Config
Source§fn from(config: WebSocketConfig) -> Config
fn from(config: WebSocketConfig) -> Config
Converts to this type from the input type.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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