pub struct Style {
enabled: bool,
}Fields§
§enabled: boolImplementations§
Source§impl Style
impl Style
pub fn stdout(no_color: bool) -> Self
pub fn stderr(no_color: bool) -> Self
fn new(no_color: bool, is_terminal: bool) -> Self
fn paint(&self, code: &str, text: impl AsRef<str>) -> String
pub fn bold(&self, text: impl AsRef<str>) -> String
pub fn dim(&self, text: impl AsRef<str>) -> String
pub fn blue(&self, text: impl AsRef<str>) -> String
pub fn cyan(&self, text: impl AsRef<str>) -> String
pub fn green(&self, text: impl AsRef<str>) -> String
pub fn yellow(&self, text: impl AsRef<str>) -> String
pub fn red(&self, text: impl AsRef<str>) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Style
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin for Style
impl UnsafeUnpin for Style
impl UnwindSafe for Style
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