pub struct SetAttribute(pub Attribute);
Expand description
Sets the display attribute.
See the Attribute
enum for a list of attributes you can (un)set.
The ResetAttributes
sequence can be used to turn off all
attributes.
§Examples
use std::io::{stdout, Write};
use anes::{Attribute, SetAttribute};
let mut stdout = stdout();
write!(stdout, "{}Blinking text", SetAttribute(Attribute::Blink));
Tuple Fields§
§0: Attribute
Trait Implementations§
Source§impl Clone for SetAttribute
impl Clone for SetAttribute
Source§fn clone(&self) -> SetAttribute
fn clone(&self) -> SetAttribute
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 SetAttribute
impl Debug for SetAttribute
Source§impl Display for SetAttribute
impl Display for SetAttribute
Source§impl Hash for SetAttribute
impl Hash for SetAttribute
Source§impl PartialEq for SetAttribute
impl PartialEq for SetAttribute
impl Copy for SetAttribute
impl Eq for SetAttribute
impl StructuralPartialEq for SetAttribute
Auto Trait Implementations§
impl Freeze for SetAttribute
impl RefUnwindSafe for SetAttribute
impl Send for SetAttribute
impl Sync for SetAttribute
impl Unpin for SetAttribute
impl UnwindSafe for SetAttribute
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: 1 byte