Skip to main content

ProcessError

Enum ProcessError 

Source
pub enum ProcessError {
Show 16 variants Processing(String), Parameter(String), InvalidPort(String), Buffer(String), NodeNotFound(u32), PortNotFound(String), Connection(String), TypeMismatch { expected: &'static str, got: &'static str, }, SampleRateMismatch { expected: f32, got: f32, }, Config(String), NotInitialized, AlreadyInitialized, Unsupported(String), Timeout, RealtimeViolation(String), Internal(String),
}
Expand description

Main error type for signal processing operations

This error can occur during node processing, parameter changes, or any other operation in the signal graph.

Variants§

§

Processing(String)

Error during signal processing

§

Parameter(String)

Error with a parameter (invalid value, out of range, etc.)

§

InvalidPort(String)

Invalid port access

§

Buffer(String)

Buffer operation failed

§

NodeNotFound(u32)

Node not found

§

PortNotFound(String)

Port not found

§

Connection(String)

Connection error

§

TypeMismatch

Type mismatch (e.g., trying to connect audio to control)

Fields

§expected: &'static str

Expected type

§got: &'static str

Actual type

§

SampleRateMismatch

Sample rate mismatch

Fields

§expected: f32

Expected sample rate

§got: f32

Actual sample rate

§

Config(String)

Configuration error

§

NotInitialized

Not initialized

§

AlreadyInitialized

Already initialized

§

Unsupported(String)

Unsupported operation

§

Timeout

Timeout occurred

§

RealtimeViolation(String)

Real-time violation — operation exceeded its time budget or performed an illegal action (allocation, blocking, etc.)

§

Internal(String)

Internal error (for implementation-specific errors)

Implementations§

Source§

impl ProcessError

Source

pub fn processing(msg: impl Into<String>) -> ProcessError

Create a new processing error with a formatted message

Source

pub fn parameter(msg: impl Into<String>) -> ProcessError

Create a new parameter error with a formatted message

Source

pub fn invalid_port(port: impl Display) -> ProcessError

Create a new invalid port error

Source

pub fn buffer(msg: impl Into<String>) -> ProcessError

Create a new buffer error

Source

pub fn node_not_found(id: u32) -> ProcessError

Create a new node not found error

Source

pub fn port_not_found(port: impl Display) -> ProcessError

Create a new port not found error

Source

pub fn connection(msg: impl Into<String>) -> ProcessError

Create a new connection error

Source

pub fn type_mismatch(expected: &'static str, got: &'static str) -> ProcessError

Create a new type mismatch error

Source

pub fn sample_rate_mismatch(expected: f32, got: f32) -> ProcessError

Create a new sample rate mismatch error

Source

pub fn config(msg: impl Into<String>) -> ProcessError

Create a new configuration error

Source

pub fn unsupported(msg: impl Into<String>) -> ProcessError

Create a new unsupported operation error

Source

pub fn internal(msg: impl Into<String>) -> ProcessError

Create a new internal error

Source

pub fn is_recoverable(&self) -> bool

Check if this error is recoverable

Recoverable errors are those that don’t require stopping the signal thread, such as temporary buffer underflows or parameter errors.

Source

pub fn code(&self) -> &'static str

Get a short error code for this error (useful for logging)

Trait Implementations§

Source§

impl Clone for ProcessError

Source§

fn clone(&self) -> ProcessError

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ProcessError

Source§

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

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

impl Display for ProcessError

Source§

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

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

impl Error for ProcessError

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<ClockError> for ProcessError

Source§

fn from(err: ClockError) -> ProcessError

Converts to this type from the input type.
Source§

impl From<ConnectionError> for ProcessError

Source§

fn from(err: ConnectionError) -> ProcessError

Converts to this type from the input type.
Source§

impl From<Error> for ProcessError

Source§

fn from(err: Error) -> ProcessError

Converts to this type from the input type.
Source§

impl From<Error> for ProcessError

Source§

fn from(err: Error) -> ProcessError

Converts to this type from the input type.
Source§

impl From<ParameterError> for ProcessError

Source§

fn from(err: ParameterError) -> ProcessError

Converts to this type from the input type.
Source§

impl From<PortError> for ProcessError

Source§

fn from(err: PortError) -> ProcessError

Converts to this type from the input type.
Source§

impl PartialEq for ProcessError

Source§

fn eq(&self, other: &ProcessError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for ProcessError

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> AsAny for T
where T: 'static,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert to &dyn std::any::Any
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert to &mut dyn std::any::Any
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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.