Struct rusty_leveldb_arc::CompressorList
source · pub struct CompressorList(_);
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<&Box<dyn Compressor + 'static>>
Trait Implementations§
Auto Trait Implementations§
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