pub struct WriteOptions { /* private fields */ }
Expand description

Options for writing audio files.

Implementations

Create new WriteOptions.

  • major_format: Audio container format, e.g., SubtypeFormat::WAV, SubtypeFormat::FLAC, etc
  • subtype_format: Audio encoding format, e.g., SubtypeFormat::PCM_S16, SubtypeFormat::VORBIS, etc
  • endian: Usually Endian::File
  • samplerate: A positive number
  • channels: A positive number

This function allows the caller to check if a set of parameters in the WriteOptions is valid.

Returns Some(Self) if the parameters are valid and None otherwise.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.