[−][src]Struct bracket_lib::prelude::XpColor
Structure representing the components of one color
Fields
r: u8Red component 0..255
g: u8Green component 0..255
b: u8Blue component 0..255
Methods
impl XpColor[src]
pub const BLACK: XpColor[src]
deepest black
pub const TRANSPARENT: XpColor[src]
color 0xff00ff (hot pink) is regarded as transparent
#[must_use]
pub const fn new(r: u8, g: u8, b: u8) -> XpColor[src]
Construct a new color from r,g,b values
#[must_use]
pub fn is_transparent(self) -> bool[src]
Return whether this color is considered transparent (if this is the background color of a cell, the layer below it will see through)
pub fn read<T>(rdr: &mut T) -> Result<XpColor, Error> where
T: ReadBytesExt, [src]
T: ReadBytesExt,
Read a RGB color from a ReadBytesExt
pub fn write<T>(self, wr: &mut T) -> Result<(), Error> where
T: WriteBytesExt, [src]
T: WriteBytesExt,
Write a RGB color to a WriteBytesExt
Trait Implementations
impl Clone for XpColor[src]
impl Copy for XpColor[src]
impl Debug for XpColor[src]
impl Eq for XpColor[src]
impl PartialEq<XpColor> for XpColor[src]
impl StructuralEq for XpColor[src]
impl StructuralPartialEq for XpColor[src]
Auto Trait Implementations
impl RefUnwindSafe for XpColor
impl Send for XpColor
impl Sync for XpColor
impl Unpin for XpColor
impl UnwindSafe for XpColor
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> 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, 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>,