#[non_exhaustive]pub enum CanvasInteraction {
Click {
element_id: ElementId,
action: String,
},
InputSubmit {
element_id: ElementId,
value: String,
},
FormSubmit {
element_id: ElementId,
values: HashMap<String, String>,
},
CodeSubmit {
element_id: ElementId,
code: String,
language: String,
},
}Expand description
Interaction events from the canvas back to agents.
These are generated by user interaction with canvas elements and sent back to the agent via WebSocket.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Click
User clicked a button element.
InputSubmit
User submitted an input field.
FormSubmit
User submitted a form.
CodeSubmit
User submitted code from a code editor.
Trait Implementations§
Source§impl Clone for CanvasInteraction
impl Clone for CanvasInteraction
Source§fn clone(&self) -> CanvasInteraction
fn clone(&self) -> CanvasInteraction
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 Debug for CanvasInteraction
impl Debug for CanvasInteraction
Source§impl<'de> Deserialize<'de> for CanvasInteraction
impl<'de> Deserialize<'de> for CanvasInteraction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CanvasInteraction
impl RefUnwindSafe for CanvasInteraction
impl Send for CanvasInteraction
impl Sync for CanvasInteraction
impl Unpin for CanvasInteraction
impl UnsafeUnpin for CanvasInteraction
impl UnwindSafe for CanvasInteraction
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