Skip to main content

Cell

Trait Cell 

Source
pub trait Cell:
    Copy
    + Default
    + 'static {
    const KIND: Kind;
    const COUNT: u32;
    const WIDTH: usize = _;

    // Required methods
    fn put(&self, out: &mut [u8]);
    fn take(bytes: &[u8]) -> Self;
}
Expand description

A column’s row: COUNT numbers of one Kind.

Required Associated Constants§

Provided Associated Constants§

Source

const WIDTH: usize = _

Bytes a row.

Required Methods§

Source

fn put(&self, out: &mut [u8])

Writes itself into out (WIDTH bytes).

Source

fn take(bytes: &[u8]) -> Self

Reads one back from bytes (WIDTH bytes).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Cell for Option<Atom>

An atom (a name kept once a process: an entity type, a dimension) as its number; NO_ATOM for none.

Source§

const KIND: Kind = Kind::U32

Source§

const COUNT: u32 = 1

Source§

fn put(&self, out: &mut [u8])

Source§

fn take(bytes: &[u8]) -> Option<Atom>

Source§

impl Cell for bool

Source§

const KIND: Kind = Kind::U8

Source§

const COUNT: u32 = 1

Source§

fn put(&self, out: &mut [u8])

Source§

fn take(bytes: &[u8]) -> bool

Source§

impl Cell for f32

Source§

const KIND: Kind = Kind::F32

Source§

const COUNT: u32 = 1

Source§

fn put(&self, out: &mut [u8])

Source§

fn take(bytes: &[u8]) -> f32

Source§

impl Cell for f64

Source§

const KIND: Kind = Kind::F64

Source§

const COUNT: u32 = 1

Source§

fn put(&self, out: &mut [u8])

Source§

fn take(bytes: &[u8]) -> f64

Source§

impl Cell for i32

Source§

const KIND: Kind = Kind::I32

Source§

const COUNT: u32 = 1

Source§

fn put(&self, out: &mut [u8])

Source§

fn take(bytes: &[u8]) -> i32

Source§

impl Cell for i64

Source§

const KIND: Kind = Kind::I64

Source§

const COUNT: u32 = 1

Source§

fn put(&self, out: &mut [u8])

Source§

fn take(bytes: &[u8]) -> i64

Source§

impl Cell for u8

Source§

const KIND: Kind = Kind::U8

Source§

const COUNT: u32 = 1

Source§

fn put(&self, out: &mut [u8])

Source§

fn take(bytes: &[u8]) -> u8

Source§

impl Cell for u32

Source§

const KIND: Kind = Kind::U32

Source§

const COUNT: u32 = 1

Source§

fn put(&self, out: &mut [u8])

Source§

fn take(bytes: &[u8]) -> u32

Source§

impl Cell for u64

Source§

const KIND: Kind = Kind::U64

Source§

const COUNT: u32 = 1

Source§

fn put(&self, out: &mut [u8])

Source§

fn take(bytes: &[u8]) -> u64

Source§

impl<T, const N: usize> Cell for [T; N]
where T: Cell, [T; N]: Default,

Source§

const KIND: Kind = T::KIND

Source§

const COUNT: u32

Source§

fn put(&self, out: &mut [u8])

Source§

fn take(bytes: &[u8]) -> [T; N]

Implementors§

Source§

impl Cell for BlockPos

Source§

const KIND: Kind = Kind::I32

Source§

const COUNT: u32 = 3

Source§

impl Cell for Point

Source§

const KIND: Kind = Kind::F64

Source§

const COUNT: u32 = 3