Trait zng_color::LightDarkVarExt
source · pub trait LightDarkVarExt {
// Required methods
fn rgba(&self) -> impl Var<Rgba>;
fn rgba_map<T: VarValue>(
&self,
map: impl FnMut(Rgba) -> T + Send + 'static,
) -> impl Var<T>;
fn rgba_into<T: VarValue + From<Rgba>>(&self) -> impl Var<T>;
fn map_rgba(
&self,
map: impl FnMut(LightDark) -> LightDark + Send + 'static,
) -> impl Var<Rgba>;
fn map_rgba_into<T: VarValue + From<Rgba>>(
&self,
map: impl FnMut(LightDark) -> LightDark + Send + 'static,
) -> impl Var<T>;
fn shade_fct(&self, fct: impl Into<Factor>) -> impl Var<Rgba>;
fn shade_fct_into<T: VarValue + From<Rgba>>(
&self,
fct: impl Into<Factor>,
) -> impl Var<T>;
fn shade(&self, shade: i8) -> impl Var<Rgba>;
fn shade_into<T: VarValue + From<Rgba>>(&self, shade: i8) -> impl Var<T>;
}
Expand description
Extension methods for impl Var<LightDark>
.
Required Methods§
sourcefn rgba(&self) -> impl Var<Rgba>
fn rgba(&self) -> impl Var<Rgba>
Gets a contextualized var that maps to LightDark::rgba
.
sourcefn rgba_map<T: VarValue>(
&self,
map: impl FnMut(Rgba) -> T + Send + 'static,
) -> impl Var<T>
fn rgba_map<T: VarValue>( &self, map: impl FnMut(Rgba) -> T + Send + 'static, ) -> impl Var<T>
Gets a contextualized var that maps to LightDark::rgba
and map
.
sourcefn rgba_into<T: VarValue + From<Rgba>>(&self) -> impl Var<T>
fn rgba_into<T: VarValue + From<Rgba>>(&self) -> impl Var<T>
Gets a contextualized var that maps to LightDark::rgba
converted into T
.
sourcefn map_rgba(
&self,
map: impl FnMut(LightDark) -> LightDark + Send + 'static,
) -> impl Var<Rgba>
fn map_rgba( &self, map: impl FnMut(LightDark) -> LightDark + Send + 'static, ) -> impl Var<Rgba>
Gets a contextualized var that maps using map
and then to LightDark::rgba
.
sourcefn map_rgba_into<T: VarValue + From<Rgba>>(
&self,
map: impl FnMut(LightDark) -> LightDark + Send + 'static,
) -> impl Var<T>
fn map_rgba_into<T: VarValue + From<Rgba>>( &self, map: impl FnMut(LightDark) -> LightDark + Send + 'static, ) -> impl Var<T>
Gets a contextualized var that maps using map
and then into T
.
sourcefn shade_fct(&self, fct: impl Into<Factor>) -> impl Var<Rgba>
fn shade_fct(&self, fct: impl Into<Factor>) -> impl Var<Rgba>
Gets a contextualized var that maps to LightDark::shade_fct
and then to LightDark::rgba
.
sourcefn shade_fct_into<T: VarValue + From<Rgba>>(
&self,
fct: impl Into<Factor>,
) -> impl Var<T>
fn shade_fct_into<T: VarValue + From<Rgba>>( &self, fct: impl Into<Factor>, ) -> impl Var<T>
Gets a contextualized var that maps to LightDark::shade_fct
and then to LightDark::rgba
and then into T
.
sourcefn shade(&self, shade: i8) -> impl Var<Rgba>
fn shade(&self, shade: i8) -> impl Var<Rgba>
Gets a contextualized var that maps to LightDark::shade
and then to LightDark::rgba
.
- +1 - Hovered.
- +2 - Pressed.
sourcefn shade_into<T: VarValue + From<Rgba>>(&self, shade: i8) -> impl Var<T>
fn shade_into<T: VarValue + From<Rgba>>(&self, shade: i8) -> impl Var<T>
Gets a contextualized var that maps to LightDark::shade
and then to LightDark::rgba
and then into T
.
Object Safety§
This trait is not object safe.