#[repr(transparent)]pub struct RateId(pub u32);Expand description
A game rate of HostApi::rate and
HostApi::set_rate, by the loader’s stable
number; the safe layer names them with rates::Rate.
§Examples
use enshwick::abi::RateId;
assert_ne!(RateId::EXPERIENCE_COMBAT, RateId::FACTORY_PRODUCTION_SPEED);Tuple Fields§
§0: u32Implementations§
Source§impl RateId
impl RateId
Sourcepub const EXPERIENCE_COMBAT: Self
pub const EXPERIENCE_COMBAT: Self
Experience from combat.
Sourcepub const EXPERIENCE_MINING: Self
pub const EXPERIENCE_MINING: Self
Experience from mining.
Sourcepub const EXPERIENCE_EXPLORATION_QUESTS: Self
pub const EXPERIENCE_EXPLORATION_QUESTS: Self
Experience from exploration and quests.
Sourcepub const FACTORY_PRODUCTION_SPEED: Self
pub const FACTORY_PRODUCTION_SPEED: Self
How fast workshops produce.
Sourcepub const RESOURCE_DROP_STACK_AMOUNT: Self
pub const RESOURCE_DROP_STACK_AMOUNT: Self
How many resources a drop stacks.
Sourcepub const SKILL_POINTS: Self
pub const SKILL_POINTS: Self
The skill points a character gains per level.
Sourcepub const fn recipe_output(kind: RecipeKind) -> Self
pub const fn recipe_output(kind: RecipeKind) -> Self
How many items a recipe makes, for the recipes whose output is of
kind: one id per RecipeKind code, above
every other rate’s.
§Examples
use enshwick::abi::{RateId, RecipeKind};
assert_ne!(RateId::recipe_output(RecipeKind::ROOF), RateId::recipe_output(RecipeKind::OTHER));Trait Implementations§
impl Copy for RateId
impl Eq for RateId
Source§impl Ord for RateId
impl Ord for RateId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for RateId
impl PartialOrd for RateId
impl StructuralPartialEq for RateId
Auto Trait Implementations§
impl Freeze for RateId
impl RefUnwindSafe for RateId
impl Send for RateId
impl Sync for RateId
impl Unpin for RateId
impl UnsafeUnpin for RateId
impl UnwindSafe for RateId
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