pub struct ThemeFile {
pub meta: Meta,
pub dark: VariantDef,
pub light: VariantDef,
}Fields§
§meta: Meta§dark: VariantDef§light: VariantDefImplementations§
Source§impl ThemeFile
impl ThemeFile
pub fn parse(text: &str) -> Result<Self>
pub fn validate(&self) -> Result<()>
pub fn to_toml(&self) -> Result<String>
pub fn variant(&self, v: Variant) -> &VariantDef
pub fn variant_mut(&mut self, v: Variant) -> &mut VariantDef
pub fn display_name(&self) -> String
Sourcepub fn generate_variant(&mut self, target: Variant)
pub fn generate_variant(&mut self, target: Variant)
Generate a starting variant from the other one by inverting lightness of every color.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ThemeFile
impl<'de> Deserialize<'de> for ThemeFile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for ThemeFile
Auto Trait Implementations§
impl Forget for ThemeFile
impl Freeze for ThemeFile
impl Move for ThemeFile
impl RefUnwindSafe for ThemeFile
impl Send for ThemeFile
impl Sync for ThemeFile
impl Unpin for ThemeFile
impl UnsafeUnpin for ThemeFile
impl UnwindSafe for ThemeFile
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