pub struct MenuBuilder<'a> { /* private fields */ }Expand description
Builder to fill a menu with items.
Implementations§
source§impl<'a> MenuBuilder<'a>
impl<'a> MenuBuilder<'a>
pub fn new() -> Self
sourcepub fn item_parsed(&mut self, text: &'a str) -> &mut Self
pub fn item_parsed(&mut self, text: &'a str) -> &mut Self
sourcepub fn item_string(&mut self, text: String) -> &mut Self
pub fn item_string(&mut self, text: String) -> &mut Self
New item with owned text.
New item with navigation.
New item with navigation.
sourcepub fn separator(&mut self, separator: Separator) -> &mut Self
pub fn separator(&mut self, separator: Separator) -> &mut Self
Sets the separator for the last item added. If there is none adds this as an empty menu-item.
Trait Implementations§
source§impl<'a> Clone for MenuBuilder<'a>
impl<'a> Clone for MenuBuilder<'a>
source§fn clone(&self) -> MenuBuilder<'a>
fn clone(&self) -> MenuBuilder<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<'a> Debug for MenuBuilder<'a>
impl<'a> Debug for MenuBuilder<'a>
source§impl<'a> Default for MenuBuilder<'a>
impl<'a> Default for MenuBuilder<'a>
source§fn default() -> MenuBuilder<'a>
fn default() -> MenuBuilder<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for MenuBuilder<'a>
impl<'a> RefUnwindSafe for MenuBuilder<'a>
impl<'a> Send for MenuBuilder<'a>
impl<'a> Sync for MenuBuilder<'a>
impl<'a> Unpin for MenuBuilder<'a>
impl<'a> UnwindSafe for MenuBuilder<'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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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