pub struct SafeTensorsMetadata {
pub tensors: HashMap<String, SafeTensorEntry>,
pub data_offset: usize,
}Expand description
Parsed SafeTensors header.
Fields§
§tensors: HashMap<String, SafeTensorEntry>§data_offset: usizeImplementations§
Source§impl SafeTensorsMetadata
impl SafeTensorsMetadata
Sourcepub fn parse(bytes: &[u8]) -> Result<Self, EngineError>
pub fn parse(bytes: &[u8]) -> Result<Self, EngineError>
Parses SafeTensors header from bytes.
Trait Implementations§
Source§impl Clone for SafeTensorsMetadata
impl Clone for SafeTensorsMetadata
Auto Trait Implementations§
impl Forget for SafeTensorsMetadata
impl Freeze for SafeTensorsMetadata
impl Move for SafeTensorsMetadata
impl RefUnwindSafe for SafeTensorsMetadata
impl Send for SafeTensorsMetadata
impl Sync for SafeTensorsMetadata
impl Unpin for SafeTensorsMetadata
impl UnsafeUnpin for SafeTensorsMetadata
impl UnwindSafe for SafeTensorsMetadata
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