[][src]Struct nonogrid::Description

pub struct Description<T: Block> where
    T: Block
{ pub vec: Vec<T>, }

Fields

vec: Vec<T>

Implementations

impl<T> Description<T> where
    T: Block
[src]

pub fn new(vec: Vec<T>) -> Self[src]

pub fn colors(&self) -> impl Iterator<Item = ColorId> + '_[src]

impl<B> Description<B> where
    B: Block
[src]

pub fn block_starts(&self) -> Vec<usize>[src]

pub fn positions_number(&self, line_length: usize) -> usize[src]

The number of potential block positions for given line size.

pub fn color_ranges(&self, line_length: usize) -> HashMap<ColorId, Range<usize>>[src]

For every color in the given description produce a valid position range

Trait Implementations

impl<T: Clone + Block> Clone for Description<T> where
    T: Block
[src]

impl<T: Debug + Block> Debug for Description<T> where
    T: Block
[src]

impl<T: Eq + Block> Eq for Description<T> where
    T: Block
[src]

impl<T: Hash + Block> Hash for Description<T> where
    T: Block
[src]

impl<T: PartialEq + Block> PartialEq<Description<T>> for Description<T> where
    T: Block
[src]

impl<T: Block> StructuralEq for Description<T> where
    T: Block
[src]

impl<T: Block> StructuralPartialEq for Description<T> where
    T: Block
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Description<T> where
    T: RefUnwindSafe

impl<T> Send for Description<T>

impl<T> Sync for Description<T>

impl<T> Unpin for Description<T> where
    T: Unpin

impl<T> UnwindSafe for Description<T> where
    T: UnwindSafe

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?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.