Skip to main content

Checkbox

Trait Checkbox 

Source
pub trait Checkbox: Clone + 'static {
    // Required methods
    fn checked(&self, choice: &str) -> bool;
    fn check(&self, choice: &str, checked: bool);
}
Expand description

A checkbox. Signal<bool> follows its checked state; Signal<Vec<T>> holds the value of every checked box bound to it.

Required Methods§

Source

fn checked(&self, choice: &str) -> bool

Whether the box whose value is choice is checked.

Source

fn check(&self, choice: &str, checked: bool)

The user checked or cleared the box whose value is choice.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Checkbox for Signal<bool>

Source§

impl<T: FromStr + PartialEq + 'static> Checkbox for Signal<Vec<T>>