pub enum ModuleEvent {
Command(ModuleCommand),
Clicked(ActivityId),
Hovered {
activity: ActivityId,
hovered: bool,
},
Ended {
activity: ActivityId,
reason: EndReason,
},
BubbleClicked(BubbleId),
State {
module: String,
state: Value,
},
Offers(Vec<Contribution>),
}Expand description
What mochid tells the plugin.
Variants§
Command(ModuleCommand)
mochi ipc <plugin> <action>, or a call from another module. Answer
it with ModuleCommand::reply or ModuleCommand::answer.
Clicked(ActivityId)
A click on one of its activities that has no expanded view.
Hovered
The pointer came onto one of its activities on the island, or left.
Fields
§
activity: ActivityIdThe id ModuleCtx::present returned.
Ended
One of its activities is gone for good.
Fields
§
activity: ActivityIdThe id ModuleCtx::present returned.
BubbleClicked(BubbleId)
A click on one of its bubbles.
State
A module from [uses] state in the manifest published state:
Value::Null when it stopped. Sent once at the start when it has
some, then on every change.
Offers(Vec<Contribution>)
What the enabled modules offer this plugin: every contribution whose
target is its id. Sent at the start, then when a reload changes it.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModuleEvent
impl RefUnwindSafe for ModuleEvent
impl Send for ModuleEvent
impl Sync for ModuleEvent
impl Unpin for ModuleEvent
impl UnsafeUnpin for ModuleEvent
impl UnwindSafe for ModuleEvent
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