pub enum Error {
Show 21 variants
Config(ConfigError),
Processing(ProcessingError),
Hrtf(HrtfError),
Position(PositionError),
Room(RoomError),
Audio(AudioError),
Memory(MemoryError),
Gpu(GpuError),
Platform(PlatformError),
Validation(ValidationError),
Io(Error),
Serialization(Error),
Candle(Error),
Generic {
message: String,
code: ErrorCode,
context: Option<Box<ErrorContext>>,
},
LegacyConfig(String),
LegacyProcessing(String),
LegacyHrtf(String),
LegacyPosition(String),
LegacyRoom(String),
LegacyAudio(String),
LegacyValidation(String),
}Expand description
Error types for spatial audio processing
Variants§
Config(ConfigError)
Configuration error (structured)
Processing(ProcessingError)
Processing error (structured)
Hrtf(HrtfError)
HRTF error (structured)
Position(PositionError)
Position error (structured)
Room(RoomError)
Room acoustics error (structured)
Audio(AudioError)
Audio error (structured)
Memory(MemoryError)
Memory error (structured)
Gpu(GpuError)
GPU error (structured)
Platform(PlatformError)
Platform error (structured)
Validation(ValidationError)
Validation error (structured)
Io(Error)
I/O error
Serialization(Error)
Serialization error
Candle(Error)
Candle error
Generic
Generic error with context
Fields
context: Option<Box<ErrorContext>>Error context
LegacyConfig(String)
Legacy errors for backward compatibility (will be migrated)
LegacyProcessing(String)
Legacy processing error for backward compatibility
LegacyHrtf(String)
Legacy HRTF error for backward compatibility
LegacyPosition(String)
Legacy position error for backward compatibility
LegacyRoom(String)
Legacy room acoustics error for backward compatibility
LegacyAudio(String)
Legacy audio error for backward compatibility
LegacyValidation(String)
Legacy validation error for backward compatibility
Implementations§
Source§impl Error
impl Error
Sourcepub fn config(message: &str) -> Self
pub fn config(message: &str) -> Self
Create a generic configuration error from a string message
Sourcepub fn processing(message: &str) -> Self
pub fn processing(message: &str) -> Self
Create a generic processing error from a string message
Sourcepub fn with_context(
message: &str,
code: ErrorCode,
context: ErrorContext,
) -> Self
pub fn with_context( message: &str, code: ErrorCode, context: ErrorContext, ) -> Self
Create error with context
Sourcepub fn is_recoverable(&self) -> bool
pub fn is_recoverable(&self) -> bool
Check if error is recoverable
Sourcepub fn recovery_suggestions(&self) -> Vec<String>
pub fn recovery_suggestions(&self) -> Vec<String>
Get recovery suggestions
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<AudioError> for Error
impl From<AudioError> for Error
Source§fn from(source: AudioError) -> Self
fn from(source: AudioError) -> Self
Source§impl From<ConfigError> for Error
impl From<ConfigError> for Error
Source§fn from(source: ConfigError) -> Self
fn from(source: ConfigError) -> Self
Source§impl From<MemoryError> for Error
impl From<MemoryError> for Error
Source§fn from(source: MemoryError) -> Self
fn from(source: MemoryError) -> Self
Source§impl From<PlatformError> for Error
impl From<PlatformError> for Error
Source§fn from(source: PlatformError) -> Self
fn from(source: PlatformError) -> Self
Source§impl From<PositionError> for Error
impl From<PositionError> for Error
Source§fn from(source: PositionError) -> Self
fn from(source: PositionError) -> Self
Source§impl From<ProcessingError> for Error
impl From<ProcessingError> for Error
Source§fn from(source: ProcessingError) -> Self
fn from(source: ProcessingError) -> Self
Source§impl From<ValidationError> for Error
impl From<ValidationError> for Error
Source§fn from(source: ValidationError) -> Self
fn from(source: ValidationError) -> Self
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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