pub struct Formatting {
pub row_spacing: u8,
pub tile_spacing: u8,
pub top_indent: u8,
pub left_indent: u8,
pub bottom_indent: u8,
}
Expand description
Formatting
represents instructions for TileMap<T>
on how to draw tilemap to the terminal
row_spacing
- number of additional newlines between every row, defaults to 1
tile_spacing
- number of spaces between every tile, defaults to 1
top_indent
- number of newlines to insert before drawing the tilemap, defaults to 3
left_indent
- number of tabs to insert at the start of every row, defaults to 1
bottom_indent
- number of newlines to insert after drawing the tilemap, defaults to 2
§Examples
use cli_tilemap::Formatting;
let f = Formatting::default();
assert_eq!(f.row_spacing, 1);
assert_eq!(f.tile_spacing, 1);
assert_eq!(f.top_indent, 3);
assert_eq!(f.left_indent, 1);
assert_eq!(f.bottom_indent, 2);
Fields§
§row_spacing: u8
§tile_spacing: u8
§top_indent: u8
§left_indent: u8
§bottom_indent: u8
Trait Implementations§
Source§impl Clone for Formatting
impl Clone for Formatting
Source§fn clone(&self) -> Formatting
fn clone(&self) -> Formatting
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Formatting
impl Debug for Formatting
Source§impl Default for Formatting
Implements default values for Formatting
impl Default for Formatting
Implements default values for Formatting
Source§impl PartialEq for Formatting
impl PartialEq for Formatting
impl Copy for Formatting
impl Eq for Formatting
impl StructuralPartialEq for Formatting
Auto Trait Implementations§
impl Freeze for Formatting
impl RefUnwindSafe for Formatting
impl Send for Formatting
impl Sync for Formatting
impl Unpin for Formatting
impl UnwindSafe for Formatting
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more