celly 0.6.0

Cellular automaton library.
1
2
3
4
5
6
7
8
9
10
11
12
13
#![cfg(test)]
use bincode::SizeLimit;
use bincode::serde::{deserialize, serialize};

use traits::Cell;


pub fn to_cell<Cin: Cell, Cout: Cell>(cell: &Cin) -> Cout {
    let encoded: Vec<u8> = serialize(cell, SizeLimit::Infinite).unwrap();
    let cell: Cout = deserialize(&encoded[..]).unwrap();

    cell
}