pub enum LoadError {
Ron(String),
UnknownEvent(String),
UnknownType(String),
BadChance(u32, u32),
UnknownStatus(String),
UnknownStat(String),
UnknownResource(String),
}Expand description
A statement of which thing in the data layer could not be bound to the closed vocabulary. Every variant is a load-time error (doc 11 §4.2: “a malformed record fails at load, never mid-battle”).
Variants§
Ron(String)
The RON text failed to deserialize into the Ruleset shape.
UnknownEvent(String)
A hook’s on: named an event outside the closed Event taxonomy.
UnknownType(String)
A type name referenced in the chart / a HasType predicate is not in the
ruleset’s types: list.
BadChance(u32, u32)
A chance: fraction had a zero denominator (would never gate).
UnknownStatus(String)
A status name referenced by InflictStatus could not be resolved by the
game’s RuleBindings at compile time.
UnknownStat(String)
A stat name referenced by Boost/StatIs could not be resolved.
UnknownResource(String)
A resource name referenced by a cost: entry or a PayResource op is not
in the ruleset’s resources: list (the MP/SP/mana cost gate, doc 13 §4).
Trait Implementations§
impl Eq for LoadError
Source§impl Error for LoadError
impl Error for LoadError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()