Skip to main content

Error

Enum Error 

Source
pub enum Error {
Show 18 variants Config { message: String, context: Option<Box<ErrorContext>>, recovery_suggestions: Box<Vec<String>>, }, Processing { operation: String, message: String, context: Option<Box<ErrorContext>>, recovery_suggestions: Box<Vec<String>>, }, Model { model_type: String, message: String, context: Option<Box<ErrorContext>>, recovery_suggestions: Box<Vec<String>>, }, Audio { message: String, audio_info: Option<Box<AudioErrorInfo>>, context: Option<Box<ErrorContext>>, recovery_suggestions: Box<Vec<String>>, }, Realtime { message: String, performance_context: Option<Box<PerformanceErrorInfo>>, context: Option<Box<ErrorContext>>, recovery_suggestions: Box<Vec<String>>, }, Streaming { message: String, stream_info: Option<Box<StreamErrorInfo>>, context: Option<Box<ErrorContext>>, recovery_suggestions: Box<Vec<String>>, }, Buffer { message: String, buffer_info: Option<Box<BufferErrorInfo>>, context: Option<Box<ErrorContext>>, recovery_suggestions: Box<Vec<String>>, }, Transform { transform_type: String, message: String, context: Option<Box<ErrorContext>>, recovery_suggestions: Box<Vec<String>>, }, Validation { message: String, field: Option<String>, expected: Option<String>, actual: Option<String>, context: Option<Box<ErrorContext>>, recovery_suggestions: Box<Vec<String>>, }, Runtime { message: String, context: Option<Box<ErrorContext>>, recovery_suggestions: Box<Vec<String>>, }, MemorySafety { message: String, safety_info: Option<Box<MemorySafetyErrorInfo>>, context: Option<Box<ErrorContext>>, recovery_suggestions: Box<Vec<String>>, }, ThreadSafety { message: String, thread_info: Option<Box<ThreadSafetyErrorInfo>>, context: Option<Box<ErrorContext>>, recovery_suggestions: Box<Vec<String>>, }, ResourceExhaustion { resource_type: String, current_usage: Option<u64>, limit: Option<u64>, context: Option<Box<ErrorContext>>, recovery_suggestions: Box<Vec<String>>, }, Timeout { operation: String, timeout_ms: u64, elapsed_ms: Option<u64>, context: Option<Box<ErrorContext>>, recovery_suggestions: Box<Vec<String>>, }, Compatibility { message: String, required_version: Option<String>, current_version: Option<String>, context: Option<Box<ErrorContext>>, recovery_suggestions: Box<Vec<String>>, }, Io(Error), Serialization(Error), Candle(Error),
}
Expand description

Error types for voice conversion

Variants§

§

Config

Configuration error with detailed context

Fields

§message: String

The error message

§context: Option<Box<ErrorContext>>

Additional context about the error

§recovery_suggestions: Box<Vec<String>>

Suggestions for recovering from this error

§

Processing

Processing error with operation context

Fields

§operation: String

The operation that failed

§message: String

The error message

§context: Option<Box<ErrorContext>>

Additional context about the error

§recovery_suggestions: Box<Vec<String>>

Suggestions for recovering from this error

§

Model

Model error with model type information

Fields

§model_type: String

The type of model that caused the error

§message: String

The error message

§context: Option<Box<ErrorContext>>

Additional context about the error

§recovery_suggestions: Box<Vec<String>>

Suggestions for recovering from this error

§

Audio

Audio error with audio format details

Fields

§message: String

The error message

§audio_info: Option<Box<AudioErrorInfo>>

Information about the audio that caused the error

§context: Option<Box<ErrorContext>>

Additional context about the error

§recovery_suggestions: Box<Vec<String>>

Suggestions for recovering from this error

§

Realtime

Real-time processing error with performance context

Fields

§message: String

The error message

§performance_context: Option<Box<PerformanceErrorInfo>>

Performance context when the error occurred

§context: Option<Box<ErrorContext>>

Additional context about the error

§recovery_suggestions: Box<Vec<String>>

Suggestions for recovering from this error

§

Streaming

Streaming error with stream state

Fields

§message: String

The error message

§stream_info: Option<Box<StreamErrorInfo>>

Information about the stream that caused the error

§context: Option<Box<ErrorContext>>

Additional context about the error

§recovery_suggestions: Box<Vec<String>>

Suggestions for recovering from this error

§

Buffer

Buffer error with buffer details

Fields

§message: String

The error message

§buffer_info: Option<Box<BufferErrorInfo>>

Information about the buffer that caused the error

§context: Option<Box<ErrorContext>>

Additional context about the error

§recovery_suggestions: Box<Vec<String>>

Suggestions for recovering from this error

§

Transform

Transform error with transform type

Fields

§transform_type: String

The type of transform that failed

§message: String

The error message

§context: Option<Box<ErrorContext>>

Additional context about the error

§recovery_suggestions: Box<Vec<String>>

