#[repr(u32)]pub enum Paint {
Show 29 variants
AColorSimilarToSlate,
ADeepCommitmentToPurple,
ADistinctiveLackOfHue,
AMannsMint,
AfterEight,
AgedMoustacheGrey,
AnExtraordinaryAbundanceOfTinge,
AustraliumGold,
ColorNo216190216,
DarkSalmonInjustice,
DrablyOlive,
IndubitablyGreen,
MannCoOrange,
Muskelmannbraun,
NobleHattersViolet,
PeculiarlyDrabTincture,
PinkAsHell,
RadiganConagherBrown,
TheBitterTasteOfDefeatAndLime,
TheColorOfAGentlemannsBusinessPants,
YeOldeRusticColour,
ZepheniahsGreed,
AnAirOfDebonair,
BalaclavasAreForever,
CreamSpirit,
OperatorsOveralls,
TeamSpirit,
TheValueOfTeamwork,
WaterloggedLabCoat,
}
Expand description
Paint. repr
values are mapped to the corresponding color. For team paints this is the color
for RED team.
Variants§
AColorSimilarToSlate
ADeepCommitmentToPurple
ADistinctiveLackOfHue
AMannsMint
AfterEight
AgedMoustacheGrey
AnExtraordinaryAbundanceOfTinge
AustraliumGold
ColorNo216190216
DarkSalmonInjustice
DrablyOlive
IndubitablyGreen
MannCoOrange
Muskelmannbraun
NobleHattersViolet
PeculiarlyDrabTincture
PinkAsHell
RadiganConagherBrown
TheBitterTasteOfDefeatAndLime
TheColorOfAGentlemannsBusinessPants
YeOldeRusticColour
ZepheniahsGreed
AnAirOfDebonair
BalaclavasAreForever
CreamSpirit
OperatorsOveralls
TeamSpirit
TheValueOfTeamwork
WaterloggedLabCoat
Implementations§
source§impl Paint
impl Paint
pub fn color(&self) -> u32
sourcepub fn from_color(color: u32) -> Option<Self>
pub fn from_color(color: u32) -> Option<Self>
sourcepub fn from_color_str(color: &str) -> Option<Self>
pub fn from_color_str(color: &str) -> Option<Self>
sourcepub fn colors(&self) -> (u32, u32)
pub fn colors(&self) -> (u32, u32)
Gets the colors for both teams. The RED team appears first. For non-team-color paints the color will be the same.
sourcepub fn is_team_paint(&self) -> bool
pub fn is_team_paint(&self) -> bool
Determines if this paint is a team-colored paint.
sourcepub fn from_defindex(defindex: u32) -> Option<Self>
pub fn from_defindex(defindex: u32) -> Option<Self>
Converts a defindex
into its related Paint
, if it exists.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Paint
impl<'de> Deserialize<'de> for Paint
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
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 Ord for Paint
impl Ord for Paint
source§impl PartialEq<Paint> for Paint
impl PartialEq<Paint> for Paint
source§impl PartialOrd<Paint> for Paint
impl PartialOrd<Paint> for Paint
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<u32> for Paint
impl TryFrom<u32> for Paint
§type Error = TryFromPrimitiveError<Paint>
type Error = TryFromPrimitiveError<Paint>
The type returned in the event of a conversion error.
source§impl TryFromPrimitive for Paint
impl TryFromPrimitive for Paint
impl Copy for Paint
impl Eq for Paint
impl StructuralEq for Paint
impl StructuralPartialEq for Paint
Auto Trait Implementations§
impl RefUnwindSafe for Paint
impl Send for Paint
impl Sync for Paint
impl Unpin for Paint
impl UnwindSafe for Paint
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