pub struct Stored {
pub obj_type: ObjType,
pub uncompressed_size: u64,
pub extent: (u64, u64),
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: (u64, u64)Where 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§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.