#[repr(u32)]
pub enum FlacEncoderInitError {
Show 13 variants EncoderError, UnsupportedContainer, InvalidCallbacks, InvalidNumberOfChannels, InvalidBitsPerSample, InvalidSampleRate, InvalidBlockSize, InvalidMaxLpcOrder, InvalidQlpCoeffPrecision, BlockSizeTooSmallForLpcOrder, NotStreamable, InvalidMetadata, AlreadyInitialized,
}
Expand description

Possible erroneous return values for the FlacEncoderConfig::init_*() functions.

Variants

EncoderError

General failure to set up encoder; call FlacEncoder::state() for cause.

UnsupportedContainer

The library was not compiled with support for the given container format.

InvalidCallbacks

A required callback was not supplied.

InvalidNumberOfChannels

The encoder has an invalid setting for number of channels.

InvalidBitsPerSample

The encoder has an invalid setting for bits-per-sample.

FLAC supports 4-32 bps but the reference encoder currently supports only up to 24 bps.

InvalidSampleRate

The encoder has an invalid setting for the input sample rate.

InvalidBlockSize

The encoder has an invalid setting for the block size.

InvalidMaxLpcOrder

The encoder has an invalid setting for the maximum LPC order.

InvalidQlpCoeffPrecision

The encoder has an invalid setting for the precision of the quantized linear predictor coefficients.

BlockSizeTooSmallForLpcOrder

The specified block size is less than the maximum LPC order.

NotStreamable

The encoder is bound to the Subset but other settings violate it.

InvalidMetadata

The metadata input to the encoder is invalid, in one of the following ways:

  • One of the metadata blocks contains an undefined type
  • It contains an illegal CUESHEET as checked by FLAC__format_cuesheet_is_legal()
  • It contains an illegal SEEKTABLE as checked by FLAC__format_seektable_is_legal()
  • It contains more than one SEEKTABLE block or more than one VORBIS_COMMENT block

AlreadyInitialized

FlacEncoderConfig::init_*() was called when the encoder was already initialized, usually because FLAC__stream_encoder_finish() was not called.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

Converts this type into the (usually inferred) input type.

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

The type returned in the event of a conversion error.

Performs the conversion.

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 resulting type after obtaining ownership.

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

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

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.