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§
Source§impl Clone for SwfParseError
impl Clone for SwfParseError
Source§fn clone(&self) -> SwfParseError
fn clone(&self) -> SwfParseError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more