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 duplicate 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§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