Enum CompressionMethod

#[non_exhaustive]
#[repr(u16)]
pub enum CompressionMethod

See TIFF compression tags for reference.

Variants

None = 1
Huffman = 2
Fax3 = 3
Fax4 = 4
LZW = 5
JPEG = 6
ModernJPEG = 7
Deflate = 8
OldDeflate = 0x80B2
PackBits = 0x8005
ZSTD = 0xC350
WebP = 0xC351
Unknown(u16)

A custom compression method

Implementations

impl CompressionMethod

const fn from_u16(val: u16) -> Option<Self>
const fn from_u16_exhaustive(unknown: u16) -> Self
const fn to_u16(&self) -> u16

Trait Implementations

impl Clone for CompressionMethod

fn clone(&self) -> CompressionMethod

impl Copy for CompressionMethod

impl Debug for CompressionMethod

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Eq for CompressionMethod

impl Hash for CompressionMethod

fn hash<__H: Hasher>(&self, state: &mut __H)

impl PartialEq for CompressionMethod

fn eq(&self, other: &CompressionMethod) -> bool

impl StructuralPartialEq for CompressionMethod

impl TiffValue for CompressionMethod

const BYTE_LEN: u8 = <u16 as TiffValue>::BYTE_LEN;
const FIELD_TYPE: Type = Type::SHORT;
fn count(&self) -> usize
fn data(&self) -> Cow<'_, [u8]>

Auto Trait Implementations

impl Freeze for CompressionMethod

impl RefUnwindSafe for CompressionMethod

impl Send for CompressionMethod

impl Sync for CompressionMethod

impl Unpin for CompressionMethod

impl UnsafeUnpin for CompressionMethod

impl UnwindSafe for CompressionMethod

Blanket Implementations

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for CompressionMethod where ST: ?Sized, DT: ?Sized,

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for CompressionMethod where ST: ?Sized, DT: ?Sized,

impl<T> Any for CompressionMethod where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for CompressionMethod where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for CompressionMethod where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for CompressionMethod where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for CompressionMethod

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Read<Exclusive, BecauseExclusive> for CompressionMethod where T: ?Sized,

impl<T> ToOwned for CompressionMethod where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for CompressionMethod where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for CompressionMethod where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for CompressionMethod where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>