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) -> Self
pub fn new<P, S>(prefix: P, suffix: S) -> Self
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 PartialEq for ANSIBuf
impl PartialEq for ANSIBuf
source§impl PartialOrd for ANSIBuf
impl PartialOrd for ANSIBuf
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)