pub struct MenuButton<'a> {
pub button: Button<'a>,
pub config: Option<MenuConfig>,
}Expand description
A thin wrapper around a Button that shows a Popup::menu when clicked.
The only thing this does is search for the current menu config (if set via MenuBar).
If your menu button is not in a MenuBar it’s fine to use Ui::button and Popup::menu
directly.
Fields§
§config: Option<MenuConfig>Implementations§
Source§impl<'a> MenuButton<'a>
impl<'a> MenuButton<'a>
Auto Trait Implementations§
impl<'a> Freeze for MenuButton<'a>
impl<'a> !RefUnwindSafe for MenuButton<'a>
impl<'a> Send for MenuButton<'a>
impl<'a> Sync for MenuButton<'a>
impl<'a> Unpin for MenuButton<'a>
impl<'a> !UnwindSafe for MenuButton<'a>
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> 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