#[repr(usize)]pub enum Colour {
Show 65 variants
Black = 0,
Blue = 1,
Red = 2,
Green = 3,
Yellow = 4,
Grey = 5,
Fuchsia = 6,
Orange = 7,
Teal = 8,
Brown = 9,
ToBlack = 10,
ToBlue = 11,
ToRed = 12,
ToGreen = 13,
ToYellow = 14,
ToGrey = 15,
ToFuchsia = 16,
ToOrange = 17,
ToTeal = 18,
ToBrown = 19,
FromBlack = 20,
FromBlue = 21,
FromRed = 22,
FromGreen = 23,
FromYellow = 24,
FromGrey = 25,
FromFuchsia = 26,
FromOrange = 27,
FromTeal = 28,
FromBrown = 29,
SameBlack = 30,
SameBlue = 31,
SameRed = 32,
SameGreen = 33,
SameYellow = 34,
SameGrey = 35,
SameFuchsia = 36,
SameOrange = 37,
SameTeal = 38,
SameBrown = 39,
DiffBlack = 40,
DiffBlue = 41,
DiffRed = 42,
DiffGreen = 43,
DiffYellow = 44,
DiffGrey = 45,
DiffFuchsia = 46,
DiffOrange = 47,
DiffTeal = 48,
DiffBrown = 49,
OrigBlack = 50,
OrigBlue = 51,
OrigRed = 52,
OrigGreen = 53,
OrigYellow = 54,
OrigGrey = 55,
OrigFuchsia = 56,
OrigOrange = 57,
OrigTeal = 58,
OrigBrown = 59,
NoColour = 90,
Mixed = 91,
Transparent = 92,
DiffShape = 93,
Same = 94,
}Variants§
Black = 0
Blue = 1
Red = 2
Green = 3
Yellow = 4
Grey = 5
Fuchsia = 6
Orange = 7
Teal = 8
Brown = 9
ToBlack = 10
ToBlue = 11
ToRed = 12
ToGreen = 13
ToYellow = 14
ToGrey = 15
ToFuchsia = 16
ToOrange = 17
ToTeal = 18
ToBrown = 19
FromBlack = 20
FromBlue = 21
FromRed = 22
FromGreen = 23
FromYellow = 24
FromGrey = 25
FromFuchsia = 26
FromOrange = 27
FromTeal = 28
FromBrown = 29
SameBlack = 30
SameBlue = 31
SameRed = 32
SameGreen = 33
SameYellow = 34
SameGrey = 35
SameFuchsia = 36
SameOrange = 37
SameTeal = 38
SameBrown = 39
DiffBlack = 40
DiffBlue = 41
DiffRed = 42
DiffGreen = 43
DiffYellow = 44
DiffGrey = 45
DiffFuchsia = 46
DiffOrange = 47
DiffTeal = 48
DiffBrown = 49
OrigBlack = 50
OrigBlue = 51
OrigRed = 52
OrigGreen = 53
OrigYellow = 54
OrigGrey = 55
OrigFuchsia = 56
OrigOrange = 57
OrigTeal = 58
OrigBrown = 59
NoColour = 90
Mixed = 91
Transparent = 92
DiffShape = 93
Same = 94
Implementations§
Source§impl Colour
impl Colour
pub fn new(colour: usize) -> Self
pub fn from_usize(colour: usize) -> Self
pub fn to_usize(self) -> usize
pub fn to_base(self) -> Self
pub fn to_base_sub(self, colour: Self) -> Self
pub fn is_colour(self) -> bool
pub fn in_range(c: usize) -> bool
pub fn colours() -> Vec<Self>
pub const fn base_colours() -> &'static [Self]
pub fn is_unit(self) -> bool
pub fn is_to(self) -> bool
pub fn is_from(self) -> bool
pub fn is_same(self) -> bool
pub fn is_diff(self) -> bool
pub fn is_orig(self) -> bool
pub fn and(self, other: Self) -> Self
pub fn or(self, other: Self) -> Self
pub fn xor(self, other: Self) -> Self
pub fn single_colour_vec(v: &[Self]) -> bool
pub fn all_colours() -> BTreeSet<Self>
pub fn get_position(self, v: &[Colour]) -> usize
Trait Implementations§
Source§impl Ord for Colour
impl Ord for Colour
Source§impl PartialOrd for Colour
impl PartialOrd for Colour
impl Copy for Colour
impl Eq for Colour
impl StructuralPartialEq for Colour
Auto Trait Implementations§
impl Freeze for Colour
impl RefUnwindSafe for Colour
impl Send for Colour
impl Sync for Colour
impl Unpin for Colour
impl UnwindSafe for Colour
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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