INNER CODE UNIT · Rust

get_sint

gosub-io/gosub-engine · crates/gosub_config/src/lib.rs:229

    pub fn get_sint(&self, key: &str) -> isize {
        self.typed_get(key, 0, Setting::to_sint)
    }

    /// Reads a float setting, returning `0.0` on unknown key or storage error.
    #[must_use]
    pub fn get_float(&self, key: &str) -> f64 {
        self.typed_get(key, 0.0, Setting::to_float)
    }

    /// Reads a string setting, returning an empty string on unknown key or storage error.
    #[must_use]
    pub fn get_string(&self, key: &str) -> String {
        self.typed_get(key, String::new(), Setting::to_string)
    }

    /// Reads a map setting, returning an empty vector on unknown key or storage error.
    #[must_use]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…