Trait zng::slider::SelectorValue

source ·
pub trait SelectorValue: VarValue {
    // Required method
    fn to_selector(
        value: Box<dyn VarBoxed<Self>>,
        min: Self,
        max: Self,
    ) -> Selector;
}
Expand description

Represents a type that can auto implement a Selector.

§Implementing

This trait is implemented for all primitive type and Zng layout types, if a type does not you can declare custom conversions using Selector::value.

Required Methods§

source

fn to_selector(value: Box<dyn VarBoxed<Self>>, min: Self, max: Self) -> Selector

Make the selector.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl SelectorValue for f32

source§

fn to_selector(value: Box<dyn VarBoxed<f32>>, min: f32, max: f32) -> Selector

source§

impl SelectorValue for f64

source§

fn to_selector(value: Box<dyn VarBoxed<f64>>, min: f64, max: f64) -> Selector

source§

impl SelectorValue for i8

source§

fn to_selector(value: Box<dyn VarBoxed<i8>>, min: i8, max: i8) -> Selector

source§

impl SelectorValue for i16

source§

fn to_selector(value: Box<dyn VarBoxed<i16>>, min: i16, max: i16) -> Selector

source§

impl SelectorValue for i32

source§

fn to_selector(value: Box<dyn VarBoxed<i32>>, min: i32, max: i32) -> Selector

source§

impl SelectorValue for i64

source§

fn to_selector(value: Box<dyn VarBoxed<i64>>, min: i64, max: i64) -> Selector

source§

impl SelectorValue for i128

source§

fn to_selector(value: Box<dyn VarBoxed<i128>>, min: i128, max: i128) -> Selector

source§

impl SelectorValue for u8

source§

fn to_selector(value: Box<dyn VarBoxed<u8>>, min: u8, max: u8) -> Selector

source§

impl SelectorValue for u16

source§

fn to_selector(value: Box<dyn VarBoxed<u16>>, min: u16, max: u16) -> Selector

source§

impl SelectorValue for u32

source§

fn to_selector(value: Box<dyn VarBoxed<u32>>, min: u32, max: u32) -> Selector

source§

impl SelectorValue for u64

source§

fn to_selector(value: Box<dyn VarBoxed<u64>>, min: u64, max: u64) -> Selector

source§

impl SelectorValue for u128

source§

fn to_selector(value: Box<dyn VarBoxed<u128>>, min: u128, max: u128) -> Selector

Implementors§