pub struct CodecOptions { /* private fields */ }Expand description
Codec options for encoding/decoding.
The default values are:
validate_checksums:truestore_empty_chunks:falseconcurrent_target: number of threads available to Rayonchunk_concurrent_minimum:4experimental_partial_encoding:false
Implementations§
Source§impl CodecOptions
impl CodecOptions
Sourcepub fn validate_checksums(&self) -> bool
pub fn validate_checksums(&self) -> bool
Return the validate checksums setting.
Sourcepub fn set_validate_checksums(&mut self, validate_checksums: bool) -> &mut Self
pub fn set_validate_checksums(&mut self, validate_checksums: bool) -> &mut Self
Set whether or not to validate checksums.
Sourcepub fn with_validate_checksums(self, validate_checksums: bool) -> Self
pub fn with_validate_checksums(self, validate_checksums: bool) -> Self
Set whether or not to validate checksums.
Sourcepub fn store_empty_chunks(&self) -> bool
pub fn store_empty_chunks(&self) -> bool
Return the store empty chunks setting.
Sourcepub fn set_store_empty_chunks(&mut self, store_empty_chunks: bool) -> &mut Self
pub fn set_store_empty_chunks(&mut self, store_empty_chunks: bool) -> &mut Self
Set whether or not to store empty chunks.
Sourcepub fn with_store_empty_chunks(self, store_empty_chunks: bool) -> Self
pub fn with_store_empty_chunks(self, store_empty_chunks: bool) -> Self
Set whether or not to store empty chunks.
Sourcepub fn concurrent_target(&self) -> usize
pub fn concurrent_target(&self) -> usize
Return the concurrent target.
Sourcepub fn set_concurrent_target(&mut self, concurrent_target: usize) -> &mut Self
pub fn set_concurrent_target(&mut self, concurrent_target: usize) -> &mut Self
Set the concurrent target.
Sourcepub fn with_concurrent_target(self, concurrent_target: usize) -> Self
pub fn with_concurrent_target(self, concurrent_target: usize) -> Self
Set the concurrent target.
Sourcepub fn chunk_concurrent_minimum(&self) -> usize
pub fn chunk_concurrent_minimum(&self) -> usize
Return the chunk concurrent minimum.
Array operations involving multiple chunks can tune the chunk and codec concurrency to improve performance/reduce memory usage. This option sets the preferred minimum chunk concurrency. The concurrency of internal codecs is adjusted to accomodate for the chunk concurrency in accordance with the concurrent target.
Sourcepub fn set_chunk_concurrent_minimum(
&mut self,
chunk_concurrent_minimum: usize,
) -> &mut Self
pub fn set_chunk_concurrent_minimum( &mut self, chunk_concurrent_minimum: usize, ) -> &mut Self
Set the chunk concurrent minimum.
Sourcepub fn with_chunk_concurrent_minimum(
self,
chunk_concurrent_minimum: usize,
) -> Self
pub fn with_chunk_concurrent_minimum( self, chunk_concurrent_minimum: usize, ) -> Self
Set the chunk concurrent minimum.
Sourcepub fn experimental_partial_encoding(&self) -> bool
pub fn experimental_partial_encoding(&self) -> bool
Return the experimental partial encoding setting.
Sourcepub fn set_experimental_partial_encoding(
&mut self,
experimental_partial_encoding: bool,
) -> &mut Self
pub fn set_experimental_partial_encoding( &mut self, experimental_partial_encoding: bool, ) -> &mut Self
Set whether or not to use experimental partial encoding.
Sourcepub fn with_experimental_partial_encoding(
self,
experimental_partial_encoding: bool,
) -> Self
pub fn with_experimental_partial_encoding( self, experimental_partial_encoding: bool, ) -> Self
Set whether or not to use experimental partial encoding.
Trait Implementations§
Source§impl Clone for CodecOptions
impl Clone for CodecOptions
Source§fn clone(&self) -> CodecOptions
fn clone(&self) -> CodecOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CodecOptions
impl Debug for CodecOptions
Source§impl Default for CodecOptions
impl Default for CodecOptions
impl Copy for CodecOptions
Auto Trait Implementations§
impl Freeze for CodecOptions
impl Send for CodecOptions
impl Sync for CodecOptions
impl RefUnwindSafe for CodecOptions
impl Unpin 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<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