pub struct Segment {
pub start: usize,
pub offset: usize,
}Expand description
A point in a decoder’s buffer from which the stream offset restarts.
The byte at index start of the buffer is at stream offset offset,
and the bytes after it follow on, until the next segment. This
describes a message joined from fragments whose contents are aligned
relative to each fragment rather than to the joined message.
Fields§
§start: usizeIndex of the first byte of the segment in the buffer.
offset: usizeStream offset of that byte.
Trait Implementations§
impl Copy for Segment
impl Eq for Segment
impl StructuralPartialEq for Segment
Auto Trait Implementations§
impl Forget for Segment
impl Freeze for Segment
impl RefUnwindSafe for Segment
impl Send for Segment
impl Sync for Segment
impl Unpin for Segment
impl UnsafeUnpin for Segment
impl UnwindSafe for Segment
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