pub struct Header {
pub type_descriptor: Value,
pub layout: Layout,
pub shape: Vec<usize>,
}Expand description
Header of an .npy file.
Fields§
§type_descriptor: ValueA Python literal which can be passed as an argument to the numpy.dtype constructor to
create the array’s dtype.
layout: LayoutThe layout of the array.
shape: Vec<usize>The shape of the array.
Implementations§
Source§impl Header
impl Header
Sourcepub fn from_reader<R: Read>(reader: &mut R) -> Result<Self, ReadHeaderError>
pub fn from_reader<R: Read>(reader: &mut R) -> Result<Self, ReadHeaderError>
Deserializes a header from the provided reader.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Header
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)