pub struct Square {
pub occupant: Option<Piece>,
pub state: SquareState,
}
Expand description
Board squares given by a state and a possible occupying game piece
Fields
occupant: Option<Piece>
Game piece if square is occupied
state: SquareState
Description of whether the square is occupied or an unplayable, i.e. off-lattice square
Implementations
Trait Implementations
sourceimpl FromWasmAbi for Square
impl FromWasmAbi for Square
sourceimpl IntoWasmAbi for Square
impl IntoWasmAbi for Square
sourceimpl OptionFromWasmAbi for Square
impl OptionFromWasmAbi for Square
sourceimpl OptionIntoWasmAbi for Square
impl OptionIntoWasmAbi for Square
sourceimpl RefFromWasmAbi for Square
impl RefFromWasmAbi for Square
type Anchor = Ref<'static, Square>
type Anchor = Ref<'static, Square>
The type that holds the reference to Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous. Read more
sourceunsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor
Recover a Self::Anchor
from Self::Abi
. Read more
sourceimpl RefMutFromWasmAbi for Square
impl RefMutFromWasmAbi for Square
sourceimpl WasmDescribe for Square
impl WasmDescribe for Square
impl Copy for Square
impl Eq for Square
impl StructuralEq for Square
impl StructuralPartialEq for Square
Auto Trait Implementations
impl RefUnwindSafe for Square
impl Send for Square
impl Sync for Square
impl Unpin for Square
impl UnwindSafe for Square
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ReturnWasmAbi for T where
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for T where
T: IntoWasmAbi,
type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as IntoWasmAbi::Abi
sourcefn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
. Read more