Enum AiffCompressionType

Source
pub enum AiffCompressionType {
Show 14 variants None, ACE2, ACE8, MAC3, MAC6, sowt, fl32, fl64, alaw, ulaw, ULAW, ALAW, FL32, Other { compression_type: [u8; 4], compression_name: String, },
}
Expand description

The AIFC compression type

This contains a non-exhaustive list of compression types

Variants§

§

None

PCM

§

ACE2

2-to-1 IIGS ACE (Audio Compression / Expansion)

§

ACE8

8-to-3 IIGS ACE (Audio Compression / Expansion)

§

MAC3

3-to-1 Macintosh Audio Compression / Expansion

§

MAC6

6-to-1 Macintosh Audio Compression / Expansion

§

sowt

PCM (byte swapped)

§

fl32

IEEE 32-bit float

§

fl64

IEEE 64-bit float

§

alaw

8-bit ITU-T G.711 A-law

§

ulaw

8-bit ITU-T G.711 µ-law

§

ULAW

8-bit ITU-T G.711 µ-law (64 kb/s)

§

ALAW

8-bit ITU-T G.711 A-law (64 kb/s)

§

FL32

IEEE 32-bit float (From SoundHack & Csound)

§

Other

Catch-all for unknown compression algorithms

Fields

§compression_type: [u8; 4]

Identifier from the compression algorithm

§compression_name: String

Human-readable description of the compression algorithm

Implementations§

Source§

impl AiffCompressionType

Source

pub fn compression_name(&self) -> Cow<'_, str>

Get the compression name for a compression type

For variants other than AiffCompressionType::Other, this will use statically known names.

§Examples
use lofty::iff::aiff::AiffCompressionType;

let compression_type = AiffCompressionType::alaw;
assert_eq!(compression_type.compression_name(), "ALaw 2:1");

Trait Implementations§

Source§

impl Clone for AiffCompressionType

Source§

fn clone(&self) -> AiffCompressionType

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AiffCompressionType

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for AiffCompressionType

Source§

fn default() -> AiffCompressionType

Returns the “default value” for a type. Read more
Source§

impl PartialEq for AiffCompressionType

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

const fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for AiffCompressionType

Source§

impl StructuralPartialEq for AiffCompressionType

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

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

Source§

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

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.