pub struct CodecOptions {
pub fast_one_parity: bool,
pub inversion_cache: bool,
pub inversion_cache_capacity: usize,
pub codec_family: CodecFamily,
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();Fields§
§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.
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
Source§fn eq(&self, other: &CodecOptions) -> bool
fn eq(&self, other: &CodecOptions) -> bool
self and other values to be equal, and is used by ==.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