[][src]Struct shakmaty::Material

pub struct Material {
    pub white: MaterialSide,
    pub black: MaterialSide,
}

The material configuration of both sides.

Fields

white: MaterialSideblack: MaterialSide

Methods

impl Material[src]

pub fn new() -> Material[src]

pub fn flip(&mut self)[src]

pub fn flipped(&self) -> Material[src]

pub fn normalize(&mut self)[src]

pub fn normalized(&self) -> Material[src]

pub fn is_symmetric(&self) -> bool[src]

pub fn by_color(&self, color: Color) -> &MaterialSide[src]

pub fn by_color_mut(&mut self, color: Color) -> &mut MaterialSide[src]

pub fn by_piece(&self, piece: Piece) -> u8[src]

pub fn by_piece_mut(&mut self, piece: Piece) -> &mut u8[src]

pub fn is_empty(&self) -> bool[src]

pub fn count(&self) -> usize[src]

pub fn has_pawns(&self) -> bool[src]

pub fn from_ascii(s: &[u8]) -> Result<Material, ParseMaterialError>[src]

pub fn from_ascii_fen(s: &[u8]) -> Result<Material, ParseMaterialError>[src]

pub fn fen(&self) -> String[src]

Trait Implementations

impl Clone for Material[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for Material[src]

impl Extend<Piece> for Material[src]

impl Eq for Material[src]

impl PartialEq<Material> for Material[src]

impl Hash for Material[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Display for Material[src]

impl Debug for Material[src]

impl<'a> Add<&'a Material> for Material[src]

type Output = Material

The resulting type after applying the + operator.

impl Add<Material> for Material[src]

type Output = Material

The resulting type after applying the + operator.

impl<'a> Sub<&'a Material> for Material[src]

type Output = Material

The resulting type after applying the - operator.

impl Sub<Material> for Material[src]

type Output = Material

The resulting type after applying the - operator.

impl<'a> AddAssign<&'a Material> for Material[src]

impl AddAssign<Material> for Material[src]

impl<'a> SubAssign<&'a Material> for Material[src]

impl SubAssign<Material> for Material[src]

impl FromIterator<Piece> for Material[src]

impl FromStr for Material[src]

type Err = ParseMaterialError

The associated error which can be returned from parsing.

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]