pub struct ToolbarAction { /* private fields */ }Expand description
One command of a Toolbar.
Implementations§
Source§impl ToolbarAction
impl ToolbarAction
Sourcepub fn accessible_name(self, name: impl Into<String>) -> Self
pub fn accessible_name(self, name: impl Into<String>) -> Self
What screen readers call it, instead of its label.
Sourcepub fn accessible_description(self, text: impl Into<String>) -> Self
pub fn accessible_description(self, text: impl Into<String>) -> Self
What screen readers say after its name. Its keys follow, when it has them.
Sourcepub fn icon_only(self) -> Self
pub fn icon_only(self) -> Self
Shows only the icon; the label stays as its name, and in the overflow menu.
Sourcepub fn style(self, style: ButtonStyle) -> Self
pub fn style(self, style: ButtonStyle) -> Self
The button’s style. Ghost by default.
Sourcepub fn disabled(self, disabled: bool) -> Self
pub fn disabled(self, disabled: bool) -> Self
Greys the command out. It keeps its place, so its neighbors do not move under the pointer, but it is left out of the overflow menu.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ToolbarAction
impl !Send for ToolbarAction
impl !Sync for ToolbarAction
impl !UnwindSafe for ToolbarAction
impl Freeze for ToolbarAction
impl Unpin for ToolbarAction
impl UnsafeUnpin for ToolbarAction
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