pub struct Imatrix { /* private fields */ }Implementations§
Source§impl Imatrix
impl Imatrix
pub fn load( path: &Path, include_weights: &[String], exclude_weights: &[String], ) -> Result<Self>
Sourcepub fn from_bytes(
path: &Path,
bytes: &[u8],
include_weights: &[String],
exclude_weights: &[String],
) -> Result<Self>
pub fn from_bytes( path: &Path, bytes: &[u8], include_weights: &[String], exclude_weights: &[String], ) -> Result<Self>
Parse an importance matrix from caller-owned bytes.
This lets callers bind verification and parsing to the same immutable snapshot instead of reopening a path after it has been hashed.
pub fn entries(&self) -> &[ImatrixEntry]
pub fn source_path(&self) -> &Path
pub fn dataset(&self) -> Option<&str>
pub fn chunk_count(&self) -> i32
pub fn entry_count(&self) -> usize
Trait Implementations§
impl StructuralPartialEq for Imatrix
Auto Trait Implementations§
impl Freeze for Imatrix
impl RefUnwindSafe for Imatrix
impl Send for Imatrix
impl Sync for Imatrix
impl Unpin for Imatrix
impl UnsafeUnpin for Imatrix
impl UnwindSafe for Imatrix
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