pub enum SubtitleToolkitError {
Show 13 variants
Io(Error),
Http(Error),
Json(Error),
MissingTool {
tool: &'static str,
},
CommandFailed {
program: &'static str,
status: String,
stderr: String,
},
NoMkvFiles {
path: PathBuf,
},
NoAssTrack {
path: PathBuf,
},
NoSubtitleTrack {
path: PathBuf,
},
AssParse {
message: String,
},
SrtParse {
message: String,
},
VttParse {
message: String,
},
InvalidTranslation {
message: String,
},
Translation {
provider: &'static str,
message: String,
},
}Expand description
Errors produced by the subtitle toolkit.
Variants§
Io(Error)
Standard I/O error.
Http(Error)
HTTP request error (Ollama API).
Json(Error)
JSON serialization/deserialization error.
MissingTool
Required external tool (e.g. mkvmerge, mkvextract) not found in PATH.
CommandFailed
External command returned a nonzero exit status.
NoMkvFiles
No .mkv files found at the given path.
NoAssTrack
No ASS/SSA subtitle track found in the MKV.
NoSubtitleTrack
No supported subtitle track (ASS or SRT) found in the MKV.
AssParse
Malformed ASS subtitle file.
SrtParse
Malformed SRT subtitle file.
VttParse
Malformed WebVTT subtitle file.
InvalidTranslation
LLM returned invalid numbered text (missing IDs, duplicates, etc.).
Translation
Translation provider returned an error.
Trait Implementations§
Source§impl Debug for SubtitleToolkitError
impl Debug for SubtitleToolkitError
Source§impl Display for SubtitleToolkitError
impl Display for SubtitleToolkitError
Source§impl Error for SubtitleToolkitError
impl Error for SubtitleToolkitError
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<Error> for SubtitleToolkitError
impl From<Error> for SubtitleToolkitError
Source§impl From<Error> for SubtitleToolkitError
impl From<Error> for SubtitleToolkitError
Auto Trait Implementations§
impl Freeze for SubtitleToolkitError
impl !RefUnwindSafe for SubtitleToolkitError
impl Send for SubtitleToolkitError
impl Sync for SubtitleToolkitError
impl Unpin for SubtitleToolkitError
impl UnsafeUnpin for SubtitleToolkitError
impl !UnwindSafe for SubtitleToolkitError
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