Enum garage_model::block::DataBlock [−][src]
Expand description
A possibly compressed block of data
Variants
Plain(Vec<u8>)
Uncompressed data
Compressed(Vec<u8>)
Data compressed with zstd
Implementations
Query whether this block is compressed
Get the inner, possibly compressed buffer. You should probably use DataBlock::verify_get
instead
Get the buffer, possibly decompressing it, and verify it’s integrity. For Plain block, data is compared to hash, for Compressed block, zstd checksumming system is used instead.
Verify data integrity. Allocate less than DataBlock::verify_get
and don’t consume self, but
does not return the buffer content.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for DataBlock
impl UnwindSafe for DataBlock
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more