#[repr(transparent)]pub struct RGBA { /* private fields */ }
Implementations
sourceimpl RGBA
impl RGBA
pub fn new(red: f32, green: f32, blue: f32, alpha: f32) -> RGBA
sourcepub fn builder() -> RGBABuilder
pub fn builder() -> RGBABuilder
Creates a new builder-pattern struct instance to construct RGBA
objects.
This method returns an instance of RGBABuilder
which can be used to create RGBA
objects.
pub fn red(&self) -> f32
pub fn set_red(&mut self, red: f32)
pub fn green(&self) -> f32
pub fn set_green(&mut self, green: f32)
pub fn blue(&self) -> f32
pub fn set_blue(&mut self, blue: f32)
pub fn alpha(&self) -> f32
pub fn set_alpha(&mut self, alpha: f32)
pub fn parse(s: &str) -> Result<RGBA, BoolError>
pub const BLACK: RGBA
pub const BLUE: RGBA
pub const GREEN: RGBA
pub const RED: RGBA
pub const WHITE: RGBA
Trait Implementations
sourceimpl StaticType for RGBA
impl StaticType for RGBA
sourcefn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of Self
.
impl Copy for RGBA
impl Eq for RGBA
Auto Trait Implementations
impl RefUnwindSafe for RGBA
impl Send for RGBA
impl Sync for RGBA
impl Unpin for RGBA
impl UnwindSafe for RGBA
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> StaticTypeExt for T where
T: StaticType,
impl<T> StaticTypeExt for T where
T: StaticType,
sourcefn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.
sourceimpl<T> ToClosureReturnValue for T where
T: ToValue,
impl<T> ToClosureReturnValue for T where
T: ToValue,
fn to_closure_return_value(&self) -> Option<Value>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> ToSendValue for T where
T: Send + ToValue + ?Sized,
impl<T> ToSendValue for T where
T: Send + ToValue + ?Sized,
sourcefn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
Returns a SendValue
clone of self
.