pub enum MainButton<'a> {
SingleAction(&'a str),
DropdownActions(&'a str, &'a [&'a str]),
Response(&'a str),
}
Expand description
Possible actions accessible through the main button of the notification
Variants§
SingleAction(&'a str)
Display a single action with the given name
§Example:
let _ = MainButton::SingleAction("Action name");
DropdownActions(&'a str, &'a [&'a str])
Display a dropdown with the given title, with a list of actions with given names
§Example:
let _ = MainButton::DropdownActions("Dropdown name", &["Action 1", "Action 2"]);
Response(&'a str)
Display a text input field with the given placeholder
§Example:
let _ = MainButton::Response("Enter some text...");
Trait Implementations§
Source§impl<'a> Clone for MainButton<'a>
impl<'a> Clone for MainButton<'a>
Source§fn clone(&self) -> MainButton<'a>
fn clone(&self) -> MainButton<'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 moreAuto Trait Implementations§
impl<'a> Freeze for MainButton<'a>
impl<'a> RefUnwindSafe for MainButton<'a>
impl<'a> Send for MainButton<'a>
impl<'a> Sync for MainButton<'a>
impl<'a> Unpin for MainButton<'a>
impl<'a> UnwindSafe for MainButton<'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