#[non_exhaustive]pub enum MetadataValue {
String(String),
UInt(u64),
Int(i64),
F32(f32),
F64(f64),
}Expand description
Owned scalar metadata value.
GGUF numeric metadata is exposed as the parser stores it: unsigned and
bool values as Self::UInt, signed integers as Self::Int, and
floats at their stored width. GGUF arrays are not captured by the
parser and are absent. general.alignment is a layout field rather
than metadata: it is never listed (the parser cannot tell a declared
value from the default 32); read the effective value from
GgufBackend::layout().alignment. Safetensors metadata is string-only.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
String(String)
String value.
UInt(u64)
Unsigned integer (GGUF UINT* and BOOL).
Int(i64)
Signed integer (GGUF INT*).
F32(f32)
32-bit float.
F64(f64)
64-bit float.
Implementations§
Trait Implementations§
Source§impl Clone for MetadataValue
impl Clone for MetadataValue
Source§impl Debug for MetadataValue
impl Debug for MetadataValue
Source§impl Display for MetadataValue
impl Display for MetadataValue
Source§impl PartialEq for MetadataValue
impl PartialEq for MetadataValue
impl StructuralPartialEq for MetadataValue
Auto Trait Implementations§
impl Forget for MetadataValue
impl Freeze for MetadataValue
impl Move for MetadataValue
impl RefUnwindSafe for MetadataValue
impl Send for MetadataValuewhere
RawVecInner: Send,
impl Sync for MetadataValuewhere
RawVecInner: Sync,
impl Unpin for MetadataValue
impl UnsafeUnpin for MetadataValue
impl UnwindSafe for MetadataValuewhere
RawVecInner: UnwindSafe,
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