pub struct Prefix {
pub bytes: Vec<u8>,
pub offsets: Vec<u64>,
pub file_len: u64,
}Expand description
The header + config + section-table region of a snapshot: everything before the first section body. Small and bounded (kilobytes), so it is materialized even when the bodies stream.
Fields§
§bytes: Vec<u8>The prefix bytes, ready to write. The file-hash field is left zero;
the caller patches it via SnapshotSink::patch once the
whole body has streamed through the running hash.
offsets: Vec<u64>Absolute byte offset of each section body, in metas order.
file_len: u64Total file length (aligned end of the last section).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Prefix
impl RefUnwindSafe for Prefix
impl Send for Prefix
impl Sync for Prefix
impl Unpin for Prefix
impl UnsafeUnpin for Prefix
impl UnwindSafe for Prefix
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