Struct assembly_pack::sd0::write::Compression
source · pub struct Compression(/* private fields */);
Available on crate feature
sd0
only.Expand description
When compressing data, the compression level can be specified by a value in this struct.
Implementations§
source§impl Compression
impl Compression
sourcepub const fn new(level: u32) -> Compression
pub const fn new(level: u32) -> Compression
Creates a new description of the compression level with an explicitly specified integer.
The integer here is typically on a scale of 0-9 where 0 means “no compression” and 9 means “take as long as you’d like”.
sourcepub const fn none() -> Compression
pub const fn none() -> Compression
No compression is to be performed, this may actually inflate data slightly when encoding.
sourcepub const fn fast() -> Compression
pub const fn fast() -> Compression
Optimize for the best speed of encoding.
sourcepub const fn best() -> Compression
pub const fn best() -> Compression
Optimize for the size of data being encoded.
Trait Implementations§
source§impl Clone for Compression
impl Clone for Compression
source§fn clone(&self) -> Compression
fn clone(&self) -> Compression
Returns a copy of the value. Read more
1.0.0 · 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 Compression
impl Debug for Compression
source§impl Default for Compression
impl Default for Compression
source§fn default() -> Compression
fn default() -> Compression
Returns the “default value” for a type. Read more
source§impl PartialEq for Compression
impl PartialEq for Compression
impl Copy for Compression
impl Eq for Compression
impl StructuralPartialEq for Compression
Auto Trait Implementations§
impl Freeze for Compression
impl RefUnwindSafe for Compression
impl Send for Compression
impl Sync for Compression
impl Unpin for Compression
impl UnwindSafe for Compression
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
§fn extract_context(self, _original_input: I)
fn extract_context(self, _original_input: I)
Given the context attached to a nom error, and given the original
input to the nom parser, extract more the useful context information. Read more
§impl<I> RecreateContext<I> for I
impl<I> RecreateContext<I> for I
§fn recreate_context(_original_input: I, tail: I) -> I
fn recreate_context(_original_input: I, tail: I) -> I
Given the original input, as well as the context reported by nom,
recreate a context in the original string where the error occurred. Read more