aoclib::geometry::map::tile

Trait DisplayWidth

source
pub trait DisplayWidth {
    const DISPLAY_WIDTH: usize;

    // Provided method
    fn chunks(s: &str) -> Chunks<'_, Self>  { ... }
}
Expand description

A type implementing DisplayWidth has a constant width for display and parsing.

This makes it suitable for 2d cartesian maps.

Required Associated Constants§

Provided Methods§

source

fn chunks(s: &str) -> Chunks<'_, Self>

Split a string into an iterator of chunks of characters of length DISPLAY_WIDTH

Object Safety§

This trait is not object safe.

Implementors§