Suggestions for recovering from this error

§

Validation

Validation error with field information

Fields

§message: String

The error message

§field: Option<String>

The field that failed validation

§expected: Option<String>

The expected value

§actual: Option<String>

The actual value that was provided

§context: Option<Box<ErrorContext>>

Additional context about the error

§recovery_suggestions: Box<Vec<String>>

Suggestions for recovering from this error

§

Runtime

Runtime error with execution context

Fields

§message: String

The error message

§context: Option<Box<ErrorContext>>

Additional context about the error

§recovery_suggestions: Box<Vec<String>>

Suggestions for recovering from this error

§

MemorySafety

Memory safety error

Fields

§message: String

The error message

§safety_info: Option<Box<MemorySafetyErrorInfo>>

Information about the memory safety violation

§context: Option<Box<ErrorContext>>

Additional context about the error

§recovery_suggestions: Box<Vec<String>>

Suggestions for recovering from this error

§

ThreadSafety

Thread safety error

Fields

§message: String

The error message

§thread_info: Option<Box<ThreadSafetyErrorInfo>>

Information about the thread safety violation

§context: Option<Box<ErrorContext>>

Additional context about the error

§recovery_suggestions: Box<Vec<String>>

Suggestions for recovering from this error

§

ResourceExhaustion

Resource exhaustion error

Fields

§resource_type: String

The type of resource that was exhausted

§current_usage: Option<u64>

Current resource usage

§limit: Option<u64>

Resource limit that was exceeded

§context: Option<Box<ErrorContext>>

Additional context about the error

§recovery_suggestions: Box<Vec<String>>

Suggestions for recovering from this error

§

Timeout

Timeout error

Fields

§operation: String

The operation that timed out

§timeout_ms: u64

The timeout threshold in milliseconds

§elapsed_ms: Option<u64>

The actual elapsed time in milliseconds

§context: Option<Box<ErrorContext>>

Additional context about the error

§recovery_suggestions: Box<Vec<String>>

Suggestions for recovering from this error

§

Compatibility

Compatibility error

Fields

§message: String

The error message

§required_version: Option<String>

The required version for compatibility

§current_version: Option<String>

The current version that is incompatible

§context: Option<Box<ErrorContext>>

Additional context about the error

§recovery_suggestions: Box<Vec<String>>

Suggestions for recovering from this error

§

Io(Error)

I/O error with enhanced context

§

Serialization(Error)

Serialization error with enhanced context

§

Candle(Error)

Candle ML framework error

Implementations§

Source§

impl Error

Source

pub fn config(message: String) -> Self

Create a simple configuration error (backwards compatibility)

Source

pub fn config_with_context(message: String, context: ErrorContext) -> Self

Create a configuration error with context

Source

pub fn processing(message: String) -> Self

Create a simple processing error (backwards compatibility)

Source

pub fn model(message: String) -> Self

Create a simple model error (backwards compatibility)

Source

pub fn audio(message: String) -> Self

Create a simple audio error (backwards compatibility)

Source

pub fn realtime(message: String) -> Self

Create a simple realtime error (backwards compatibility)

Source

pub fn streaming(message: String) -> Self

Create a simple streaming error (backwards compatibility)

Source

pub fn buffer(message: String) -> Self

Create a simple buffer error (backwards compatibility)

Source

pub fn transform(message: String) -> Self

Create a simple transform error (backwards compatibility)

Source

pub fn validation(message: String) -> Self

Create a simple validation error (backwards compatibility)

Source

pub fn runtime(message: String) -> Self

Create a simple runtime error (backwards compatibility)

Source

pub fn processing_with_context( operation: String, message: String, context: ErrorContext, ) -> Self

Create a processing error with context

Source

pub fn validation_detailed( message: String, field: Option<String>, expected: Option<String>, actual: Option<String>, ) -> Self

Create a validation error with detailed information

Source

pub fn audio_with_info(message: String, audio_info: AudioErrorInfo) -> Self

Create an audio error with audio information

Source

pub fn realtime_with_performance( message: String, performance_context: PerformanceErrorInfo, ) -> Self

Create a real-time error with performance context

Source

pub fn memory_safety_with_info( message: String, safety_info: MemorySafetyErrorInfo, ) -> Self

Create a memory safety error with detailed information

Source

pub fn thread_safety_with_info( message: String, thread_info: ThreadSafetyErrorInfo, ) -> Self

Create a thread safety error with thread information

Source

pub fn recovery_suggestions(&self) -> &[String]

Get recovery suggestions for this error

Source

pub fn context(&self) -> Option<&ErrorContext>

Get error context if available

Source

pub fn severity(&self) -> ErrorSeverity

Get error severity level

Trait Implementations§

Source§

impl Clone for Error

Source§

fn clone(&self) -> Self

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 Error

Source§

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

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

impl Display for Error

Source§

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

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

impl Error for Error

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<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin for Error

§

impl !UnwindSafe for Error

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

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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<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> 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.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,