pub enum CodecError {
EngineNotAvailable,
NotYetImplemented(String),
HfHub {
repo: String,
source: Error,
},
Io(Error),
Candle(String),
InvalidInput(String),
Other(String),
}Expand description
Errors that can be returned by any crate::CodecBackend.
Variants§
EngineNotAvailable
The crate was compiled without the matching backend feature
(encodec, dac, snac, …), so the inference stack is not
linked in. Every codec call short-circuits with this error.
NotYetImplemented(String)
The backend is a known slot (e.g. DAC, SNAC) but its real implementation has not landed yet. Carries a detailed message pointing at the tracking wave.
HfHub
Hugging Face Hub fetch failed while pulling model weights (offline, 404, auth, network, …).
Fields
Io(Error)
Local filesystem error (cache directory, weight file, …).
Candle(String)
Underlying candle inference / tensor error.
InvalidInput(String)
The caller-supplied PCM or token vector does not satisfy the codec’s requirements (wrong sample rate, empty buffer, non-aligned token count, …).
Other(String)
Catch-all for unexpected runtime conditions.
Implementations§
Source§impl CodecError
impl CodecError
Sourcepub fn not_yet_implemented(message: impl Into<String>) -> Self
pub fn not_yet_implemented(message: impl Into<String>) -> Self
Convenience constructor for Self::NotYetImplemented.
Sourcepub fn invalid_input(message: impl Into<String>) -> Self
pub fn invalid_input(message: impl Into<String>) -> Self
Convenience constructor for Self::InvalidInput.
Sourcepub fn other(message: impl Into<String>) -> Self
pub fn other(message: impl Into<String>) -> Self
Convenience constructor for Self::Other.
Trait Implementations§
Source§impl Debug for CodecError
impl Debug for CodecError
Source§impl Display for CodecError
impl Display for CodecError
Source§impl Error for CodecError
impl Error for CodecError
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<CodecError> for AudioError
Lossy projection of CodecError into the capability-agnostic
blazen_audio::AudioError surface used at the bridge boundary.
impl From<CodecError> for AudioError
Lossy projection of CodecError into the capability-agnostic
blazen_audio::AudioError surface used at the bridge boundary.