pub struct CompressorList(/* private fields */);Expand description
Customize compressor method for leveldb
Default value is like the code below
let mut list = CompressorList::new();
list.set(compressor::NoneCompressor);
list.set(compressor::SnappyCompressor);Implementations§
Source§impl CompressorList
impl CompressorList
Sourcepub fn set<T>(&mut self, compressor: T)where
T: Compressor + CompressorId + 'static,
pub fn set<T>(&mut self, compressor: T)where
T: Compressor + CompressorId + 'static,
Set compressor with the id in CompressorId trait
Sourcepub fn set_with_id(&mut self, id: u8, compressor: impl Compressor + 'static)
pub fn set_with_id(&mut self, id: u8, compressor: impl Compressor + 'static)
Set compressor with id
pub fn is_set(&self, id: u8) -> bool
pub fn get(&self, id: u8) -> Result<&dyn Compressor>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CompressorList
impl !RefUnwindSafe for CompressorList
impl !Send for CompressorList
impl !Sync for CompressorList
impl Unpin for CompressorList
impl !UnwindSafe for CompressorList
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