added id's

This commit is contained in:
2024-11-08 16:41:07 +01:00
parent 2a43bf75db
commit c65bd68be5
5 changed files with 35 additions and 11 deletions
+6 -2
View File
@@ -1,7 +1,7 @@
use crate::key::Key;
/// Enum defining commands that can be issued by an `Element`.
#[derive(Debug, Clone, PartialEq)]
#[derive(Clone)]
pub enum Command {
/// Renders the element with the specified state.
Render(usize),
@@ -14,7 +14,7 @@ pub enum Command {
}
/// Enum representing the possible responses from an element event.
#[derive(Debug, Clone, PartialEq)]
#[derive(Clone)]
pub enum EventResponse {
/// Indicates that the event is complete.
Done,
@@ -24,6 +24,10 @@ pub enum EventResponse {
Command(Command),
/// Issues a list of commands.
CommandList(Vec<Command>),
// Update the current element
UpdateSelf(Box<dyn crate::Element>),
// Update a element by a id
UpdateElementById(String, Box<dyn crate::Element>),
}
/// Enum representing the possible responses from an element update.