pub enum DecodeError {
Show 16 variants
NoStartBlock,
UnknownVersion(UnknownEncodingVersion),
StartReparse,
UnknownBlock(InvalidBlockId),
BadString,
BadItemType(BadItemType),
BadGearType(BadGearType),
BadClassType(BadClassType),
BadSkillType(BadSkillType),
BadAttackSpeed(BadAttackSpeed),
BadElement(BadElement),
BadPowderTier(InvalidPowderTier),
BadConsumableType(BadConsumableType),
BadEffectType(BadEffectType),
UnexpectedEndOfBytes,
BadCodepoint(BadCodepoint),
}
Expand description
Potential errors thrown while decoding id strings
Variants§
NoStartBlock
The idstring does not start with a valid start block
UnknownVersion(UnknownEncodingVersion)
Encoding of an unknown potentially future version was hit
StartReparse
Decoder found a second start block in the data
UnknownBlock(InvalidBlockId)
Decoder hit an unknown block which it could not decode
BadString
An invalid non ascii/utf-8 string was decoded by the parser
BadItemType(BadItemType)
An invalid type was found
BadGearType(BadGearType)
BadClassType(BadClassType)
An invalid class type was encountered
BadSkillType(BadSkillType)
An invalid skill type was encountered
BadAttackSpeed(BadAttackSpeed)
An invalid attack speed was encountered
BadElement(BadElement)
An invalid element id was encountered
BadPowderTier(InvalidPowderTier)
An invalid powder tier was encountered
BadConsumableType(BadConsumableType)
An invalid consumable type was encountered
BadEffectType(BadEffectType)
An invalid effect type was encountered
UnexpectedEndOfBytes
The decoder unexpectedly ran out of bytes to decode while decoding
BadCodepoint(BadCodepoint)
The decoder hit an invalid codepoint while decoding
Trait Implementations§
Source§impl Debug for DecodeError
impl Debug for DecodeError
Source§impl Display for DecodeError
impl Display for DecodeError
Source§impl Error for DecodeError
impl Error for DecodeError
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()
Source§impl From<BadAttackSpeed> for DecodeError
impl From<BadAttackSpeed> for DecodeError
Source§fn from(source: BadAttackSpeed) -> Self
fn from(source: BadAttackSpeed) -> Self
Converts to this type from the input type.
Source§impl From<BadClassType> for DecodeError
impl From<BadClassType> for DecodeError
Source§fn from(source: BadClassType) -> Self
fn from(source: BadClassType) -> Self
Converts to this type from the input type.
Source§impl From<BadCodepoint> for DecodeError
impl From<BadCodepoint> for DecodeError
Source§fn from(source: BadCodepoint) -> Self
fn from(source: BadCodepoint) -> Self
Converts to this type from the input type.
Source§impl From<BadConsumableType> for DecodeError
impl From<BadConsumableType> for DecodeError
Source§fn from(source: BadConsumableType) -> Self
fn from(source: BadConsumableType) -> Self
Converts to this type from the input type.
Source§impl From<BadEffectType> for DecodeError
impl From<BadEffectType> for DecodeError
Source§fn from(source: BadEffectType) -> Self
fn from(source: BadEffectType) -> Self
Converts to this type from the input type.
Source§impl From<BadElement> for DecodeError
impl From<BadElement> for DecodeError
Source§fn from(source: BadElement) -> Self
fn from(source: BadElement) -> Self
Converts to this type from the input type.
Source§impl From<BadGearType> for DecodeError
impl From<BadGearType> for DecodeError
Source§fn from(source: BadGearType) -> Self
fn from(source: BadGearType) -> Self
Converts to this type from the input type.
Source§impl From<BadItemType> for DecodeError
impl From<BadItemType> for DecodeError
Source§fn from(source: BadItemType) -> Self
fn from(source: BadItemType) -> Self
Converts to this type from the input type.
Source§impl From<BadSkillType> for DecodeError
impl From<BadSkillType> for DecodeError
Source§fn from(source: BadSkillType) -> Self
fn from(source: BadSkillType) -> Self
Converts to this type from the input type.
Source§impl From<InvalidBlockId> for DecodeError
impl From<InvalidBlockId> for DecodeError
Source§fn from(source: InvalidBlockId) -> Self
fn from(source: InvalidBlockId) -> Self
Converts to this type from the input type.
Source§impl From<InvalidPowderTier> for DecodeError
impl From<InvalidPowderTier> for DecodeError
Source§fn from(source: InvalidPowderTier) -> Self
fn from(source: InvalidPowderTier) -> Self
Converts to this type from the input type.
Source§impl From<UnknownEncodingVersion> for DecodeError
impl From<UnknownEncodingVersion> for DecodeError
Source§fn from(source: UnknownEncodingVersion) -> Self
fn from(source: UnknownEncodingVersion) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DecodeError
impl RefUnwindSafe for DecodeError
impl Send for DecodeError
impl Sync for DecodeError
impl Unpin for DecodeError
impl UnwindSafe for DecodeError
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