pub(crate) struct Framing {
pub(crate) version: Version,
pub(crate) base64: bool,
}Expand description
How the messages of a WebSocket session look.
Fields§
§version: Version§base64: boolWhether the payloads are base64 encoded in text messages, see
channel.
Implementations§
Source§impl Framing
impl Framing
Sourcepub(crate) fn negotiate<'a>(
requested: impl IntoIterator<Item = &'a str>,
) -> Option<(Self, Option<&'static str>)>
pub(crate) fn negotiate<'a>( requested: impl IntoIterator<Item = &'a str>, ) -> Option<(Self, Option<&'static str>)>
The framing for the subprotocols the client requested, in the order of the client, with the subprotocol the server answers with.
Sourcepub(crate) fn message(self, channel: u8, data: &[u8]) -> Message
pub(crate) fn message(self, channel: u8, data: &[u8]) -> Message
A message of the server on a channel.
Sourcepub(crate) fn event(self, message: Message) -> Option<ClientEvent>
pub(crate) fn event(self, message: Message) -> Option<ClientEvent>
What a message of the client means, none for one which needs no handling. Like for Kubernetes, text messages carry the same as binary ones, also for v5, its server does not look at the type.
Trait Implementations§
impl Copy for Framing
impl StructuralPartialEq for Framing
Auto Trait Implementations§
impl Freeze for Framing
impl RefUnwindSafe for Framing
impl Send for Framing
impl Sync for Framing
impl Unpin for Framing
impl UnsafeUnpin for Framing
impl UnwindSafe for Framing
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].