[][src]Trait ndarray_npy::WritableElement

pub unsafe trait WritableElement: Sized {
    fn type_descriptor() -> PyValue;
fn write<W: Write>(&self, writer: W) -> Result<(), WriteDataError>;
fn write_slice<W: Write>(
        slice: &[Self],
        writer: W
    ) -> Result<(), WriteDataError>; }

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

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<(), WriteDataError>

Writes a single instance of Self to the writer.

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

Writes a slice of Self to the writer.

Loading content...

Implementations on Foreign Types

impl WritableElement for i8[src]

impl WritableElement for u8[src]

impl WritableElement for i16[src]

impl WritableElement for i32[src]

impl WritableElement for i64[src]

impl WritableElement for u16[src]

impl WritableElement for u32[src]

impl WritableElement for u64[src]

impl WritableElement for f32[src]

impl WritableElement for f64[src]

impl WritableElement for bool[src]

Loading content...

Implementors

Loading content...