pub struct GgufFile { /* private fields */ }Implementations§
Source§impl GgufFile
impl GgufFile
pub fn open(path: impl AsRef<Path>) -> Result<Self, Qwen3TtsError>
pub fn ctx_ptr(&self) -> *mut gguf_context
pub fn path(&self) -> &Path
pub fn meta_ctx_ptr(&self) -> Option<*mut ggml_context>
pub fn n_tensors(&self) -> i64
pub fn data_offset(&self) -> usize
pub fn key_index(&self, key: &str) -> Option<i64>
pub fn get_u32(&self, key: &str, default: u32) -> u32
pub fn get_f32(&self, key: &str, default: f32) -> f32
pub fn get_str(&self, key: &str) -> Option<String>
pub fn get_arr_str(&self, key: &str) -> Option<Vec<String>>
pub fn tensor_info(&self, name: &str) -> Result<GgufTensorInfo, Qwen3TtsError>
pub fn read_tensor_f32( &self, name: &str, ) -> Result<(GgufTensorInfo, Vec<f32>), Qwen3TtsError>
pub fn read_tensor_bytes( &self, name: &str, ) -> Result<(GgufTensorInfo, Vec<u8>), Qwen3TtsError>
Trait Implementations§
Auto Trait Implementations§
impl !Send for GgufFile
impl !Sync for GgufFile
impl Freeze for GgufFile
impl RefUnwindSafe for GgufFile
impl Unpin for GgufFile
impl UnsafeUnpin for GgufFile
impl UnwindSafe for GgufFile
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