pub struct WebsocketFrameDecoderAddDataResult {
pub consumed_bytes: usize,
pub event: Option<WebsocketFrameEvent>,
}
Expand description
Return value of WebsocketFrameDecoder::add_data
call.
Fields§
§consumed_bytes: usize
Indicates how many bytes were consumed and should not be supplied again to
the subsequent invocation of WebsocketFrameDecoder::add_data
.
When add_data
procudes WebsocketFrameEvent::PayloadChunk
, it also indicated how many
of the bytes in the buffer (starting from 0) should be used as a part of payload.
event: Option<WebsocketFrameEvent>
Emitted event, if any.
Trait Implementations§
Source§impl Clone for WebsocketFrameDecoderAddDataResult
impl Clone for WebsocketFrameDecoderAddDataResult
Source§fn clone(&self) -> WebsocketFrameDecoderAddDataResult
fn clone(&self) -> WebsocketFrameDecoderAddDataResult
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for WebsocketFrameDecoderAddDataResult
impl RefUnwindSafe for WebsocketFrameDecoderAddDataResult
impl Send for WebsocketFrameDecoderAddDataResult
impl Sync for WebsocketFrameDecoderAddDataResult
impl Unpin for WebsocketFrameDecoderAddDataResult
impl UnwindSafe for WebsocketFrameDecoderAddDataResult
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