#[non_exhaustive]pub struct CodecOptions {
pub fast_one_parity: bool,
pub inversion_cache: bool,
pub inversion_cache_capacity: usize,
pub codec_family: CodecFamily,
pub leopard_mode: LeopardMode,
pub matrix_mode: MatrixMode,
pub max_parallel_jobs: usize,
}Expand description
Configuration options for constructing a ReedSolomon codec.
Use CodecOptions::default() for sensible defaults, or the builder methods:
use rustfs_erasure_codec::core::{CodecOptions, CodecFamily};
let opts = CodecOptions::builder()
.codec_family(CodecFamily::LeopardGF8)
.fast_one_parity(true)
.build();CodecOptions is #[non_exhaustive]: construct it from
CodecOptions::default() (optionally with ..Default::default() in a
struct-update expression) or via the builder, not
with an exhaustive struct literal. This lets future fields be added without a
breaking change.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.fast_one_parity: boolWhen true and parity shard count is 1, use XOR-only fast path instead of
full matrix multiplication. Default: false.
inversion_cache: boolWhen true, cache the inverted decode matrix for repeated reconstruction
with the same erasure pattern. Default: true.
inversion_cache_capacity: usizeCapacity of the inversion cache (LRU). 0 means automatic sizing based on
shard counts. Default: 0.
codec_family: CodecFamilyThe codec algorithm family to use. Default: CodecFamily::Classic.
leopard_mode: LeopardModeOptional automatic Leopard selection when codec_family is
CodecFamily::Classic. Default: LeopardMode::Disabled (no
auto-selection; behaviour identical to prior releases). See LeopardMode.
matrix_mode: MatrixModeThe matrix construction strategy (only used for CodecFamily::Classic).
Default: MatrixMode::Vandermonde.
max_parallel_jobs: usizeMaximum number of parallel jobs for encode/decode operations.
0 means automatic (uses available_parallelism()). Default: 0.
Implementations§
Source§impl CodecOptions
impl CodecOptions
Trait Implementations§
Source§impl Clone for CodecOptions
impl Clone for CodecOptions
Source§fn clone(&self) -> CodecOptions
fn clone(&self) -> CodecOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CodecOptions
Source§impl Debug for CodecOptions
impl Debug for CodecOptions
Source§impl Default for CodecOptions
impl Default for CodecOptions
impl Eq for CodecOptions
Source§impl PartialEq for CodecOptions
impl PartialEq for CodecOptions
impl StructuralPartialEq for CodecOptions
Auto Trait Implementations§
impl Freeze for CodecOptions
impl RefUnwindSafe for CodecOptions
impl Send for CodecOptions
impl Sync for CodecOptions
impl Unpin for CodecOptions
impl UnsafeUnpin for CodecOptions
impl UnwindSafe for CodecOptions
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<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>
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>
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