[][src]Enum sndfile::OpenOptions

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

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

Methods

impl OpenOptions[src]

pub fn from_path<P: AsRef<Path>>(
    &self,
    path: P
) -> Result<SndFile, SndFileError>
[src]

Open from path

pub fn from_file(&self, f: File) -> Result<SndFile, SndFileError>[src]

Open from file

Trait Implementations

impl Debug for OpenOptions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.