pub struct FilterRegistry { /* private fields */ }Expand description
A registry of filter implementations.
Comes pre-loaded with deflate, shuffle, and fletcher32. Users can register additional filters (e.g., Blosc, LZ4, ZFP) before reading datasets.
Implementations§
Source§impl FilterRegistry
impl FilterRegistry
Sourcepub fn register(&mut self, id: u16, f: FilterFn)
pub fn register(&mut self, id: u16, f: FilterFn)
Register a custom filter implementation for the given filter ID.
Overwrites any previously registered filter with the same ID.
Sourcepub fn apply(
&self,
filter: &FilterDescription,
data: &[u8],
element_size: usize,
) -> Result<Vec<u8>>
pub fn apply( &self, filter: &FilterDescription, data: &[u8], element_size: usize, ) -> Result<Vec<u8>>
Apply a single filter by ID.
Sourcepub fn apply_with_limit(
&self,
filter: &FilterDescription,
data: &[u8],
element_size: usize,
max_output_len: Option<usize>,
) -> Result<Vec<u8>>
pub fn apply_with_limit( &self, filter: &FilterDescription, data: &[u8], element_size: usize, max_output_len: Option<usize>, ) -> Result<Vec<u8>>
Apply a single filter by ID, passing a maximum decoded output length to built-in filters that can enforce it while decoding.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for FilterRegistry
impl !UnwindSafe for FilterRegistry
impl Freeze for FilterRegistry
impl Send for FilterRegistry
impl Sync for FilterRegistry
impl Unpin for FilterRegistry
impl UnsafeUnpin for FilterRegistry
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more