Skip to main content

GGUFMetadataValue

Enum GGUFMetadataValue 

Source
pub enum GGUFMetadataValue {
Show 13 variants Uint8(u8), Int8(i8), Uint16(u16), Int16(i16), Uint32(u32), Int32(i32), Uint64(u64), Int64(i64), Float32(f32), Float64(f64), Bool(bool), String(String), Array(Box<[GGUFMetadataValue]>),
}
Expand description

GGUF metadata value.

Maps one-to-one onto the GGUF file format metadata types (TYPE_INT8 .. TYPE_UINT64, TYPE_F32, TYPE_F64, TYPE_BOOL, TYPE_STRING), plus GGUF_ARRAY, whose elements are recursively GGUFMetadataValues.

Variants§

§

Uint8(u8)

Unsigned 8-bit integer

§

Int8(i8)

Signed 8-bit integer

§

Uint16(u16)

Unsigned 16-bit integer

§

Int16(i16)

Signed 16-bit integer

§

Uint32(u32)

Unsigned 32-bit integer

§

Int32(i32)

Signed 32-bit integer

§

Uint64(u64)

Unsigned 64-bit integer

§

Int64(i64)

Signed 64-bit integer

§

Float32(f32)

32-bit floating-point number

§

Float64(f64)

64-bit floating-point number

§

Bool(bool)

Boolean value

§

String(String)

UTF-8 string

§

Array(Box<[GGUFMetadataValue]>)

Array of arbitrary metadata values

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.