Enum s2protocol::error::S2ProtocolError
source · pub enum S2ProtocolError {
MPQ(MPQParserError),
UnsupportedProtocolVersion(u32),
ByteAligned(String),
BitPacked(String),
UnknownTag(i64),
DuplicateTag(String, i64),
MissingField(String),
ValueError(TryFromIntError),
IoError(Error),
PathNotADir,
UnsupportedEventType,
Utf8Error(Utf8Error),
}Variants§
MPQ(MPQParserError)
Unable to parse the MPQ file, could be corrupted or not a replay file
UnsupportedProtocolVersion(u32)
The protocol version is not yet supported.
ByteAligned(String)
Unable to parse the byte aligned data types
BitPacked(String)
Unable to parse the bit packed data types
UnknownTag(i64)
The data structure tag is not recognized
DuplicateTag(String, i64)
The data structure tag was already parsed
MissingField(String)
A required field was not found
ValueError(TryFromIntError)
Unable to parse a value that should have been an integer
IoError(Error)
An I/O Error
PathNotADir
The path provided was not a file
UnsupportedEventType
An error to be used in TryFrom, when converting from protocol-specific types into our consolidated-types
Utf8Error(Utf8Error)
Conversion to UTF-8 failed, from the Vec
Trait Implementations§
source§impl Debug for S2ProtocolError
impl Debug for S2ProtocolError
source§impl Display for S2ProtocolError
impl Display for S2ProtocolError
source§impl Error for S2ProtocolError
impl Error for S2ProtocolError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<I> From<Err<Error<I>>> for S2ProtocolErrorwhere
I: Clone + Debug,
impl<I> From<Err<Error<I>>> for S2ProtocolErrorwhere I: Clone + Debug,
Conversion of errors from byte aligned parser
source§impl From<Error> for S2ProtocolError
impl From<Error> for S2ProtocolError
source§impl From<MPQParserError> for S2ProtocolError
impl From<MPQParserError> for S2ProtocolError
source§fn from(source: MPQParserError) -> Self
fn from(source: MPQParserError) -> Self
Converts to this type from the input type.
source§impl From<TryFromIntError> for S2ProtocolError
impl From<TryFromIntError> for S2ProtocolError
source§fn from(source: TryFromIntError) -> Self
fn from(source: TryFromIntError) -> Self
Converts to this type from the input type.
source§impl From<Utf8Error> for S2ProtocolError
impl From<Utf8Error> for S2ProtocolError
source§impl<I> ParseError<I> for S2ProtocolErrorwhere
I: Clone,
impl<I> ParseError<I> for S2ProtocolErrorwhere I: Clone,
source§fn from_error_kind(_input: I, kind: ErrorKind) -> Self
fn from_error_kind(_input: I, kind: ErrorKind) -> Self
Creates an error from the input position and an ErrorKind
source§fn append(_input: I, _kind: ErrorKind, other: Self) -> Self
fn append(_input: I, _kind: ErrorKind, other: Self) -> Self
Combines an existing error with a new one created from the input
position and an ErrorKind. This is useful when backtracking
through a parse tree, accumulating error context on the way
Auto Trait Implementations§
impl !RefUnwindSafe for S2ProtocolError
impl Send for S2ProtocolError
impl Sync for S2ProtocolError
impl Unpin for S2ProtocolError
impl !UnwindSafe for S2ProtocolError
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