pub struct ZstdOptions {
pub level: Option<i32>,
pub checksum: bool,
pub dictionary_id: Option<u32>,
pub frame_kind: ZstdFrameKind,
}Expand description
Zstd option metadata.
Fields§
§level: Option<i32>Numeric zstd compression level, when specified by the caller.
checksum: boolWhether a checksum should be described as present.
dictionary_id: Option<u32>Optional dictionary identifier.
frame_kind: ZstdFrameKindFrame shape label.
Implementations§
Source§impl ZstdOptions
impl ZstdOptions
Sourcepub const fn new() -> ZstdOptions
pub const fn new() -> ZstdOptions
Creates default zstd option metadata.
Sourcepub const fn with_level(self, level: i32) -> ZstdOptions
pub const fn with_level(self, level: i32) -> ZstdOptions
Adds a numeric compression level label.
Sourcepub const fn with_checksum(self, checksum: bool) -> ZstdOptions
pub const fn with_checksum(self, checksum: bool) -> ZstdOptions
Sets whether checksum metadata is present.
Sourcepub const fn with_dictionary_id(self, dictionary_id: u32) -> ZstdOptions
pub const fn with_dictionary_id(self, dictionary_id: u32) -> ZstdOptions
Adds a dictionary identifier.
Sourcepub const fn with_frame_kind(self, frame_kind: ZstdFrameKind) -> ZstdOptions
pub const fn with_frame_kind(self, frame_kind: ZstdFrameKind) -> ZstdOptions
Sets the frame shape label.
Trait Implementations§
Source§impl Clone for ZstdOptions
impl Clone for ZstdOptions
Source§fn clone(&self) -> ZstdOptions
fn clone(&self) -> ZstdOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ZstdOptions
impl Debug for ZstdOptions
Source§impl Default for ZstdOptions
impl Default for ZstdOptions
Source§fn default() -> ZstdOptions
fn default() -> ZstdOptions
Returns the “default value” for a type. Read more
Source§impl Hash for ZstdOptions
impl Hash for ZstdOptions
Source§impl Ord for ZstdOptions
impl Ord for ZstdOptions
Source§fn cmp(&self, other: &ZstdOptions) -> Ordering
fn cmp(&self, other: &ZstdOptions) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ZstdOptions
impl PartialEq for ZstdOptions
Source§fn eq(&self, other: &ZstdOptions) -> bool
fn eq(&self, other: &ZstdOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ZstdOptions
impl PartialOrd for ZstdOptions
impl Copy for ZstdOptions
impl Eq for ZstdOptions
impl StructuralPartialEq for ZstdOptions
Auto Trait Implementations§
impl Freeze for ZstdOptions
impl RefUnwindSafe for ZstdOptions
impl Send for ZstdOptions
impl Sync for ZstdOptions
impl Unpin for ZstdOptions
impl UnsafeUnpin for ZstdOptions
impl UnwindSafe for ZstdOptions
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