Skip to main content

PulseError

Enum PulseError 

Source
pub enum PulseError {
Show 45 variants InvalidNoteName { value: String, }, InvalidMode { value: String, }, InvalidChordKind { value: String, }, InvalidTempo { bpm: f32, }, InvalidDuration { duration: f32, }, DurationCountMismatch { notes: usize, durations: usize, }, InvalidChordVoiceCount { count: usize, }, InvalidSequenceOption { option: String, value: String, }, InvalidInstrument { value: String, }, InvalidDrumType { value: String, }, InvalidRhythmPattern { value: String, }, InvalidMidiNote { note: i64, }, InvalidFrequency { frequency: f32, }, InvalidDrumGridSteps { steps: usize, }, InvalidStepDuration { duration: f32, }, InvalidDrumOption { option: String, value: String, }, InvalidRepeatTimes { repeat_times: usize, }, MidiImportFailed { message: String, }, MidiExportFailed { message: String, }, InvalidExportPath { path: PathBuf, }, UnsupportedExportFormat { format: String, }, InvalidExportSampleRate { sample_rate: u32, }, InvalidExportNormalizeOption { option: String, value: String, }, InvalidExportFlacBitsPerSample { bits_per_sample: u32, }, InvalidExportMidiOption { option: String, value: String, }, ExportFailed { message: String, }, GpuFeatureNotEnabled, PlaybackFailed { message: String, }, InvalidPlaybackRate { rate: f32, }, InvalidPlaybackVolume { volume: f32, }, InvalidPlaybackPan { pan: f32, }, InvalidGenerator { name: String, }, MissingGeneratorOption { name: String, }, InvalidGeneratorOption { name: String, value: String, }, UnsupportedGeneratorOutput { output: String, }, InvalidEffect { name: String, }, InvalidEffectPreset { effect: String, preset: String, }, InvalidEffectOption { effect: String, option: String, value: String, }, InvalidEffectScope { effect: String, scope: String, }, InvalidSynth { name: String, }, InvalidSynthPreset { synth: String, preset: String, }, InvalidSynthOption { synth: String, option: String, value: String, }, SampleLoadFailed { message: String, }, InvalidSampleOption { option: String, value: String, }, InvalidMidiClipOption { option: String, value: String, },
}
Expand description

Domain errors surfaced by mlua-pulse before they are mapped to Lua errors.

Variants§

§

InvalidNoteName

A note name could not be parsed into an equal-tempered frequency.

Fields

§value: String

The rejected note name.

§

InvalidMode

A scale or mode name is not in the supported theory catalog.

Fields

§value: String

The rejected mode name.

§

InvalidChordKind

A chord kind name is not in the supported theory catalog.

Fields

§value: String

The rejected chord kind.

§

InvalidTempo

A song tempo is zero, negative, or not finite.

Fields

§bpm: f32

The rejected tempo in beats per minute.

§

InvalidDuration

A note or sequence duration is zero, negative, or not finite.

Fields

§duration: f32

The rejected duration in beats.

§

DurationCountMismatch

A sequence has a different number of events and durations.

Fields

§notes: usize

Number of note or chord events.

§durations: usize

Number of duration entries.

§

InvalidChordVoiceCount

A chord event contains no voices or too many voices for export.

Fields

§count: usize

Number of voices found in the chord event.

§

InvalidSequenceOption

A sequence option such as volume, pan, velocity, or start offset is invalid.

Fields

§option: String

Option name.

§value: String

Rejected value rendered for diagnostics.

§

InvalidInstrument

A Lua-facing instrument alias could not be resolved.

Fields

§value: String

The rejected instrument alias.

§

InvalidDrumType

A Lua-facing drum alias could not be resolved.

Fields

§value: String

The rejected drum alias.

§

InvalidRhythmPattern

A named rhythm pattern is not registered.

Fields

§value: String

The rejected rhythm pattern name.

§

InvalidMidiNote

A MIDI note number is outside the 0..=127 range.

Fields

§note: i64

The rejected MIDI note number.

§

InvalidFrequency

A frequency is zero, negative, or not finite.

Fields

§frequency: f32

The rejected frequency in Hertz.

§

InvalidDrumGridSteps

A drum grid was created with zero steps.

Fields

§steps: usize

The rejected step count.

§

InvalidStepDuration

A drum grid step duration is zero, negative, or not finite.

Fields

§duration: f32

The rejected step duration in beats.

§

InvalidDrumOption

A drum-grid mix or timing option is invalid.

Fields

§option: String

Option name.

§value: String

