pub struct SubMenu { /* private fields */ }Expand description
Show a submenu in a menu.
Useful if you want to make custom menu buttons.
Usually, just use MenuButton or SubMenuButton instead.
Implementations§
Source§impl SubMenu
impl SubMenu
pub fn new() -> Self
Sourcepub fn config(self, config: MenuConfig) -> Self
pub fn config(self, config: MenuConfig) -> Self
Set the config for the submenu.
The close behavior will not affect the current button, but the buttons in the submenu.
Sourcepub fn id_from_widget_id(widget_id: Id) -> Id
pub fn id_from_widget_id(widget_id: Id) -> Id
Get the id for the submenu from the widget/response id.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SubMenu
impl !RefUnwindSafe for SubMenu
impl Send for SubMenu
impl Sync for SubMenu
impl Unpin for SubMenu
impl !UnwindSafe for SubMenu
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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