pub struct Theme {
pub prefix: String,
/* private fields */
}
Fields§
§prefix: String
Implementations§
Source§impl Theme
impl Theme
pub fn new() -> Self
pub fn with_prefix(prefix: impl AsRef<str>) -> Self
Sourcepub fn get_palette(&self, name: &str) -> Option<&Palette>
pub fn get_palette(&self, name: &str) -> Option<&Palette>
Get a palette by name
Sourcepub fn palette_mut(&mut self, name: &str) -> Option<&mut Palette>
pub fn palette_mut(&mut self, name: &str) -> Option<&mut Palette>
Get a palette by name
Sourcepub fn insert_palette(&mut self, name: impl AsRef<str>, palette: Palette)
pub fn insert_palette(&mut self, name: impl AsRef<str>, palette: Palette)
Insert a palette into the theme
Sourcepub fn palette(&mut self, name: impl AsRef<str>) -> &mut Palette
pub fn palette(&mut self, name: impl AsRef<str>) -> &mut Palette
Creates a new palette if not yet present, and returns a mutable reference to it.
pub fn palette_var(&self, palette: &str, selector: &str) -> String
pub fn class_var(&self, class: &str, var_name: &str) -> String
Sourcepub fn breakpoints(&self) -> &Breakpoints
pub fn breakpoints(&self) -> &Breakpoints
Gets a reference to the breakpoints object
Sourcepub fn breakpoints_mut(&mut self) -> &mut Breakpoints
pub fn breakpoints_mut(&mut self) -> &mut Breakpoints
Gets a mutable reference to the breakpoints object
Sourcepub fn typography(&self) -> &TypographyScale
pub fn typography(&self) -> &TypographyScale
Gets the typography scale
Sourcepub fn typography_mut(&mut self) -> &mut TypographyScale
pub fn typography_mut(&mut self) -> &mut TypographyScale
Gets the typography scale
pub fn system_class(&self) -> String
Trait Implementations§
impl StructuralPartialEq for Theme
Auto Trait Implementations§
impl Freeze for Theme
impl RefUnwindSafe for Theme
impl Send for Theme
impl Sync for Theme
impl Unpin 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> 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> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self
to a value of a Properties
struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self
to a value of a Properties
struct.