Enum hexgame::CoordsOrEdge
source · [−]Expand description
Represents either a cell of the board or an edge. This type is used in a few places that may return both coords and edges (e.g. get_neighbors).
Variants
Coords(Coords)
Edge(Edge)
Trait Implementations
sourceimpl Clone for CoordsOrEdge
impl Clone for CoordsOrEdge
sourcefn clone(&self) -> CoordsOrEdge
fn clone(&self) -> CoordsOrEdge
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CoordsOrEdge
impl Debug for CoordsOrEdge
sourceimpl From<Coords> for CoordsOrEdge
impl From<Coords> for CoordsOrEdge
sourcefn from(coords: Coords) -> CoordsOrEdge
fn from(coords: Coords) -> CoordsOrEdge
Performs the conversion.
sourceimpl From<Edge> for CoordsOrEdge
impl From<Edge> for CoordsOrEdge
sourcefn from(edge: Edge) -> CoordsOrEdge
fn from(edge: Edge) -> CoordsOrEdge
Performs the conversion.
sourceimpl PartialEq<CoordsOrEdge> for CoordsOrEdge
impl PartialEq<CoordsOrEdge> for CoordsOrEdge
sourcefn eq(&self, other: &CoordsOrEdge) -> bool
fn eq(&self, other: &CoordsOrEdge) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &CoordsOrEdge) -> bool
fn ne(&self, other: &CoordsOrEdge) -> bool
This method tests for !=
.
impl Copy for CoordsOrEdge
impl Eq for CoordsOrEdge
impl StructuralEq for CoordsOrEdge
impl StructuralPartialEq for CoordsOrEdge
Auto Trait Implementations
impl RefUnwindSafe for CoordsOrEdge
impl Send for CoordsOrEdge
impl Sync for CoordsOrEdge
impl Unpin for CoordsOrEdge
impl UnwindSafe for CoordsOrEdge
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more