pub enum OpenOptions {
    ReadOnly(ReadOptions),
    WriteOnly(WriteOptions),
    ReadWrite(ReadOptions),
    WriteRead(WriteOptions),
}
Expand description

Struct to specify options when opening a audio file.

Variants

ReadOnly(ReadOptions)

Open an audio file read only.

WriteOnly(WriteOptions)

Open an audio file write only.

In OpenOptions::from_path function, a new file will be created if the file does not yet already exist.

ReadWrite(ReadOptions)

Open an audio file for reading and writing.

In OpenOptions::from_path function, a SndFileError::IOError will be returned if the file does not yet already exist.

WriteRead(WriteOptions)

Open an audio file for reading and writing.

In OpenOptions::from_path function, a new file will be created if the file does not yet already exist.
If specified file already exists, format may differ from WriteOptions

Implementations

Open from path

Open from file

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.