pub enum GgufMetadataValue {
Array(Array),
String(String),
Strings(Vec<String>),
}Expand description
A value stored in the GGUF metadata namespace.
use mlx_rs::{io::{GgufMetadataKind, GgufMetadataValue}, Array};
let value = GgufMetadataValue::from(Array::from_int(7));
assert_eq!(value.kind(), GgufMetadataKind::Array);Variants§
Array(Array)
A scalar or one-dimensional metadata array.
String(String)
A single UTF-8 string.
Strings(Vec<String>)
A list of UTF-8 strings.
Implementations§
Source§impl GgufMetadataValue
impl GgufMetadataValue
Sourcepub fn kind(&self) -> GgufMetadataKind
pub fn kind(&self) -> GgufMetadataKind
Returns the value’s metadata kind.
Trait Implementations§
Source§impl Clone for GgufMetadataValue
impl Clone for GgufMetadataValue
Source§fn clone(&self) -> GgufMetadataValue
fn clone(&self) -> GgufMetadataValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GgufMetadataValue
impl Debug for GgufMetadataValue
Source§impl From<&Array> for GgufMetadataValue
impl From<&Array> for GgufMetadataValue
Source§impl From<&str> for GgufMetadataValue
impl From<&str> for GgufMetadataValue
Source§impl From<Array> for GgufMetadataValue
impl From<Array> for GgufMetadataValue
Source§impl From<String> for GgufMetadataValue
impl From<String> for GgufMetadataValue
Auto Trait Implementations§
impl !Sync for GgufMetadataValue
impl Freeze for GgufMetadataValue
impl RefUnwindSafe for GgufMetadataValue
impl Send for GgufMetadataValue
impl Unpin for GgufMetadataValue
impl UnsafeUnpin for GgufMetadataValue
impl UnwindSafe for GgufMetadataValue
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Convert into an
Option.