Skip to main content

CellType

Trait CellType 

Source
pub trait CellType:
    Copy
    + Send
    + Sync
    + 'static {
    const TAG: u8;
    const NAME: &'static str;

    // Required methods
    fn to_bits(self) -> u64;
    fn from_bits(bits: u64) -> Self;
}
Expand description

A value that fits one cell: 64 bits, and a tag that says which type they spell.

Required Associated Constants§

Source

const TAG: u8

Source

const NAME: &'static str

Required Methods§

Source

fn to_bits(self) -> u64

Source

fn from_bits(bits: u64) -> Self

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 CellType for bool

Source§

const TAG: u8 = 4

Source§

const NAME: &'static str = "bool"

Source§

fn to_bits(self) -> u64

Source§

fn from_bits(bits: u64) -> Self

Source§

impl CellType for f64

Source§

const TAG: u8 = 3

Source§

const NAME: &'static str = "float"

Source§

fn to_bits(self) -> u64

Source§

fn from_bits(bits: u64) -> Self

Source§

impl CellType for i64

Source§

const TAG: u8 = 1

Source§

const NAME: &'static str = "int"

Source§

fn to_bits(self) -> u64

Source§

fn from_bits(bits: u64) -> Self

Source§

impl CellType for u64

Source§

const TAG: u8 = 2

Source§

const NAME: &'static str = "unsigned"

Source§

fn to_bits(self) -> u64

Source§

fn from_bits(bits: u64) -> Self

Implementors§