#[non_exhaustive]pub struct Capabilities {
pub client_pings: bool,
pub sees_server_pings: bool,
pub handshake_headers: bool,
}Expand description
What a SocketTransport can do.
A protocol reads it to choose how it keeps a connection alive: a transport that cannot send a ping frame gets an application-level ping, and one that never shows the server’s ping frames cannot count them as liveness.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.client_pings: boolWhether the client can send ping and pong frames.
sees_server_pings: boolWhether the server’s ping frames reach the reader as messages.
handshake_headers: boolWhether the handshake request may carry headers beyond the ones the WebSocket protocol generates.
Informational: nothing in the tree reads it. A transport without it
refuses a handshake header with Kind::Unsupported when it dials.
Implementations§
Trait Implementations§
Source§impl Clone for Capabilities
impl Clone for Capabilities
impl Copy for Capabilities
Source§impl Debug for Capabilities
impl Debug for Capabilities
impl Eq for Capabilities
Source§impl PartialEq for Capabilities
impl PartialEq for Capabilities
impl StructuralPartialEq for Capabilities
Auto Trait Implementations§
impl Freeze for Capabilities
impl RefUnwindSafe for Capabilities
impl Send for Capabilities
impl Sync for Capabilities
impl Unpin for Capabilities
impl UnsafeUnpin for Capabilities
impl UnwindSafe for Capabilities
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