pub struct StreamData {
pub stream_id: u64,
pub stream_offset: u64,
pub message_offset: Option<u16>,
pub data: Vec<u8>,
}
Expand description
stream data frame
Fields§
§stream_id: u64
stream identifier
stream_offset: u64
offset into stream
message_offset: Option<u16>
message start as offset into segment
data: Vec<u8>
segment data
Trait Implementations§
Source§impl Serialize for StreamData
impl Serialize for StreamData
Source§fn serialized_length(&self) -> usize
fn serialized_length(&self) -> usize
determine serialized length of frame
Source§fn read(buf: &[u8]) -> Result<(usize, Self), ()>
fn read(buf: &[u8]) -> Result<(usize, Self), ()>
read frame from buffer, returning frame and serialized length
Source§fn has_end_optimization() -> boolwhere
Self: Sized,
fn has_end_optimization() -> boolwhere
Self: Sized,
whether the frame has special “serialize to end” behavior
Source§impl SerializeToEnd for StreamData
impl SerializeToEnd for StreamData
Source§fn serialized_length_at_end(&self) -> usize
fn serialized_length_at_end(&self) -> usize
determine serialized length of frame at the end of the packet
Source§fn write_to_end(&self, buf: &mut [u8]) -> usize
fn write_to_end(&self, buf: &mut [u8]) -> usize
write last frame of packet to buffer, returning serialized length
Source§fn read_to_end(buf: &[u8]) -> Result<Self, ()>
fn read_to_end(buf: &[u8]) -> Result<Self, ()>
read last frame of packet from buffer, returning frame
Source§fn has_end_optimization() -> boolwhere
Self: Sized,
fn has_end_optimization() -> boolwhere
Self: Sized,
whether the frame has special “serialize to end” behavior
Auto Trait Implementations§
impl Freeze for StreamData
impl RefUnwindSafe for StreamData
impl Send for StreamData
impl Sync for StreamData
impl Unpin for StreamData
impl UnwindSafe for StreamData
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