pub struct AcceptOptions {
pub allow_implicit_codec: bool,
}Expand description
Options controlling how the handshake picks a subprotocol to echo when the
handler’s selector declines (see accept_with_options).
Fields§
§allow_implicit_codec: boolWhen the selector returns None and the client did not offer
DEFAULT_SUBPROTOCOL (h2ts), accept the client’s first offered
subprotocol (or, if it offered none, complete with no subprotocol)
instead of rejecting the handshake.
Off by default: a client that speaks neither h2ts nor a
handler-selected protocol is rejected with
WebSocketError::UnsupportedSubprotocol. Turn this on for a
codec-agnostic tunnel that accepts whatever framing the client offered
(e.g. a raw/binary tunnel, or a websockify-style binary client).
Trait Implementations§
Source§impl Clone for AcceptOptions
impl Clone for AcceptOptions
Source§fn clone(&self) -> AcceptOptions
fn clone(&self) -> AcceptOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AcceptOptions
Source§impl Debug for AcceptOptions
impl Debug for AcceptOptions
Source§impl Default for AcceptOptions
impl Default for AcceptOptions
Source§fn default() -> AcceptOptions
fn default() -> AcceptOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AcceptOptions
impl RefUnwindSafe for AcceptOptions
impl Send for AcceptOptions
impl Sync for AcceptOptions
impl Unpin for AcceptOptions
impl UnsafeUnpin for AcceptOptions
impl UnwindSafe for AcceptOptions
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