Skip to main content

PickerSelection

Trait PickerSelection 

Source
pub trait PickerSelection<T: 'static>: Clone + 'static {
    // Required methods
    fn current(&self) -> Option<T>;
    fn choose(&self, value: T);
}
Expand description

How a picker reads and writes its selection: a required value (picker) or an optional one (picker_optional). Implemented by the two adapters below, never by apps.

Required Methods§

Source

fn current(&self) -> Option<T>

Tracked read of the current value, None when nothing is chosen.

Source

fn choose(&self, value: T)

The user chose value.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<T: 'static, Sel: Binding<Option<T>>> PickerSelection<T> for Optional<Sel>

Source§

impl<T: 'static, Sel: Binding<T>> PickerSelection<T> for Required<Sel>

Day API ↩ Guides· daybrite.dev