pub struct RadioView<State: 'static> { /* private fields */ }Expand description
A declarative radio button. See the module docs.
Implementations§
Source§impl<State: 'static> RadioView<State>
impl<State: 'static> RadioView<State>
Sourcepub fn on_select<F: Fn(&mut State) + 'static>(self, on_select: F) -> Self
pub fn on_select<F: Fn(&mut State) + 'static>(self, on_select: F) -> Self
Fire on_select(state) on release inside this radio’s bounds. Never
self-mutates selected — see the module docs.
Trait Implementations§
Source§impl<State: 'static> View<State> for RadioView<State>
impl<State: 'static> View<State> for RadioView<State>
Source§type Element = RadioWidget
type Element = RadioWidget
The retained widget this view produces.
Source§fn build(&self, ctx: &mut BuildCtx<'_>) -> RadioWidget
fn build(&self, ctx: &mut BuildCtx<'_>) -> RadioWidget
Materialise a fresh widget for this view.
Source§fn rebuild(
&self,
prev: &Self,
element: &mut RadioWidget,
ctx: &mut BuildCtx<'_>,
) -> ChangeFlags
fn rebuild( &self, prev: &Self, element: &mut RadioWidget, ctx: &mut BuildCtx<'_>, ) -> ChangeFlags
Reconcile
prev (the previous view of the same type) against the live
element, mutating it in place and reporting what changed.Auto Trait Implementations§
impl<State> !RefUnwindSafe for RadioView<State>
impl<State> !Send for RadioView<State>
impl<State> !Sync for RadioView<State>
impl<State> !UnwindSafe for RadioView<State>
impl<State> Freeze for RadioView<State>
impl<State> Unpin for RadioView<State>
impl<State> UnsafeUnpin for RadioView<State>
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.