Struct pixel_canvas::color::Color
source · [−]Expand description
A single RGB-888 color.
Fields
r: u8
The red component.
g: u8
The green component.
b: u8
The blue component.
Implementations
Trait Implementations
impl Copy for Color
Auto Trait Implementations
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnwindSafe for Color
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> Content for T where
T: Copy,
impl<T> Content for T where
T: Copy,
type Owned = T
type Owned = T
A type that holds a sized version of the content.
sourceunsafe fn read<F, E>(size: usize, f: F) -> Result<T, E> where
F: FnOnce(&mut T) -> Result<(), E>,
unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E> where
F: FnOnce(&mut T) -> Result<(), E>,
Prepares an output buffer, then turns this buffer into an Owned
.
User-provided closure F
must only write to and not read from &mut Self
. Read more
sourcefn get_elements_size() -> usize
fn get_elements_size() -> usize
Returns the size of each element.
sourcefn to_void_ptr(&self) -> *const ()
fn to_void_ptr(&self) -> *const ()
Produces a pointer to the data.
sourcefn ref_from_ptr(ptr: *mut (), size: usize) -> Option<*mut T>
fn ref_from_ptr(ptr: *mut (), size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
sourcefn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.