#[non_exhaustive]pub enum PgsError {
Io {
source: Error,
path: PathBuf,
},
ODSParse(Error),
PDSParse(Error),
SegmentInvalidTypeCode {
value: u8,
},
SegmentFailReadHeader,
SegmentPGMissing,
SegmentSkip {
source: ReadError,
type_code: SegmentTypeCode,
},
MissingImage,
MissingPalette,
}Expand description
Error for Pgs handling.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Io
Io error on a path.
ODSParse(Error)
Encapsulates errors from Object Definition Segment parsing.
PDSParse(Error)
Encapsulates errors from Palette Definition Segment parsing.
SegmentInvalidTypeCode
Invalid segment type code value.
SegmentFailReadHeader
An error occurred during Segment Header reading.
SegmentPGMissing
Missing expected PG Magic number.
SegmentSkip
ReadError occurred during skipping the segment.
Fields
§
type_code: SegmentTypeCodetype code of the segment we skip
MissingImage
Error if image is missing to complete the parsing of a subtitle.
MissingPalette
Palette is missing after image parsing.
Trait Implementations§
Source§impl Error for PgsError
impl Error for PgsError
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()
Auto Trait Implementations§
impl Freeze for PgsError
impl !RefUnwindSafe for PgsError
impl Send for PgsError
impl Sync for PgsError
impl Unpin for PgsError
impl !UnwindSafe for PgsError
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
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more