Struct tray_icon_ex::menu::MenuEvent
source · pub struct MenuEvent {
pub id: MenuId,
}
Expand description
Describes a menu event emitted when a menu item is activated
Fields§
§id: MenuId
Id of the menu item which triggered this event
Implementations§
source§impl MenuEvent
impl MenuEvent
sourcepub fn receiver<'a>() -> &'a Receiver<MenuEvent>
pub fn receiver<'a>() -> &'a Receiver<MenuEvent>
Gets a reference to the event channel’s MenuEventReceiver
which can be used to listen for menu events.
Note
This will not receive any events if MenuEvent::set_event_handler
has been called with a Some
value.
sourcepub fn set_event_handler<F>(f: Option<F>)
pub fn set_event_handler<F>(f: Option<F>)
Set a handler to be called for new events. Useful for implementing custom event sender.
Note
Calling this function with a Some
value,
will not send new events to the channel associated with MenuEvent::receiver
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for MenuEvent
impl Send for MenuEvent
impl Sync for MenuEvent
impl Unpin for MenuEvent
impl UnwindSafe for MenuEvent
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