pub struct Radio<'a, T = usize>{ /* private fields */ }Expand description
Render a list of radio buttons.
Implementations§
Source§impl<'a> Radio<'a, usize>
impl<'a> Radio<'a, usize>
Sourcepub fn auto_items<V: Into<Text<'a>>>(
self,
items: impl IntoIterator<Item = V>,
) -> Self
pub fn auto_items<V: Into<Text<'a>>>( self, items: impl IntoIterator<Item = V>, ) -> Self
Add items with auto-generated values.
Source§impl<'a, T> Radio<'a, T>
impl<'a, T> Radio<'a, T>
Sourcepub fn styles(self, styles: RadioStyle) -> Self
pub fn styles(self, styles: RadioStyle) -> Self
Set all styles.
Sourcepub fn select_style(self, style: impl Into<Style>) -> Self
pub fn select_style(self, style: impl Into<Style>) -> Self
Style when selected.
Sourcepub fn focus_style(self, style: impl Into<Style>) -> Self
pub fn focus_style(self, style: impl Into<Style>) -> Self
Style when focused.
Sourcepub fn layout(self, layout: RadioLayout) -> Self
pub fn layout(self, layout: RadioLayout) -> Self
Layout type, stacked or evenly spaced.
Sourcepub fn items<V: Into<Text<'a>>>(
self,
items: impl IntoIterator<Item = (T, V)>,
) -> Self
pub fn items<V: Into<Text<'a>>>( self, items: impl IntoIterator<Item = (T, V)>, ) -> Self
Button text.
Sourcepub fn default_value(self, default: T) -> Self
pub fn default_value(self, default: T) -> Self
Can return to default with user interaction.
Trait Implementations§
Source§impl<T> StatefulWidget for Radio<'_, T>
impl<T> StatefulWidget for Radio<'_, T>
Auto Trait Implementations§
impl<'a, T> Freeze for Radio<'a, T>where
T: Freeze,
impl<'a, T> RefUnwindSafe for Radio<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for Radio<'a, T>where
T: Send,
impl<'a, T> Sync for Radio<'a, T>where
T: Sync,
impl<'a, T> Unpin for Radio<'a, T>where
T: Unpin,
impl<'a, T> UnwindSafe for Radio<'a, T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more