pub struct StateSnapshot {
pub skill: f32,
pub optimism_bias: f32,
pub last_seen: HashMap<String, u64>,
pub category_count: HashMap<String, u32>,
pub resolved_set: Vec<String>,
pub interaction_count: u64,
pub extended: HashMap<String, f32>,
pub extended_str: HashMap<String, String>,
}Expand description
Serialisable flat representation of ProfileState. Callers persist this to any store (JSON, DB, cookie, etc.) No serde dependency required — pure stdlib.
Fields§
§skill: f32§optimism_bias: f32§last_seen: HashMap<String, u64>§category_count: HashMap<String, u32>§resolved_set: Vec<String>§interaction_count: u64§extended: HashMap<String, f32>§extended_str: HashMap<String, String>Trait Implementations§
Source§impl Clone for StateSnapshot
impl Clone for StateSnapshot
Source§fn clone(&self) -> StateSnapshot
fn clone(&self) -> StateSnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 StateSnapshot
impl Debug for StateSnapshot
Source§impl From<&ProfileState> for StateSnapshot
impl From<&ProfileState> for StateSnapshot
Source§fn from(s: &ProfileState) -> Self
fn from(s: &ProfileState) -> Self
Converts to this type from the input type.
Source§impl From<StateSnapshot> for ProfileState
impl From<StateSnapshot> for ProfileState
Source§fn from(snap: StateSnapshot) -> Self
fn from(snap: StateSnapshot) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for StateSnapshot
impl RefUnwindSafe for StateSnapshot
impl Send for StateSnapshot
impl Sync for StateSnapshot
impl Unpin for StateSnapshot
impl UnsafeUnpin for StateSnapshot
impl UnwindSafe for StateSnapshot
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