pub struct ThemeRegistry { /* private fields */ }Expand description
Theme registry for storing and managing themes
Implementations§
Source§impl ThemeRegistry
impl ThemeRegistry
Sourcepub fn get(&self, name: &str) -> Option<Theme>
pub fn get(&self, name: &str) -> Option<Theme>
Get a theme by name (checks built-in first, then custom)
Sourcepub fn get_builtin(&self, name: &str) -> Option<Theme>
pub fn get_builtin(&self, name: &str) -> Option<Theme>
Get a built-in theme by name
Sourcepub fn unregister(&self, name: &str) -> Result<()>
pub fn unregister(&self, name: &str) -> Result<()>
Unregister a custom theme
Sourcepub fn list_all(&self) -> Result<Vec<String>>
pub fn list_all(&self) -> Result<Vec<String>>
List all available theme names (built-in and custom)
Sourcepub fn list_builtin(&self) -> Vec<String>
pub fn list_builtin(&self) -> Vec<String>
List all built-in theme names
Sourcepub fn list_custom(&self) -> Result<Vec<String>>
pub fn list_custom(&self) -> Result<Vec<String>>
List all custom theme names
Sourcepub fn is_builtin(&self, name: &str) -> bool
pub fn is_builtin(&self, name: &str) -> bool
Check if a theme is built-in
Sourcepub fn builtin_count(&self) -> usize
pub fn builtin_count(&self) -> usize
Get the number of built-in themes
Sourcepub fn custom_count(&self) -> Result<usize>
pub fn custom_count(&self) -> Result<usize>
Get the number of custom themes
Sourcepub fn reset_to_default(&self, name: &str) -> Result<()>
pub fn reset_to_default(&self, name: &str) -> Result<()>
Reset a custom theme to its built-in default
Sourcepub fn clear_custom(&self) -> Result<()>
pub fn clear_custom(&self) -> Result<()>
Clear all custom themes
Trait Implementations§
Source§impl Clone for ThemeRegistry
impl Clone for ThemeRegistry
Source§fn clone(&self) -> ThemeRegistry
fn clone(&self) -> ThemeRegistry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ThemeRegistry
impl Debug for ThemeRegistry
Auto Trait Implementations§
impl Freeze for ThemeRegistry
impl RefUnwindSafe for ThemeRegistry
impl Send for ThemeRegistry
impl Sync for ThemeRegistry
impl Unpin for ThemeRegistry
impl UnwindSafe for ThemeRegistry
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