Struct CStyle

Source
pub struct CStyle(pub &'static str);
Expand description

Struct to represent a console style

Tuple Fields§

§0: &'static str

Trait Implementations§

Source§

impl Display for CStyle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for CStyle

§

impl RefUnwindSafe for CStyle

§

impl Send for CStyle

§

impl Sync for CStyle

§

impl Unpin for CStyle

§

impl UnwindSafe for CStyle

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Stylable for T
where T: Display,

Source§

fn print(&self)

Source§

fn println(&self)

Source§

fn wrap_reset(&self, style: &CStyle) -> String

Source§

fn in_bold(&self) -> String

Source§

fn in_dim(&self) -> String

Source§

fn in_italic(&self) -> String

Source§

fn in_underline(&self) -> String

Source§

fn in_gray(&self) -> String

Source§

fn in_red(&self) -> String

Source§

fn in_green(&self) -> String

Source§

fn in_yellow(&self) -> String

Source§

fn in_blue(&self) -> String

Source§

fn in_magenta(&self) -> String

Source§

fn in_cyan(&self) -> String

Source§

fn in_white(&self) -> String

Source§

fn in_orange(&self) -> String

Source§

fn in_pink(&self) -> String

Source§

fn in_purple(&self) -> String

Source§

fn on_gray(&self) -> String

Source§

fn on_red(&self) -> String

Source§

fn on_green(&self) -> String

Source§

fn on_yellow(&self) -> String

Source§

fn on_blue(&self) -> String

Source§

fn on_magenta(&self) -> String

Source§

fn on_cyan(&self) -> String

Source§

fn on_white(&self) -> String

Source§

fn on_orange(&self) -> String

Source§

fn on_pink(&self) -> String

Source§

fn on_purple(&self) -> String

Source§

fn subtle(&self) -> String

Source§

fn as_info(&self) -> String

Source§

fn as_success(&self) -> String

Source§

fn as_warning(&self) -> String

Source§

fn as_error(&self) -> String

Source§

fn as_debug(&self) -> String

Source§

fn with_nostyle(&self) -> String

Source§

fn vibrant(&self) -> String

Source§

fn print_positioned<F>(&self, x: i32, y: i32, func: F)
where F: Fn(&str) -> String,

Print the text at a specific position x and y are offsets from the current position
Source§

fn show(&self, style: &CStyle)

Source§

fn showln(&self, style: &CStyle)

Source§

fn style(&self, style: &CStyle) -> String

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.