Rejected value rendered for diagnostics.

§

InvalidRepeatTimes

A phrase repeat count is zero.

Fields

§repeat_times: usize

The rejected repeat count.

§

MidiImportFailed

tunes failed to import a MIDI file.

Fields

§message: String

Error message returned by the MIDI importer.

§

MidiExportFailed

tunes failed to export a MIDI file.

Fields

§message: String

Error message returned by the MIDI exporter.

§

InvalidExportPath

An export path could not be represented as UTF-8 for tunes APIs.

Fields

§path: PathBuf

The rejected filesystem path.

§

UnsupportedExportFormat

The output extension is not one of the supported export formats.

Fields

§format: String

The rejected extension, or missing when no extension was present.

§

InvalidExportSampleRate

A WAV/FLAC sample rate is zero.

Fields

§sample_rate: u32

The rejected sample rate.

§

InvalidExportNormalizeOption

A final loudness-normalization option is outside the supported range.

Fields

§option: String

Option name.

§value: String

Rejected value rendered for diagnostics.

§

InvalidExportFlacBitsPerSample

A requested FLAC bit depth is unsupported by the direct encoder path.

Fields

§bits_per_sample: u32

The rejected bit depth.

§

InvalidExportMidiOption

A MIDI export loudness option is invalid.

Fields

§option: String

Option name.

§value: String

Rejected value rendered for diagnostics.

§

ExportFailed

A WAV/FLAC export failed after validation.

Fields

§message: String

Error message returned by the audio engine or encoder.

§

GpuFeatureNotEnabled

GPU export was requested without enabling the crate’s gpu feature.

§

PlaybackFailed

The real-time playback engine reported an error.

Fields

§message: String

Error message returned by the playback engine.

§

InvalidPlaybackRate

A playback rate is zero, negative, or not finite.

Fields

§rate: f32

The rejected playback rate.

§

InvalidPlaybackVolume

A playback volume is outside 0..=1.

Fields

§volume: f32

The rejected playback volume.

§

InvalidPlaybackPan

A playback pan value is outside -1..=1.

Fields

§pan: f32

The rejected stereo pan value.

§

InvalidGenerator

An algorithm generator name is not registered.

Fields

§name: String

The rejected generator name.

§

MissingGeneratorOption

A required generator option was not supplied.

Fields

§name: String

Missing option name.

§

InvalidGeneratorOption

A generator option has the wrong type or range.

Fields

§name: String

Option name.

§value: String

Rejected value rendered for diagnostics.

§

UnsupportedGeneratorOutput

A generated value shape cannot be converted to Lua.

Fields

§output: String

Output shape label.

§

InvalidEffect

An effect name is not registered.

Fields

§name: String

The rejected effect name.

§

InvalidEffectPreset

An effect preset is not supported for the selected effect.

Fields

§effect: String

Effect name.

§preset: String

Rejected preset name.

§

InvalidEffectOption

An effect option has the wrong type, range, or name.

Fields

§effect: String

Effect name.

§option: String

Option name.

§value: String

Rejected value rendered for diagnostics.

§

InvalidEffectScope

An effect was placed on a scope where tunes cannot apply it.

Fields

§effect: String

Effect name.

§scope: String

Rejected scope name.

§

InvalidSynth

A synthesis algorithm name is not registered.

Fields

§name: String

The rejected synth name.

§

InvalidSynthPreset

A synth preset is not supported for the selected algorithm.

Fields

§synth: String

Synth name.

§preset: String

Rejected preset name.

§

InvalidSynthOption

A synth option has the wrong type, range, or name.

Fields

§synth: String

Synth name.

§option: String

Option name.

§value: String

Rejected value rendered for diagnostics.

§

SampleLoadFailed

A sample file could not be loaded or transformed.

Fields

§message: String

Error message returned by the sample loader or transformer.

§

InvalidSampleOption

A sample clip option has the wrong range or shape.

Fields

§option: String

Option name.

§value: String

Rejected value rendered for diagnostics.

§

InvalidMidiClipOption

A MIDI clip option has the wrong range or shape.

Fields

§option: String

Option name.

§value: String

Rejected value rendered for diagnostics.

Trait Implementations§

Source§

impl Debug for PulseError

Source§

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

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

impl Display for PulseError

Source§

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

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

impl Error for PulseError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<PulseError> for Error

Source§

fn from(value: PulseError) -> Self

Converts to this type from the input type.

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

Source§

impl<E> ExternalError for E
where E: Into<Box<dyn Error>>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

Source§

impl<T> MaybeSend for T

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V