pub struct ProgressionSnapshot {
pub base: u32,
pub growth: u32,
pub maximum: u16,
pub level: u16,
pub xp: u64,
}Expand description
Plain state plus the exact authored curve, with no serialization or wire ABI.
Public fields let a host decode its own format. Progression::restore
validates every field before replacing state; this type alone is untrusted.
No fingerprint substitutes for equality of base, growth and maximum.
Fields§
§base: u32Positive initial promotion cost.
growth: u32Per-level additive cost growth, including zero.
maximum: u16Authored level cap, in 1..=1024.
level: u16Current level, in 1..=maximum.
xp: u64Remainder, strictly below next cost unless at the cap.
Trait Implementations§
Source§impl Clone for ProgressionSnapshot
impl Clone for ProgressionSnapshot
Source§fn clone(&self) -> ProgressionSnapshot
fn clone(&self) -> ProgressionSnapshot
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProgressionSnapshot
impl Debug for ProgressionSnapshot
Source§impl PartialEq for ProgressionSnapshot
impl PartialEq for ProgressionSnapshot
impl Copy for ProgressionSnapshot
impl Eq for ProgressionSnapshot
impl StructuralPartialEq for ProgressionSnapshot
Auto Trait Implementations§
impl Freeze for ProgressionSnapshot
impl RefUnwindSafe for ProgressionSnapshot
impl Send for ProgressionSnapshot
impl Sync for ProgressionSnapshot
impl Unpin for ProgressionSnapshot
impl UnwindSafe for ProgressionSnapshot
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