Struct FinishLayer
pub struct FinishLayer {
pub ui_face: Option<String>,
pub accent: Option<PresenceHue>,
pub translucency: Option<f32>,
}Expand description
The person’s own finish over whichever theme is shown: the interface face
they read best, their accent, and how much of the theme’s translucency they
keep. All are roles the theme already has (PIN_TYPE, PIN_EMPHASIS,
PIN_MATERIAL); this layer only says the person would rather have them
their way than the theme’s, so no custom theme has to be written for a
face, a colour or a blur.
A role the distribution pins stays the distribution’s, and accessibility is applied after this (high contrast and “make panels opaque” win).
Fields§
§ui_face: Option<String>Any family name a theme’s type role may name; None follows the
theme.
accent: Option<PresenceHue>The hue the person wants as the accent; None follows the theme’s
emphasis.
translucency: Option<f32>0 opaque floating chrome, 1 as the theme sets it; None follows
the theme.
Implementations§
§impl FinishLayer
impl FinishLayer
pub fn validate(&self) -> Result<(), &'static str>
pub fn validate(&self) -> Result<(), &'static str>
Structural check. A failure means this layer is not applied.
A face name is anything a theme document may name; a translucency
outside the band is clamped by Self::materialize, not rejected.
pub fn materialize(&self) -> Result<FinishLayer, &'static str>
pub fn materialize(&self) -> Result<FinishLayer, &'static str>
Self::validate, then trim the face and clamp the translucency into
its band: what resolution applies.
§Errors
The same static message as Self::validate.
Trait Implementations§
§impl Clone for FinishLayer
impl Clone for FinishLayer
§fn clone(&self) -> FinishLayer
fn clone(&self) -> FinishLayer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for FinishLayer
impl Debug for FinishLayer
§impl Default for FinishLayer
impl Default for FinishLayer
§fn default() -> FinishLayer
fn default() -> FinishLayer
§impl PartialEq for FinishLayer
impl PartialEq for FinishLayer
impl StructuralPartialEq for FinishLayer
Auto Trait Implementations§
impl Freeze for FinishLayer
impl RefUnwindSafe for FinishLayer
impl Send for FinishLayer
impl Sync for FinishLayer
impl Unpin for FinishLayer
impl UnsafeUnpin for FinishLayer
impl UnwindSafe for FinishLayer
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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