[][src]Struct meli::components::utilities::ButtonWidget

pub struct ButtonWidget<T> where
    T: 'static + Debug + Copy + Default + Send + Sync
{ buttons: HashMap<Cow<'static, str>, T>, layout: Vec<Cow<'static, str>>, result: Option<T>, cursor: usize, focus: bool, dirty: bool, id: ComponentId, }

Fields

buttons: HashMap<Cow<'static, str>, T>layout: Vec<Cow<'static, str>>result: Option<T>cursor: usizefocus: bool

Is the button widget focused, i.e do we need to draw the highlighting?

dirty: boolid: ComponentId

Implementations

impl<T> ButtonWidget<T> where
    T: 'static + Debug + Copy + Default + Send + Sync
[src]

pub fn new(init_val: (Cow<'static, str>, T)) -> ButtonWidget<T>[src]

pub fn push(&mut self, value: (Cow<'static, str>, T))[src]

pub fn is_resolved(&self) -> bool[src]

pub fn result(&self) -> Option<T>[src]

pub fn set_focus(&mut self, new_val: bool)[src]

pub fn set_cursor(&mut self, new_val: usize)[src]

Trait Implementations

impl<T> Component for ButtonWidget<T> where
    T: 'static + Debug + Copy + Default + Send + Sync
[src]

impl<T: Debug> Debug for ButtonWidget<T> where
    T: 'static + Debug + Copy + Default + Send + Sync
[src]

impl<T: Default> Default for ButtonWidget<T> where
    T: 'static + Debug + Copy + Default + Send + Sync
[src]

impl<T> Display for ButtonWidget<T> where
    T: 'static + Debug + Copy + Default + Send + Sync
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for ButtonWidget<T> where
    T: RefUnwindSafe

impl<T> Send for ButtonWidget<T>

impl<T> Sync for ButtonWidget<T>

impl<T> Unpin for ButtonWidget<T> where
    T: Unpin

impl<T> UnwindSafe for ButtonWidget<T> where
    T: UnwindSafe

Blanket Implementations

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> From<T> for T[src]

impl<T> Instrument for T[src]

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

impl<T> ToString for T where
    T: Display + ?Sized
[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>, 

impl<T> WithSubscriber for T[src]