#[non_exhaustive]pub enum HeroValuesError {
Show 13 variants
UnknownVersion {
version: String,
},
Malformed(String),
InvalidFormat {
found: String,
},
UnknownKind {
kind: String,
},
EmptyId(&'static str),
NonPositiveAmount {
field: &'static str,
},
UnknownHero {
hero: HeroId,
},
UnknownSlot {
hero: HeroId,
slot: LogicalSlot,
},
AmbiguousSlot {
hero: HeroId,
slot: LogicalSlot,
},
UnknownVariant {
hero: HeroId,
slot: LogicalSlot,
variant: AbilityVariant,
},
DuplicateHero {
hero: HeroId,
},
DuplicateValue {
hero: HeroId,
value: String,
},
GameplayDataUnavailable(GameplayDataError),
}Expand description
Validation and lookup errors for hero-values files.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnknownVersion
Malformed(String)
InvalidFormat
UnknownKind
EmptyId(&'static str)
NonPositiveAmount
UnknownHero
UnknownSlot
AmbiguousSlot
UnknownVariant
DuplicateHero
DuplicateValue
Trait Implementations§
Source§impl Clone for HeroValuesError
impl Clone for HeroValuesError
Source§impl Debug for HeroValuesError
impl Debug for HeroValuesError
Source§impl Display for HeroValuesError
impl Display for HeroValuesError
Source§impl Error for HeroValuesError
impl Error for HeroValuesError
1.30.0 · 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 PartialEq for HeroValuesError
impl PartialEq for HeroValuesError
impl StructuralPartialEq for HeroValuesError
Auto Trait Implementations§
impl Freeze for HeroValuesError
impl RefUnwindSafe for HeroValuesError
impl Send for HeroValuesError
impl Sync for HeroValuesError
impl Unpin for HeroValuesError
impl UnsafeUnpin for HeroValuesError
impl UnwindSafe for HeroValuesError
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