pub struct RangeFrame {
pub file_id: u32,
pub seq: u64,
pub offset: u64,
pub data: Vec<u8>,
}Expand description
A run of bytes that changed in one service file. All integers are little-endian.
Fields§
§file_id: u32§seq: u64§offset: u64§data: Vec<u8>Implementations§
Source§impl RangeFrame
impl RangeFrame
Sourcepub fn split(
file_id: u32,
seq: u64,
offset: u64,
data: &[u8],
) -> Vec<RangeFrame>
pub fn split( file_id: u32, seq: u64, offset: u64, data: &[u8], ) -> Vec<RangeFrame>
Split one changed run into frames of at most MAX_PAYLOAD bytes. All share seq.
Sourcepub fn encode(&self) -> Vec<u8> ⓘ
pub fn encode(&self) -> Vec<u8> ⓘ
Encode to wire bytes. data must be 1 to MAX_PAYLOAD bytes; use RangeFrame::split.
pub fn decode(bytes: &[u8]) -> Result<RangeFrame, FrameError>
Trait Implementations§
Source§impl Clone for RangeFrame
impl Clone for RangeFrame
Source§impl Debug for RangeFrame
impl Debug for RangeFrame
impl Eq for RangeFrame
Source§impl PartialEq for RangeFrame
impl PartialEq for RangeFrame
impl StructuralPartialEq for RangeFrame
Auto Trait Implementations§
impl Freeze for RangeFrame
impl RefUnwindSafe for RangeFrame
impl Send for RangeFrame
impl Sync for RangeFrame
impl Unpin for RangeFrame
impl UnsafeUnpin for RangeFrame
impl UnwindSafe for RangeFrame
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