pub struct Event {
pub id: EventId,
pub text: String,
pub key: String,
pub span: Span,
pub say: Option<String>,
}Expand description
Something that happens to the system: “the user presses reset”.
Fields§
§id: EventId§text: String§key: String§span: Span§say: Option<String>How docs tell the reader to make it happen (“press Space”). Without it, an event with an actor (“the user clicks the canvas”) becomes an instruction (“click the canvas”), and one without (“the timer runs out”) is something that happens.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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