Trait NumpyArrayElement

Source
pub trait NumpyArrayElement {
    const DATA_SIZE: usize;
    const DATA_FORMAT: &'static str;

    // Required method
    fn encode_npy_element<W: Write>(&self, out: &mut W) -> Result<()>;
}

Required Associated Constants§

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl NumpyArrayElement for f32

Source§

const DATA_SIZE: usize = 4usize

Source§

const DATA_FORMAT: &'static str = "<f4"

Source§

fn encode_npy_element<W: Write>(&self, out: &mut W) -> Result<()>

Source§

impl NumpyArrayElement for f64

Source§

const DATA_SIZE: usize = 8usize

Source§

const DATA_FORMAT: &'static str = "<f8"

Source§

fn encode_npy_element<W: Write>(&self, out: &mut W) -> Result<()>

Source§

impl NumpyArrayElement for i8

Source§

const DATA_SIZE: usize = 1usize

Source§

const DATA_FORMAT: &'static str = "<i1"

Source§

fn encode_npy_element<W: Write>(&self, out: &mut W) -> Result<()>

Source§

impl NumpyArrayElement for i16

Source§

const DATA_SIZE: usize = 2usize

Source§

const DATA_FORMAT: &'static str = "<i2"

Source§

fn encode_npy_element<W: Write>(&self, out: &mut W) -> Result<()>

Source§

impl NumpyArrayElement for i32

Source§

const DATA_SIZE: usize = 4usize

Source§

const DATA_FORMAT: &'static str = "<i4"

Source§

fn encode_npy_element<W: Write>(&self, out: &mut W) -> Result<()>

Source§

impl NumpyArrayElement for i64

Source§

const DATA_SIZE: usize = 8usize

Source§

const DATA_FORMAT: &'static str = "<i8"

Source§

fn encode_npy_element<W: Write>(&self, out: &mut W) -> Result<()>

Source§

impl NumpyArrayElement for u8

Source§

const DATA_SIZE: usize = 1usize

Source§

const DATA_FORMAT: &'static str = "<u1"

Source§

fn encode_npy_element<W: Write>(&self, out: &mut W) -> Result<()>

Source§

impl NumpyArrayElement for u16

Source§

const DATA_SIZE: usize = 2usize

Source§

const DATA_FORMAT: &'static str = "<u2"

Source§

fn encode_npy_element<W: Write>(&self, out: &mut W) -> Result<()>

Source§

impl NumpyArrayElement for u32

Source§

const DATA_SIZE: usize = 4usize

Source§

const DATA_FORMAT: &'static str = "<u4"

Source§

fn encode_npy_element<W: Write>(&self, out: &mut W) -> Result<()>

Source§

impl NumpyArrayElement for u64

Source§

const DATA_SIZE: usize = 8usize

Source§

const DATA_FORMAT: &'static str = "<u8"

Source§

fn encode_npy_element<W: Write>(&self, out: &mut W) -> Result<()>

Implementors§