pub struct AppColor(/* private fields */);Implementations§
Source§impl AppColor
impl AppColor
pub fn new(color: Color) -> Self
pub fn from_display_text(display_text: &str) -> Self
pub fn from_category(category: &str) -> Self
pub fn from_any<T: Into<String>>(source: T) -> Self
pub fn from_log_level(level: Level) -> Self
pub fn from_string(color_str: &str) -> Result<Self>
pub fn from_display_text_with_timing(display_text: &str) -> (Self, Duration)
pub fn available_display_texts() -> Vec<&'static str>
pub fn available_categories() -> Vec<&'static str>
pub fn format_message(&self, level: &str, message: &str) -> String
pub fn to_ansi_code(&self) -> u8
pub fn to_name(&self) -> &'static str
Trait Implementations§
impl Copy for AppColor
impl StructuralPartialEq for AppColor
Auto Trait Implementations§
impl Freeze for AppColor
impl RefUnwindSafe for AppColor
impl Send for AppColor
impl Sync for AppColor
impl Unpin for AppColor
impl UnwindSafe for AppColor
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<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