Struct candle_core::safetensors::MmapedFile
source · pub struct MmapedFile { /* private fields */ }
Implementations§
source§impl MmapedFile
impl MmapedFile
sourcepub unsafe fn new<P: AsRef<Path>>(p: P) -> Result<Self>
pub unsafe fn new<P: AsRef<Path>>(p: P) -> Result<Self>
Creates a wrapper around a memory mapped file from which you can retrieve
tensors using MmapedFile::deserialize
§Safety
The unsafe is inherited from memmap2::MmapOptions
.
pub fn deserialize(&self) -> Result<SafeTensors<'_>>
Auto Trait Implementations§
impl Freeze for MmapedFile
impl RefUnwindSafe for MmapedFile
impl Send for MmapedFile
impl Sync for MmapedFile
impl Unpin for MmapedFile
impl UnwindSafe for MmapedFile
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