pub trait LightDarkVarExt {
// Required methods
fn rgba(&self) -> Var<Rgba>;
fn rgba_map<T: VarValue>(
&self,
map: impl FnMut(Rgba) -> T + Send + 'static,
) -> Var<T>;
fn rgba_into<T: VarValue + From<Rgba>>(&self) -> Var<T>;
fn map_rgba(
&self,
map: impl FnMut(LightDark) -> LightDark + Send + 'static,
) -> Var<Rgba>;
fn map_rgba_into<T: VarValue + From<Rgba>>(
&self,
map: impl FnMut(LightDark) -> LightDark + Send + 'static,
) -> Var<T>;
fn shade_fct(&self, fct: impl Into<Factor>) -> Var<Rgba>;
fn shade_fct_into<T: VarValue + From<Rgba>>(
&self,
fct: impl Into<Factor>,
) -> Var<T>;
fn shade(&self, shade: i8) -> Var<Rgba>;
fn shade_into<T: VarValue + From<Rgba>>(&self, shade: i8) -> Var<T>;
}Expand description
Extension methods for Var<LightDark>.
Required Methods§
Sourcefn rgba(&self) -> Var<Rgba>
fn rgba(&self) -> Var<Rgba>
Gets a contextualized var that maps to LightDark::rgba.
Sourcefn rgba_map<T: VarValue>(
&self,
map: impl FnMut(Rgba) -> T + Send + 'static,
) -> Var<T>
fn rgba_map<T: VarValue>( &self, map: impl FnMut(Rgba) -> T + Send + 'static, ) -> Var<T>
Gets a contextualized var that maps to LightDark::rgba and map.
Sourcefn rgba_into<T: VarValue + From<Rgba>>(&self) -> Var<T>
fn rgba_into<T: VarValue + From<Rgba>>(&self) -> 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,
) -> Var<Rgba>
fn map_rgba( &self, map: impl FnMut(LightDark) -> LightDark + Send + 'static, ) -> 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,
) -> Var<T>
fn map_rgba_into<T: VarValue + From<Rgba>>( &self, map: impl FnMut(LightDark) -> LightDark + Send + 'static, ) -> Var<T>
Gets a contextualized var that maps using map and then into T.
Sourcefn shade_fct(&self, fct: impl Into<Factor>) -> Var<Rgba>
fn shade_fct(&self, fct: impl Into<Factor>) -> 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>,
) -> Var<T>
fn shade_fct_into<T: VarValue + From<Rgba>>( &self, fct: impl Into<Factor>, ) -> 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) -> Var<Rgba>
fn shade(&self, shade: i8) -> 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) -> Var<T>
fn shade_into<T: VarValue + From<Rgba>>(&self, shade: i8) -> Var<T>
Gets a contextualized var that maps to LightDark::shade and then to LightDark::rgba and then into T.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".