pub struct RadioGroup<T: Clone + PartialEq + 'static> { /* private fields */ }Expand description
A radio group component for selecting one option from a list
Implementations§
Source§impl<T: Clone + PartialEq + 'static> RadioGroup<T>
impl<T: Clone + PartialEq + 'static> RadioGroup<T>
pub fn new(id: impl Into<ElementId>, options: Vec<RadioOption<T>>) -> Self
pub fn selected(self, value: T) -> Self
pub fn selected_option(self, value: Option<T>) -> Self
pub fn disabled(self, disabled: bool) -> Self
pub fn get_selected(&self) -> Option<&T>
pub fn set_selected(&mut self, value: T, cx: &mut Context<'_, Self>)
Trait Implementations§
Source§impl<T: Clone + PartialEq + 'static> ControlSized for RadioGroup<T>
impl<T: Clone + PartialEq + 'static> ControlSized for RadioGroup<T>
Source§impl<T: Clone + PartialEq + 'static> Disableable for RadioGroup<T>
impl<T: Clone + PartialEq + 'static> Disableable for RadioGroup<T>
impl<T: Clone + PartialEq + 'static> EventEmitter<RadioGroupChanged<T>> for RadioGroup<T>
Source§impl<T: Clone + PartialEq + 'static> Orientable for RadioGroup<T>
impl<T: Clone + PartialEq + 'static> Orientable for RadioGroup<T>
Source§fn orientation(self, orientation: Orientation) -> Self
fn orientation(self, orientation: Orientation) -> Self
Set the orientation of this element.
Source§fn horizontal(self) -> Self
fn horizontal(self) -> Self
Set this element to horizontal orientation.
Auto Trait Implementations§
impl<T> Freeze for RadioGroup<T>
impl<T> RefUnwindSafe for RadioGroup<T>
impl<T> Send for RadioGroup<T>
impl<T> Sync for RadioGroup<T>
impl<T> Unpin for RadioGroup<T>
impl<T> UnsafeUnpin for RadioGroup<T>
impl<T> UnwindSafe for RadioGroup<T>
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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