pub struct GgufValue { /* private fields */ }Expand description
A parsed, canonicalized GGUF v3 file. The stored bytes are the
flat canonical skeleton (see module docs). alloc-gated
— the pipeline binds the borrowed GgufCarrier.
Implementations§
Source§impl GgufValue
impl GgufValue
Sourcepub fn canonical_bytes(&self) -> &[u8] ⓘ
pub fn canonical_bytes(&self) -> &[u8] ⓘ
Borrow the canonical-skeleton bytes.
Sourcepub fn parse(raw: &[u8]) -> Result<Self, ShapeViolation>
pub fn parse(raw: &[u8]) -> Result<Self, ShapeViolation>
Parse a GGUF v3 input slice into a canonicalized skeleton.
§Errors
A [ShapeViolation] whose constraint_iri names the violated
invariant (bad magic, unsupported version, truncation, an
over-rank tensor, over-deep array nesting, invalid alignment,
an unknown tensor type, or arithmetic overflow).
Trait Implementations§
impl Eq for GgufValue
impl StructuralPartialEq for GgufValue
Auto Trait Implementations§
impl Freeze for GgufValue
impl RefUnwindSafe for GgufValue
impl Send for GgufValue
impl Sync for GgufValue
impl Unpin for GgufValue
impl UnsafeUnpin for GgufValue
impl UnwindSafe for GgufValue
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