pub enum ThemeSource {
Derived,
DerivedWithAccent(Color),
Pinned(Theme),
}Expand description
Where a Core’s theme comes from, re-read at
the start of every frame. Derived is the default.
Pinned makes this as big as a whole Theme, which is the point:
there is one of these per window, read once a frame, and boxing it to
save three hundred bytes would cost the Copy that lets a view hold
the answer without borrowing the core.
Variants§
Derived
Theme::from_system on whatever env.system currently says, so
the app follows the OS without writing a line about it.
DerivedWithAccent(Color)
The OS’s appearance, this accent. What an app with a brand colour wants: it should still go light when the user does.
Pinned(Theme)
Exactly this, following nothing.
Implementations§
Trait Implementations§
Source§impl Clone for ThemeSource
impl Clone for ThemeSource
Source§fn clone(&self) -> ThemeSource
fn clone(&self) -> ThemeSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ThemeSource
Source§impl Debug for ThemeSource
impl Debug for ThemeSource
Source§impl Default for ThemeSource
impl Default for ThemeSource
Source§fn default() -> ThemeSource
fn default() -> ThemeSource
Returns the “default value” for a type. Read more
Source§impl PartialEq for ThemeSource
impl PartialEq for ThemeSource
impl StructuralPartialEq for ThemeSource
Auto Trait Implementations§
impl Freeze for ThemeSource
impl RefUnwindSafe for ThemeSource
impl Send for ThemeSource
impl Sync for ThemeSource
impl Unpin for ThemeSource
impl UnsafeUnpin for ThemeSource
impl UnwindSafe for ThemeSource
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.