[−][src]Enum rbx_dom_weak::BrickColor
BrickColor values were the old, palette-based system of defining colors in Roblox. As of the time of writing, they're still used for some old systems like SpawnLocation and Team objects.
Parts no longer use BrickColor, but we have conversions here to support older models.
Variants
Methods
impl BrickColor
[src]
pub fn from_name(name: &str) -> Option<BrickColor>
[src]
Find the first BrickColor with the given name, if it exists.
Note that some colors (Lilac, Rust, Gold, and Deep orange) have name collisions and can only have one of their variants constructed from this function.
This is roughly equivalent to BrickColor.new(string)
from
within Roblox, except unknown values will yield None
instead
of Medium stone grey
.
pub fn from_number(value: u16) -> Option<BrickColor>
[src]
Finds the BrickColor from its associated value. This is different from a BrickColor's palette number, which not all colors have.
This is roughly equivalent to BrickColor.new(number)
from
within Roblox, except unknown values will yield None
instead
of Medium stone grey
.
impl BrickColor
[src]
pub fn from_palette(value: u8) -> Option<BrickColor>
[src]
Please use BrickColor::from_number instead
Convert from a BrickColor palette number to a BrickColor.
This function should not be used for new code, it only exists because of a misunderstanding of the range of valid BrickColor values.
This function operates like BrickColor.palette
within Roblox.
Trait Implementations
impl Clone for BrickColor
[src]
fn clone(&self) -> BrickColor
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for BrickColor
[src]
impl Debug for BrickColor
[src]
impl<'de> Deserialize<'de> for BrickColor
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Display for BrickColor
[src]
impl PartialEq<BrickColor> for BrickColor
[src]
fn eq(&self, other: &BrickColor) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for BrickColor
[src]
impl StructuralPartialEq for BrickColor
[src]
Auto Trait Implementations
impl RefUnwindSafe for BrickColor
impl Send for BrickColor
impl Sync for BrickColor
impl Unpin for BrickColor
impl UnwindSafe for BrickColor
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,