pub enum StreamKitError {
Configuration(String),
Runtime(String),
Network(String),
Codec(String),
Plugin(String),
Io(Error),
ResourceExhausted(String),
}Expand description
Main error type for StreamKit operations.
This enum categorizes errors into distinct types to enable better error handling, logging, and recovery strategies. Each variant includes a descriptive message.
Variants§
Configuration(String)
Configuration or parameter validation error.
Examples:
- Invalid node parameters (negative gain, invalid sample rate)
- Missing required configuration fields
- Invalid pipeline structure (circular dependencies)
Runtime(String)
Runtime processing error during normal operation.
Examples:
- Audio buffer processing failure
- Codec encoding/decoding error
- Data format conversion failure
Network(String)
Network-related error (sockets, HTTP, WebSocket, etc.).
Examples:
- Connection timeout
- Socket closed unexpectedly
- HTTP request failed
Codec(String)
Codec-specific error (encoding, decoding, format negotiation).
Examples:
- Opus encoder initialization failed
- Invalid audio format for codec
- Unsupported codec feature
Plugin(String)
Plugin loading, initialization, or execution error.
Examples:
- Plugin file not found
- ABI version mismatch
- Plugin initialization failed
- Plugin processing error
Io(Error)
I/O error (file operations, device access).
Examples:
- File not found
- Permission denied
- Disk full
ResourceExhausted(String)
Resource exhaustion or limit exceeded.
Examples:
- Memory allocation failed
- Too many open files
- Queue capacity exceeded
Trait Implementations§
Source§impl Debug for StreamKitError
impl Debug for StreamKitError
Source§impl Display for StreamKitError
impl Display for StreamKitError
Source§impl Error for StreamKitError
impl Error for StreamKitError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<&str> for StreamKitError
impl From<&str> for StreamKitError
Source§impl From<Error> for StreamKitError
impl From<Error> for StreamKitError
Source§impl From<StreamKitError> for String
impl From<StreamKitError> for String
Source§fn from(err: StreamKitError) -> Self
fn from(err: StreamKitError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for StreamKitError
impl !RefUnwindSafe for StreamKitError
impl Send for StreamKitError
impl Sync for StreamKitError
impl Unpin for StreamKitError
impl !UnwindSafe for StreamKitError
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
Mutably borrows from an owned value. Read more