pub enum CodecName {
None,
JPEG,
Zlib,
LZ4,
Blosc,
BSLZ4,
LZ4HDF5,
}Expand description
Codec names for compressed NDArray data (matching C++ NDCodecName).
Variants§
None
JPEG
Zlib
Zlib (deflate) compression (C++ NDCODEC_ZLIB).
LZ4
Blosc
BSLZ4
LZ4HDF5
LZ4 in the HDF5 framing variant (C++ NDCODEC_LZ4HDF5).
Implementations§
Source§impl CodecName
impl CodecName
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
Codec name string as published in the EPICS CODEC parameter and the
NDArray.codec.name field (matching C++ NDCodecName).
Sourcepub fn ordinal(self) -> i32
pub fn ordinal(self) -> i32
Value of the COMPRESSOR parameter that selects this codec, i.e. C
NDCodecCompressor_t (Codec.h:12-18): NONE=0, JPEG=1, BLOSC=2, LZ4=3,
BSLZ4=4. The Rust-only zlib/lz4hdf5 codecs take ordinals after the C set
so they never shadow a C ordinal.
This is the single mapping between the COMPRESSOR wire value and the
codec, used both when the operator writes the parameter and when the
Codec plugin reports the codec it found on a decompressed array
(C setIntegerParam(NDCodecCompressor, ...), NDPluginCodec.cpp:734-757).
Sourcepub fn from_ordinal(ordinal: i32) -> Self
pub fn from_ordinal(ordinal: i32) -> Self
Inverse of CodecName::ordinal. Unknown ordinals select None, as C
does for any compressor value outside the enum (NDPluginCodec.cpp:680-683
case NDCODEC_NONE: default:).
Trait Implementations§
impl Copy for CodecName
impl Eq for CodecName
impl StructuralPartialEq for CodecName
Auto Trait Implementations§
impl Freeze for CodecName
impl RefUnwindSafe for CodecName
impl Send for CodecName
impl Sync for CodecName
impl Unpin for CodecName
impl UnsafeUnpin for CodecName
impl UnwindSafe for CodecName
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.