pub struct ThemeGuard { /* private fields */ }Expand description
RAII guard that applies a theme and resets on drop. Does not mutate global THEME; it only changes terminal colors during the guard’s lifetime.
Implementations§
Source§impl ThemeGuard
impl ThemeGuard
pub fn apply(name: &str) -> Self
pub fn disable_reset(self) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ThemeGuard
impl RefUnwindSafe for ThemeGuard
impl Send for ThemeGuard
impl Sync for ThemeGuard
impl Unpin for ThemeGuard
impl UnwindSafe for ThemeGuard
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