pub struct ColorOutput<'a> {
pub text: &'a str,
pub color: ColorType,
pub bg_color: ColorType,
pub bold: bool,
pub endl: bool,
}Expand description
Represents a colored text output with formatting options.
Fields§
§text: &'a strThe text content to output.
color: ColorTypeThe text color.
bg_color: ColorTypeThe background color.
bold: boolWhether the text should be bold.
endl: boolWhether to add a newline after the text.
Implementations§
Trait Implementations§
Source§impl<'a> Clone for ColorOutput<'a>
impl<'a> Clone for ColorOutput<'a>
Source§fn clone(&self) -> ColorOutput<'a>
fn clone(&self) -> ColorOutput<'a>
Returns a duplicate 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<'a> Debug for ColorOutput<'a>
impl<'a> Debug for ColorOutput<'a>
Source§impl<'a> Default for ColorOutput<'a>
Default implementation for ColorOutput with empty configuration.
impl<'a> Default for ColorOutput<'a>
Default implementation for ColorOutput with empty configuration.
Source§fn default() -> ColorOutput<'a>
fn default() -> ColorOutput<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> Hash for ColorOutput<'a>
impl<'a> Hash for ColorOutput<'a>
Source§impl<'a> Ord for ColorOutput<'a>
impl<'a> Ord for ColorOutput<'a>
Source§fn cmp(&self, other: &ColorOutput<'a>) -> Ordering
fn cmp(&self, other: &ColorOutput<'a>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a> PartialEq for ColorOutput<'a>
impl<'a> PartialEq for ColorOutput<'a>
Source§impl<'a> PartialOrd for ColorOutput<'a>
impl<'a> PartialOrd for ColorOutput<'a>
impl<'a> Copy for ColorOutput<'a>
impl<'a> Eq for ColorOutput<'a>
impl<'a> StructuralPartialEq for ColorOutput<'a>
Auto Trait Implementations§
impl<'a> Freeze for ColorOutput<'a>
impl<'a> RefUnwindSafe for ColorOutput<'a>
impl<'a> Send for ColorOutput<'a>
impl<'a> Sync for ColorOutput<'a>
impl<'a> Unpin for ColorOutput<'a>
impl<'a> UnsafeUnpin for ColorOutput<'a>
impl<'a> UnwindSafe for ColorOutput<'a>
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§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more