pub struct OnValue {
pub on_keyword: Ident,
pub name: Ident,
pub colon_token: Colon,
pub transition_definitions: Punctuated<TransitionDefinition, Comma>,
}Expand description
Represents a on statement in a component.
ⓘ
on event_name: State1 => State2 { statements; }
on event_name: [ State1 => State2 { statements; }, State3 => State4 { statements; } ]In which case, the event_name is stored in the name field, while State1 in source_state,
State2 in destination_state and { statements } in action.
Fields§
§on_keyword: Ident§name: Identname of the on vale
colon_token: Colon§transition_definitions: Punctuated<TransitionDefinition, Comma>Transition definitions for this on value
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OnValue
impl RefUnwindSafe for OnValue
impl !Send for OnValue
impl !Sync for OnValue
impl Unpin for OnValue
impl UnwindSafe for OnValue
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