pub struct Theme;Expand description
Theme accessor. All colour/style lookups go through here.
Implementations§
Source§impl Theme
impl Theme
pub const FG: Color
pub const BG: Color
pub const DIM: Color
pub const SURFACE: Color
pub const OVERLAY: Color
pub const BLUE: Color
pub const GREEN: Color
pub const RED: Color
pub const YELLOW: Color
pub const PEACH: Color
pub const MAUVE: Color
pub const TEAL: Color
pub const PINK: Color
pub const STATUS_UP: Color = Self::GREEN
pub const STATUS_DOWN: Color = Self::RED
pub const STATUS_WARN: Color = Self::YELLOW
Sourcepub fn init(light: bool)
pub fn init(light: bool)
Initialise the global palette. Call once at startup. If not called, defaults to dark.
pub fn fg() -> Color
pub fn bg() -> Color
pub fn dim_color() -> Color
pub fn surface_color() -> Color
pub fn overlay_color() -> Color
pub fn blue() -> Color
pub fn green() -> Color
pub fn red() -> Color
pub fn yellow() -> Color
pub fn peach() -> Color
pub fn mauve() -> Color
pub fn teal() -> Color
pub fn pink() -> Color
pub fn base() -> Style
pub fn surface() -> Style
pub fn title() -> Style
pub fn highlight() -> Style
pub fn tab_active() -> Style
pub fn tab_inactive() -> Style
pub fn status_bar() -> Style
pub fn key_hint() -> Style
pub fn error() -> Style
pub fn success() -> Style
pub fn dim() -> Style
pub fn http_method(method: &str) -> Style
pub fn status_code(code: u16) -> Style
Auto Trait Implementations§
impl Freeze for Theme
impl RefUnwindSafe for Theme
impl Send for Theme
impl Sync for Theme
impl Unpin for Theme
impl UnsafeUnpin for Theme
impl UnwindSafe for Theme
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> 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