Struct widgetry::Choice [−][src]
pub struct Choice<T> { pub label: String, pub data: T, pub(crate) hotkey: Option<MultiKey>, pub(crate) active: bool, pub(crate) tooltip: Option<String>, pub(crate) fg: Option<Color>, }
Fields
label: String
data: T
hotkey: Option<MultiKey>
active: bool
tooltip: Option<String>
fg: Option<Color>
Implementations
impl<T> Choice<T>
[src]
impl<T> Choice<T>
[src]pub fn new<S: Into<String>>(label: S, data: T) -> Choice<T>
[src]
pub fn from(tuples: Vec<(String, T)>) -> Vec<Choice<T>>
[src]
pub fn key(self, key: Key) -> Choice<T>
[src]
pub fn multikey(self, mk: MultiKey) -> Choice<T>
[src]
pub fn active(self, active: bool) -> Choice<T>
[src]
pub fn tooltip<I: Into<String>>(self, info: I) -> Choice<T>
[src]
pub fn fg(self, fg: Color) -> Choice<T>
[src]
pub(crate) fn with_value<X>(&self, data: X) -> Choice<X>
[src]
impl Choice<String>
[src]
impl Choice<String>
[src]Auto Trait Implementations
impl<T> RefUnwindSafe for Choice<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Choice<T> where
T: Send,
T: Send,
impl<T> Sync for Choice<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Choice<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Choice<T> where
T: UnwindSafe,
T: UnwindSafe,