Struct two_face::theme::EmbeddedLazyThemeSet
source · pub struct EmbeddedLazyThemeSet(/* private fields */);
Expand description
A LazyThemeSet
where we know all themes that are included
Implementations§
source§impl EmbeddedLazyThemeSet
impl EmbeddedLazyThemeSet
sourcepub fn get(&self, name: EmbeddedThemeName) -> &Theme
pub fn get(&self, name: EmbeddedThemeName) -> &Theme
Gets a single theme from the set
An infallible version of LazyThemeSet::get()
§Example
use two_face::theme::{extra, EmbeddedThemeName};
let theme_set = extra();
// Loads the theme
let nord1 = theme_set.get(EmbeddedThemeName::Nord);
// Reuses the same loaded theme
let nord2 = theme_set.get(EmbeddedThemeName::Nord);
sourcepub fn theme_names() -> &'static [EmbeddedThemeName]
pub fn theme_names() -> &'static [EmbeddedThemeName]
A listing of all the themes included in EmbeddedLazyThemeSet
§Example
use two_face::theme::{EmbeddedThemeName, EmbeddedLazyThemeSet};
// Nord should be included
assert!(EmbeddedLazyThemeSet::theme_names().contains(&EmbeddedThemeName::Nord));
Trait Implementations§
source§impl From<&EmbeddedLazyThemeSet> for ThemeSet
impl From<&EmbeddedLazyThemeSet> for ThemeSet
source§fn from(embedded: &EmbeddedLazyThemeSet) -> Self
fn from(embedded: &EmbeddedLazyThemeSet) -> Self
Converts to this type from the input type.
source§impl From<EmbeddedLazyThemeSet> for LazyThemeSet
impl From<EmbeddedLazyThemeSet> for LazyThemeSet
source§fn from(embedded: EmbeddedLazyThemeSet) -> Self
fn from(embedded: EmbeddedLazyThemeSet) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for EmbeddedLazyThemeSet
impl RefUnwindSafe for EmbeddedLazyThemeSet
impl Send for EmbeddedLazyThemeSet
impl Sync for EmbeddedLazyThemeSet
impl Unpin for EmbeddedLazyThemeSet
impl UnwindSafe for EmbeddedLazyThemeSet
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