Struct savory_elements::element::switch::Config[][src]

pub struct Config {
    pub id: Option<Id>,
    pub style: Style,
    pub toggled: bool,
    pub text: Option<Cow<'static, str>>,
    pub disabled: bool,
    pub color: Option<Color>,
    pub checkbox_like: bool,
}

Fields

id: Option<Id>style: Styletoggled: booltext: Option<Cow<'static, str>>disabled: boolcolor: Option<Color>checkbox_like: bool

Implementations

impl Config[src]

pub fn id(self, value: impl Into<Id>) -> Self[src]

pub fn try_id(self, value: Option<impl Into<Id>>) -> Self[src]

pub fn and_try_id(
    self,
    set_value: impl FnOnce(Option<Id>) -> Option<Id>
) -> Self
[src]

pub fn style(self, value: impl Into<Style>) -> Self[src]

pub fn and_style(self, set_value: impl FnOnce(Style) -> Style) -> Self[src]

pub fn toggled(self, value: impl Into<bool>) -> Self[src]

pub fn and_toggled(self, set_value: impl FnOnce(bool) -> bool) -> Self[src]

pub fn text(self, value: impl Into<Cow<'static, str>>) -> Self[src]

pub fn try_text(self, value: Option<impl Into<Cow<'static, str>>>) -> Self[src]

pub fn and_try_text(
    self,
    set_value: impl FnOnce(Option<Cow<'static, str>>) -> Option<Cow<'static, str>>
) -> Self
[src]

pub fn disabled(self, value: impl Into<bool>) -> Self[src]

pub fn and_disabled(self, set_value: impl FnOnce(bool) -> bool) -> Self[src]

pub fn color(self, value: impl Into<Color>) -> Self[src]

pub fn try_color(self, value: Option<impl Into<Color>>) -> Self[src]

pub fn and_try_color(
    self,
    set_value: impl FnOnce(Option<Color>) -> Option<Color>
) -> Self
[src]

pub fn checkbox_like(self, value: impl Into<bool>) -> Self[src]

pub fn and_checkbox_like(self, set_value: impl FnOnce(bool) -> bool) -> Self[src]

impl Config[src]

pub fn new() -> Self[src]

pub fn init(
    self,
    orders: &mut impl Orders<<Switch as Element>::Message>
) -> Switch
[src]

Auto Trait Implementations

impl RefUnwindSafe for Config

impl Send for Config

impl Sync for Config

impl Unpin for Config

impl UnwindSafe for Config

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    T: Component + Float,
    D: AdaptFrom<S, Swp, Dwp, T>,
    Swp: WhitePoint,
    Dwp: WhitePoint
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,