pub struct SetBackgroundColor(pub Color);
Expand description
Sets the background color.
§Examples
use std::io::{stdout, Write};
use anes::{Color, SetBackgroundColor};
let mut stdout = stdout();
// Set the background color to yellow
write!(stdout, "{}", SetBackgroundColor(Color::Yellow));
Tuple Fields§
§0: Color
Trait Implementations§
Source§impl Clone for SetBackgroundColor
impl Clone for SetBackgroundColor
Source§fn clone(&self) -> SetBackgroundColor
fn clone(&self) -> SetBackgroundColor
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SetBackgroundColor
impl Debug for SetBackgroundColor
Source§impl Display for SetBackgroundColor
impl Display for SetBackgroundColor
Source§impl Hash for SetBackgroundColor
impl Hash for SetBackgroundColor
Source§impl PartialEq for SetBackgroundColor
impl PartialEq for SetBackgroundColor
impl Copy for SetBackgroundColor
impl Eq for SetBackgroundColor
impl StructuralPartialEq for SetBackgroundColor
Auto Trait Implementations§
impl Freeze for SetBackgroundColor
impl RefUnwindSafe for SetBackgroundColor
impl Send for SetBackgroundColor
impl Sync for SetBackgroundColor
impl Unpin for SetBackgroundColor
impl UnwindSafe for SetBackgroundColor
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 4 bytes