Enum png::FilterType
source · [−]#[repr(u8)]
pub enum FilterType {
NoFilter,
Sub,
Up,
Avg,
Paeth,
}
Expand description
The byte level filter applied to scanlines to prepare them for compression.
Compression in general benefits from repetitive data. The filter is a content-aware method of compressing the range of occurring byte values to help the compression algorithm. Note that this does not operate on pixels but on raw bytes of a scanline.
Variants
NoFilter
Sub
Up
Avg
Paeth
Implementations
sourceimpl FilterType
impl FilterType
sourcepub fn from_u8(n: u8) -> Option<FilterType>
pub fn from_u8(n: u8) -> Option<FilterType>
u8 -> Self. Temporary solution until Rust provides a canonical one.
Trait Implementations
sourceimpl Clone for FilterType
impl Clone for FilterType
sourcefn clone(&self) -> FilterType
fn clone(&self) -> FilterType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for FilterType
impl Debug for FilterType
sourceimpl Default for FilterType
impl Default for FilterType
sourceimpl PartialEq<FilterType> for FilterType
impl PartialEq<FilterType> for FilterType
impl Copy for FilterType
impl Eq for FilterType
impl StructuralEq for FilterType
impl StructuralPartialEq for FilterType
Auto Trait Implementations
impl RefUnwindSafe for FilterType
impl Send for FilterType
impl Sync for FilterType
impl Unpin for FilterType
impl UnwindSafe for FilterType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more