pub struct Tile { /* private fields */ }
Implementations§
Source§impl Tile
impl Tile
pub fn new(x: u8, y: u8) -> Self
pub fn to_flat(self, size: u8) -> FlatTile
pub fn x(&self) -> u8
pub fn y(&self) -> u8
pub fn all(size: u8) -> impl Iterator<Item = Tile>
pub fn all_adjacent(self, size: u8) -> impl Iterator<Item = Tile> + Clone
pub fn adjacent_in(&self, dir: Direction, size: u8) -> Option<Tile>
pub fn exists(&self, size: u8) -> bool
pub fn map_symmetry(&self, sym: D4Symmetry, size: u8) -> Tile
Trait Implementations§
impl Copy for Tile
impl Eq for Tile
impl StructuralPartialEq for Tile
Auto Trait Implementations§
impl Freeze for Tile
impl RefUnwindSafe for Tile
impl Send for Tile
impl Sync for Tile
impl Unpin for Tile
impl UnwindSafe for Tile
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more