pub struct DataObject<B: ByteSlice> {
pub header: Ref<B, DataObjectHeader>,
pub payload: DataPayloadType<B>,
}Fields§
§header: Ref<B, DataObjectHeader>§payload: DataPayloadType<B>Implementations§
Source§impl<B: ByteSlice> DataObject<B>
impl<B: ByteSlice> DataObject<B>
pub fn raw_payload(&self) -> &[u8] ⓘ
pub fn inlined_cursor(&self) -> Option<InlinedCursor>
pub fn is_compressed(&self) -> bool
pub fn xz_compressed(&self) -> bool
pub fn lz4_compressed(&self) -> bool
pub fn zstd_compressed(&self) -> bool
pub fn decompress(&self, buf: &mut Vec<u8>) -> Result<usize>
Trait Implementations§
Source§impl<B: ByteSlice> Debug for DataObject<B>
impl<B: ByteSlice> Debug for DataObject<B>
Source§impl<B: ByteSlice> HashableObject for DataObject<B>
impl<B: ByteSlice> HashableObject for DataObject<B>
Source§fn raw_payload(&self) -> &[u8] ⓘ
fn raw_payload(&self) -> &[u8] ⓘ
Get the payload data for matching
Source§fn is_compressed(&self) -> bool
fn is_compressed(&self) -> bool
Check if the payload is compressed
Source§fn decompress(&self, buf: &mut Vec<u8>) -> Result<usize>
fn decompress(&self, buf: &mut Vec<u8>) -> Result<usize>
Decompress the payload into the provided buffer.
Returns the number of decompressed bytes.
Source§fn next_hash_offset(&self) -> Option<NonZeroU64>
fn next_hash_offset(&self) -> Option<NonZeroU64>
Get the offset to the next object in the hash chain
Source§fn object_type() -> ObjectType
fn object_type() -> ObjectType
Get the object type
Auto Trait Implementations§
impl<B> Freeze for DataObject<B>where
B: Freeze,
impl<B> RefUnwindSafe for DataObject<B>where
B: RefUnwindSafe,
impl<B> Send for DataObject<B>where
B: Send,
impl<B> Sync for DataObject<B>where
B: Sync,
impl<B> Unpin for DataObject<B>where
B: Unpin,
impl<B> UnsafeUnpin for DataObject<B>where
B: UnsafeUnpin,
impl<B> UnwindSafe for DataObject<B>where
B: UnwindSafe,
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