get_or

Function get_or 

Source
pub fn get_or<T: DeserializeOwned>(key: &str, default: T) -> Result<T>
Expand description

Get a value or return a default.

§Example

let count: i32 = state::get_or("counter", 0)?;