[][src]Trait ndarray_npy::WritableElement

pub unsafe trait WritableElement: Sized {
    type Error: 'static + Error + Send + Sync;
    fn type_descriptor() -> PyValue;
fn write<W: Write>(&self, writer: W) -> Result<(), Self::Error>;
fn write_slice<W: Write>(
        slice: &[Self],
        writer: W
    ) -> Result<(), Self::Error>; }

An array element type that can be written to an .npy or .npz file.

Associated Types

type Error: 'static + Error + Send + Sync

Loading content...

Required methods

fn type_descriptor() -> PyValue

Returns a descriptor of the type that can be used in the header.

fn write<W: Write>(&self, writer: W) -> Result<(), Self::Error>

Writes a single instance of Self to the writer.

fn write_slice<W: Write>(slice: &[Self], writer: W) -> Result<(), Self::Error>

Writes a slice of Self to the writer.

Loading content...

Implementations on Foreign Types

impl WritableElement for i8[src]

type Error = Error

impl WritableElement for u8[src]

type Error = Error

impl WritableElement for i16[src]

type Error = Error

impl WritableElement for i32[src]

type Error = Error

impl WritableElement for i64[src]

type Error = Error

impl WritableElement for u16[src]

type Error = Error

impl WritableElement for u32[src]

type Error = Error

impl WritableElement for u64[src]

type Error = Error

impl WritableElement for f32[src]

type Error = Error

impl WritableElement for f64[src]

type Error = Error

impl WritableElement for bool[src]

type Error = Error

Loading content...

Implementors

Loading content...