pub trait GgufMeta {
// Required methods
fn get_u64(&self, key: &str) -> Option<u64>;
fn get_f64(&self, key: &str) -> Option<f64>;
fn get_str(&self, key: &str) -> Option<&str>;
fn get_arr_len(&self, key: &str) -> Option<usize>;
}Expand description
Typed read access to GGUF metadata. Implemented by the spark-runtime GGUF
parser over its parsed key/value table. All getters return None when the
key is absent or holds a different value type — the builder decides whether
absence is fatal or has a derivation rule.
Required Methods§
Sourcefn get_u64(&self, key: &str) -> Option<u64>
fn get_u64(&self, key: &str) -> Option<u64>
Any unsigned/signed integer metadata value, widened to u64.
Sourcefn get_f64(&self, key: &str) -> Option<f64>
fn get_f64(&self, key: &str) -> Option<f64>
Any float metadata value (f32/f64), widened to f64.
Sourcefn get_arr_len(&self, key: &str) -> Option<usize>
fn get_arr_len(&self, key: &str) -> Option<usize>
Length of an array metadata value (e.g. tokenizer.ggml.tokens).