pub struct Color { /* private fields */ }Expand description
A terminal color.
Implementations§
Source§impl Color
impl Color
pub fn new(color_palette: ColorPalette) -> Color
pub fn new_sp(screen: *mut screen, color_palette: ColorPalette) -> Color
Sourcepub unsafe fn set_screen(&mut self, screen: Option<*mut screen>)
pub unsafe fn set_screen(&mut self, screen: Option<*mut screen>)
§Safety
Set the screen of the Color.
Use with caution!!! This function only need’s to be used if using the screen type
functions and is provided to allow the alignment of the screen pointer with the
screen that the ColorPair are for as this crate will apply a screen of None
by default when retriving Attributes from functions such as attr_get() and
wattr_get().
pub fn screen(&self) -> Option<*mut screen>
pub fn color_palette(&self) -> ColorPalette
pub fn set_rgb(&self, rgb: RGB) -> Result<(), NCurseswError>
pub fn rgb(&self) -> Result<RGB, NCurseswError>
Trait Implementations§
impl Copy for Color
impl Eq for Color
impl StructuralPartialEq for Color
Auto Trait Implementations§
impl Freeze for Color
impl RefUnwindSafe for Color
impl !Send for Color
impl !Sync for Color
impl Unpin for Color
impl UnwindSafe for Color
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more