pub struct CompressedList<T: VbyteEncode> {
pub compressed_data: Vec<u8>,
/* private fields */
}Expand description
A compressed sequence of values of type T.
Obtained via VbyteEncode::compress or the free compress function.
Fields§
§compressed_data: Vec<u8>Implementations§
Source§impl<T: VbyteEncode> CompressedList<T>
impl<T: VbyteEncode> CompressedList<T>
Sourcepub fn get_compressed_bytes(&self) -> &[u8] ⓘ
pub fn get_compressed_bytes(&self) -> &[u8] ⓘ
Returns the raw compressed bytes.
Sourcepub fn decompress(&self) -> Result<Vec<T>, &'static str>
pub fn decompress(&self) -> Result<Vec<T>, &'static str>
Decodes all values from the compressed buffer.
Auto Trait Implementations§
impl<T> Freeze for CompressedList<T>where
PhantomData<T>: Freeze,
impl<T> RefUnwindSafe for CompressedList<T>where
PhantomData<T>: RefUnwindSafe,
impl<T> Send for CompressedList<T>where
PhantomData<T>: Send,
impl<T> Sync for CompressedList<T>where
PhantomData<T>: Sync,
impl<T> Unpin for CompressedList<T>where
PhantomData<T>: Unpin,
impl<T> UnsafeUnpin for CompressedList<T>where
PhantomData<T>: UnsafeUnpin,
impl<T> UnwindSafe for CompressedList<T>where
PhantomData<T>: 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