Enum rbx_types::BrickColor [−][src]
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 (Non-exhaustive)
Implementations
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
.
Trait Implementations
impl Clone for BrickColor
[src]
fn clone(&self) -> BrickColor
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for BrickColor
[src]
impl Debug for BrickColor
[src]
impl Display for BrickColor
[src]
impl Eq for BrickColor
[src]
impl From<BrickColor> for Variant
[src]
fn from(value: BrickColor) -> Self
[src]
impl PartialEq<BrickColor> for BrickColor
[src]
fn eq(&self, other: &BrickColor) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for BrickColor
[src]
impl StructuralPartialEq for BrickColor
[src]
Auto Trait Implementations
impl RefUnwindSafe for BrickColor
[src]
impl Send for BrickColor
[src]
impl Sync for BrickColor
[src]
impl Unpin for BrickColor
[src]
impl UnwindSafe for BrickColor
[src]
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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.
pub 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>,