[][src]Trait nonogrid::block::base::Block

pub trait Block where
    Self: Debug + PartialEq + Eq + Hash + Default + Clone + Send + Sync
{ type Color: Color; fn from_size_and_color(size: usize, color: Option<ColorId>) -> Self;
fn partial_sums(desc: &[Self]) -> Vec<usize>
    where
        Self: Sized
;
fn size(&self) -> usize;
fn color(&self) -> Self::Color; fn from_str_and_color(s: &str, color: Option<ColorId>) -> Self { ... } }

Associated Types

type Color: Color

Loading content...

Required methods

fn from_size_and_color(size: usize, color: Option<ColorId>) -> Self

fn partial_sums(desc: &[Self]) -> Vec<usize> where
    Self: Sized

fn size(&self) -> usize

fn color(&self) -> Self::Color

Loading content...

Provided methods

fn from_str_and_color(s: &str, color: Option<ColorId>) -> Self

Loading content...

Implementors

impl Block for BinaryBlock[src]

type Color = BinaryColor

fn from_str_and_color(s: &str, color: Option<ColorId>) -> Self[src]

impl Block for ColoredBlock[src]

type Color = MultiColor

fn from_str_and_color(s: &str, color: Option<ColorId>) -> Self[src]

Loading content...