Skip to main content

TileMask34

Struct TileMask34 

Source
pub struct TileMask34(pub u64);
Expand description

1-bit-per-tile version of TileSet34, i.e. non-multi set, set of tile kinds.

Tuple Fields§

§0: u64

Implementations§

Source§

impl TileMask34

Source

pub fn new(__0: u64) -> TileMask34

Source§

impl TileMask34

Source

pub const fn empty_set() -> Self

An empty tile set.

Source

pub const fn complete_set() -> Self

The complete set of tiles (all 34 kinds).

Source

pub fn is_empty(self) -> bool

Returns if this is an empty set.

Source

pub fn any(self) -> bool

Returns if there is at least one kind of tile in the set.

Source

pub fn has(self, tile: Tile) -> bool

Tests if this set contains the given tile.

Source

pub fn has_i(self, i: u8) -> bool

Tests if this set contains the given tile encoding.

Source

pub fn set(&mut self, tile: Tile)

Mutates the set to include the given tile.

Source

pub fn clear(&mut self, tile: Tile)

Mutates the set to exclude the given tile.

Trait Implementations§

Source§

impl BitAnd for TileMask34

Source§

type Output = TileMask34

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: TileMask34) -> TileMask34

Performs the & operation. Read more
Source§

impl BitAndAssign for TileMask34

Source§

fn bitand_assign(&mut self, rhs: TileMask34)

Performs the &= operation. Read more
Source§

impl BitOr for TileMask34

Source§

type Output = TileMask34

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: TileMask34) -> TileMask34

Performs the | operation. Read more
Source§

impl BitOrAssign for TileMask34

Source§

fn bitor_assign(&mut self, rhs: TileMask34)

Performs the |= operation. Read more
Source§

impl BitXor for TileMask34

Source§

type Output = TileMask34

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: TileMask34) -> TileMask34

Performs the ^ operation. Read more
Source§

impl BitXorAssign for TileMask34

Source§

fn bitxor_assign(&mut self, rhs: TileMask34)

Performs the ^= operation. Read more
Source§

impl Clone for TileMask34

Source§

fn clone(&self) -> TileMask34

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for TileMask34

Source§

impl Debug for TileMask34

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TileMask34

Source§

fn default() -> TileMask34

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for TileMask34

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for TileMask34

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for TileMask34

Source§

impl From<TileMask34> for u64

Source§

fn from(original: TileMask34) -> Self

Converts to this type from the input type.
Source§

impl From<TileSet34> for TileMask34

Source§

fn from(ts34: TileSet34) -> Self

Converts to this type from the input type.
Source§

impl From<TileSet37> for TileMask34

Source§

fn from(ts37: TileSet37) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for TileMask34

Source§

fn from(original: u64) -> TileMask34

Converts to this type from the input type.
Source§

impl FromIterator<Tile> for TileMask34

Source§

fn from_iter<T: IntoIterator<Item = Tile>>(tiles: T) -> Self

Creates a value from an iterator. Read more
Source§

impl PartialEq for TileMask34

Source§

fn eq(&self, other: &TileMask34) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for TileMask34

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for TileMask34

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.