Enum swf_parser::complete::SwfParseError
source · [−]pub enum SwfParseError {
InvalidSignature,
UnsupportedCompression(CompressionMethod),
InvalidPayload,
InvalidHeader,
}
Expand description
Represents the possible parse errors when parsing an SWF file.
Fatal errors can only occur at the beginning of the parsing. Once the header
is parsed, the tags are always parsed successfully. Invalid tags produce
Raw
tags but don’t prevent the parser from completing: the parser is
resilient to invalid (or unknown) tags.
Variants
InvalidSignature
Indicates an invalid SWF signature.
The SWF signature corresponds to the first 8 bytes of the movie. This error occurs either if there is not enough data to even parse the signature or if the compression method is invalid.
UnsupportedCompression(CompressionMethod)
Indicates that the compression method used by the payload isn’t supported.
This can only happen when the corresponding Cargo feature is disabled.
InvalidPayload
Indicates a failure to decompress the payload.
The payload represents all the data following the SWF signature.
If the SWF file uses a compressed payload (Deflate
or Lzma
), this
error is emitted when the decompression fails for any reason.
InvalidHeader
Indicates an invalid movie header.
The movie header corresponds to the first few bytes of the payload. This error occurs if there is not enough data to parse the header.
Trait Implementations
sourceimpl Clone for SwfParseError
impl Clone for SwfParseError
sourcefn clone(&self) -> SwfParseError
fn clone(&self) -> SwfParseError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SwfParseError
impl Debug for SwfParseError
sourceimpl Display for SwfParseError
impl Display for SwfParseError
sourceimpl Error for SwfParseError
impl Error for SwfParseError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl Hash for SwfParseError
impl Hash for SwfParseError
sourceimpl Ord for SwfParseError
impl Ord for SwfParseError
sourceimpl PartialEq<SwfParseError> for SwfParseError
impl PartialEq<SwfParseError> for SwfParseError
sourcefn eq(&self, other: &SwfParseError) -> bool
fn eq(&self, other: &SwfParseError) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SwfParseError) -> bool
fn ne(&self, other: &SwfParseError) -> bool
This method tests for !=
.
sourceimpl PartialOrd<SwfParseError> for SwfParseError
impl PartialOrd<SwfParseError> for SwfParseError
sourcefn partial_cmp(&self, other: &SwfParseError) -> Option<Ordering>
fn partial_cmp(&self, other: &SwfParseError) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for SwfParseError
impl Eq for SwfParseError
impl StructuralEq for SwfParseError
impl StructuralPartialEq for SwfParseError
Auto Trait Implementations
impl RefUnwindSafe for SwfParseError
impl Send for SwfParseError
impl Sync for SwfParseError
impl Unpin for SwfParseError
impl UnwindSafe for SwfParseError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more