Skip to main content

encode_mode_state

Function encode_mode_state 

Source
pub fn encode_mode_state<T>(state: &T) -> Vec<u8> 
where T: Serialize,
Expand description

Shared mode-state JSON codec (extracted from six per-mode copies). Encoding a mode-state struct cannot fail; if it ever does, panic loudly rather than silently persisting an empty state.