pub struct ANSIBuf { /* private fields */ }
Expand description
The structure represents a ANSI color by suffix and prefix.
Implementations§
Source§impl ANSIBuf
impl ANSIBuf
Sourcepub fn new<P, S>(prefix: P, suffix: S) -> ANSIBuf
pub fn new<P, S>(prefix: P, suffix: S) -> ANSIBuf
Constructs a new instance with suffix and prefix.
They are not checked so you should make sure you provide correct ANSI.
Otherwise you may want to use TryFrom
.
Sourcepub fn get_prefix(&self) -> &str
pub fn get_prefix(&self) -> &str
Gets a reference to a prefix.
Sourcepub fn get_suffix(&self) -> &str
pub fn get_suffix(&self) -> &str
Gets a reference to a suffix.
Trait Implementations§
Source§impl Ord for ANSIBuf
impl Ord for ANSIBuf
Source§impl PartialOrd for ANSIBuf
impl PartialOrd for ANSIBuf
impl Eq for ANSIBuf
impl StructuralPartialEq for ANSIBuf
Auto Trait Implementations§
impl Freeze for ANSIBuf
impl RefUnwindSafe for ANSIBuf
impl Send for ANSIBuf
impl Sync for ANSIBuf
impl Unpin for ANSIBuf
impl UnwindSafe for ANSIBuf
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