#[repr(u8)]pub enum FramePolicy {
Lenient = 0,
Strict = 1,
}Expand description
How a protocol adapter treats a frame it cannot decode as a msgtrans packet.
The default is Lenient, preserving the historical WebSocket/QUIC behavior
of delivering undecodable bytes as a raw one-way message. Strict treats
such frames as a protocol error and closes the connection (matching how the
TCP adapter already handles a malformed first packet).
Variants§
Lenient = 0
Deliver undecodable bytes as a raw one-way message (default).
Strict = 1
Treat undecodable frames as a protocol error and close the connection.
Trait Implementations§
Source§impl Clone for FramePolicy
impl Clone for FramePolicy
Source§fn clone(&self) -> FramePolicy
fn clone(&self) -> FramePolicy
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 FramePolicy
Source§impl Debug for FramePolicy
impl Debug for FramePolicy
Source§impl Default for FramePolicy
impl Default for FramePolicy
Source§fn default() -> FramePolicy
fn default() -> FramePolicy
Returns the “default value” for a type. Read more
impl Eq for FramePolicy
Source§impl From<u8> for FramePolicy
impl From<u8> for FramePolicy
Source§impl PartialEq for FramePolicy
impl PartialEq for FramePolicy
impl StructuralPartialEq for FramePolicy
Auto Trait Implementations§
impl Freeze for FramePolicy
impl RefUnwindSafe for FramePolicy
impl Send for FramePolicy
impl Sync for FramePolicy
impl Unpin for FramePolicy
impl UnsafeUnpin for FramePolicy
impl UnwindSafe for FramePolicy
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