pub struct GameCell { /* private fields */ }Implementations§
Source§impl GameCell
impl GameCell
pub fn new( x: i16, y: i16, kind: CellKind, name: &str, color: Color, access: CellAccess, ) -> Self
pub fn move_up(&mut self)
pub fn move_down(&mut self)
pub fn move_left(&mut self)
pub fn move_right(&mut self)
pub fn inside(&self, x1: u16, y1: u16, x2: u16, y2: u16) -> bool
pub fn x(&self) -> u16
pub fn y(&self) -> u16
pub fn kind(&self) -> CellKind
pub fn name(&self) -> String
pub fn color(&self) -> Color
pub fn access(&self) -> CellAccess
pub fn visible(&self) -> CellVisibility
pub fn set_visible(&mut self, visible: CellVisibility)
Trait Implementations§
impl StructuralPartialEq for GameCell
Auto Trait Implementations§
impl Freeze for GameCell
impl RefUnwindSafe for GameCell
impl Send for GameCell
impl Sync for GameCell
impl Unpin for GameCell
impl UnsafeUnpin for GameCell
impl UnwindSafe for GameCell
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.