pub struct RadioGroup<T> { /* private fields */ }
Expand description

Group to coordinate multiple radio buttons.

A RadioGroup is used to create and manage RadioButtons.

A RadioGroup can be cloned; it will keep pointing to the same group.

Implementations§

Creates an empty group for radio buttons.

Adds a new button to the group.

The button will display label next to it, and will embed value.

Returns the id of the selected button.

Buttons are indexed in the order they are created, starting from 0.

Returns the value associated with the selected button.

Sets a callback to be used when the selection changes.

Sets a callback to be used when the selection changes.

Chainable variant.

Adds a button, using the label itself as value.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.