pub struct Stored {
pub obj_type: ObjType,
pub uncompressed_size: u64,
pub extent: Extent,
pub bytes: Vec<u8>,
}Expand description
What get hands back: the stored bytes and enough type information that
they cannot be mistaken for something else.
obj_type is the entry’s type in the pack, so it may be OfsDelta or
RefDelta. That is deliberate and it is the whole reason this is a struct and
not a Vec<u8>: the verbatim bytes are the truth and the resolved object a
derived cache, and a caller handed delta bytes labelled “the object” would
silently store garbage. Labelled a delta, it cannot.
Fields§
§obj_type: ObjType§uncompressed_size: u64Post-resolution size — what the object inflates to once its chain is
applied, which is not bytes.len() for a delta.
extent: ExtentWhere these bytes live.
bytes: Vec<u8>The bytes as stored: the pack entry, header and all, byte for byte as the client sent them.
Trait Implementations§
impl Eq for Stored
impl StructuralPartialEq for Stored
Auto Trait Implementations§
impl Freeze for Stored
impl RefUnwindSafe for Stored
impl Send for Stored
impl Sync for Stored
impl Unpin for Stored
impl UnsafeUnpin for Stored
impl UnwindSafe for Stored
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