pub enum Error {
Avm1ParseError {
opcode: u8,
source: Option<Box<dyn Error + Send + Sync + 'static>>,
},
InvalidData(Cow<'static, str>),
SwfParseError {
tag_code: u16,
source: Box<dyn Error + Send + Sync + 'static>,
},
IoError(Error),
Unsupported(Cow<'static, str>),
}Variants§
Avm1ParseError
An error occurred while parsing an AVM1 action.
This can contain sub-errors with further information (Error::source)
InvalidData(Cow<'static, str>)
Invalid or unknown data was encountered.
SwfParseError
An error occurred while parsing an SWF tag.
This can contain sub-errors with further information (Error::source)
IoError(Error)
An IO error occurred (probably unexpected EOF).
Unsupported(Cow<'static, str>)
This SWF requires unsupported features.
Implementations§
Source§impl Error
impl Error
Sourcepub fn avm1_parse_error(opcode: u8) -> Self
pub fn avm1_parse_error(opcode: u8) -> Self
Helper method to create Error::Avm1ParseError.
Sourcepub fn avm1_parse_error_with_source(
opcode: u8,
source: impl Error + Send + Sync + 'static,
) -> Self
pub fn avm1_parse_error_with_source( opcode: u8, source: impl Error + Send + Sync + 'static, ) -> Self
Helper method to create Error::Avm1ParseError.
Sourcepub fn invalid_data(message: impl Into<Cow<'static, str>>) -> Self
pub fn invalid_data(message: impl Into<Cow<'static, str>>) -> Self
Helper method to create Error::InvalidData.
Sourcepub fn swf_parse_error(
tag_code: u16,
source: impl Error + Send + Sync + 'static,
) -> Self
pub fn swf_parse_error( tag_code: u16, source: impl Error + Send + Sync + 'static, ) -> Self
Helper method to create Error::SwfParseError.
Sourcepub fn unsupported(message: impl Into<Cow<'static, str>>) -> Self
pub fn unsupported(message: impl Into<Cow<'static, str>>) -> Self
Helper method to create Error::Unsupported.
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)>
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 Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin 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
Mutably borrows from an owned value. Read more