pub enum WireFrame {
Text(String),
Bytes(Vec<u8>),
}Expand description
One transport frame, after framing but before decoding.
The transport layer (SSE framer, NDJSON splitter, websocket reader) owns byte splitting and yields these; a decoder never splits bytes.
Variants§
Text(String)
Text payload, such as an SSE data: field or WebSocket message.
Bytes(Vec<u8>)
Byte payload, such as an NDJSON line or binary frame.
Implementations§
Trait Implementations§
impl Eq for WireFrame
impl StructuralPartialEq for WireFrame
Auto Trait Implementations§
impl Freeze for WireFrame
impl RefUnwindSafe for WireFrame
impl Send for WireFrame
impl Sync for WireFrame
impl Unpin for WireFrame
impl UnsafeUnpin for WireFrame
impl UnwindSafe for WireFrame
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