pub struct Interaction {
pub on_click: Option<CommandId>,
pub hover: Option<HoverSpec>,
}Expand description
Interaction spec — designed in ML.0, behaviour wired in ML.4.
on_click is dispatched through the host action registry; the
handler body lives in the registering mode/plugin crate
(feedback_mode_owns_its_surface,
feedback_effect_vocabulary_is_host_boundary) — the host is only a
router. hover is GPUI-only.
Fields§
§on_click: Option<CommandId>Command dispatched when the element is clicked; None for no click
behaviour.
hover: Option<HoverSpec>Tooltip shown on hover (GPUI only); None for none.
Trait Implementations§
Source§impl Clone for Interaction
impl Clone for Interaction
Source§fn clone(&self) -> Interaction
fn clone(&self) -> Interaction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Interaction
impl Debug for Interaction
Source§impl Default for Interaction
impl Default for Interaction
Source§fn default() -> Interaction
fn default() -> Interaction
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Interaction
impl RefUnwindSafe for Interaction
impl Send for Interaction
impl Sync for Interaction
impl Unpin for Interaction
impl UnsafeUnpin for Interaction
impl UnwindSafe for Interaction
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