Enum ca_formats::macrocell::NodeData[][src]

pub enum NodeData {
    Level1 {
        nw: u8,
        ne: u8,
        sw: u8,
        se: u8,
    },
    Level3(u64),
    Node {
        level: u8,
        nw: usize,
        ne: usize,
        sw: usize,
        se: usize,
    },
}

Data in a Node.

Variants

Level1

A level 1 leaf, representing a 2x2 square, in rules with more than 2 states.

The data contains the states of four cells in the square.

Fields of Level1

nw: u8ne: u8sw: u8se: u8
Level3(u64)

A level 3 leaf, representing a 8x8 square, in rules with 2 states.

The data is represented by a 64-bit integer.

Node

A non-leaf node.

The data contains the level of the node, and the ids of four children.

Fields of Node

level: u8nw: usizene: usizesw: usizese: usize

Implementations

impl NodeData[src]

pub fn level(&self) -> u8[src]

Trait Implementations

impl Clone for NodeData[src]

impl Copy for NodeData[src]

impl Debug for NodeData[src]

impl Eq for NodeData[src]

impl Hash for NodeData[src]

impl Ord for NodeData[src]

impl PartialEq<NodeData> for NodeData[src]

impl PartialOrd<NodeData> for NodeData[src]

impl StructuralEq for NodeData[src]

impl StructuralPartialEq for NodeData[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.