pub enum PropertyEvent {
Added {
id: PropertyId,
},
Removed {
ids: Vec<PropertyId>,
},
Cleared {
removed: usize,
},
Changing {
token: ChangeToken,
id: PropertyId,
previous: PropertyValue,
proposed: PropertyValue,
},
Changed {
id: PropertyId,
previous: PropertyValue,
current: PropertyValue,
},
ChangeDenied {
token: ChangeToken,
id: PropertyId,
reason: DenialReason,
},
SelectionChanged {
previous: Option<PropertyId>,
current: Option<PropertyId>,
},
Activated {
id: PropertyId,
},
ExpansionChanged {
id: PropertyId,
expanded: bool,
},
ValidationChanged {
id: PropertyId,
message: Option<String>,
},
}Expand description
One ordered model event (P5).
Events are appended in the exact order transitions happen and are drained
with PropertyModel::drain_events; rejected operations emit nothing at
all, so a typed error is always the only signal for a rejected edit.
Variants§
Added
A node was appended or inserted.
Fields
id: PropertyIdThe new node.
Removed
A subtree was removed: the root first, then descendants in display order.
Fields
ids: Vec<PropertyId>Every removed id, root first.
Cleared
PropertyModel::clear dropped every node.
Changing
A user edit was staged and awaits a decision; nothing changed yet.
Fields
token: ChangeTokenOne-shot decision handle.
id: PropertyIdThe property being edited.
previous: PropertyValueThe value still stored.
proposed: PropertyValueThe value a commit would install.
Changed
A value change was applied (programmatic path or committed edit).
Fields
id: PropertyIdThe property that changed.
previous: PropertyValueThe value before the change.
current: PropertyValueThe value after the change.
ChangeDenied
A staged change was discarded instead of applied.
Fields
token: ChangeTokenThe token that was answered.
id: PropertyIdThe property the edit targeted.
reason: DenialReasonWhy the edit was discarded.
SelectionChanged
The single selection moved (current: None clears it).
Fields
previous: Option<PropertyId>The previous selection.
current: Option<PropertyId>The new selection.
Activated
PropertyModel::activate fired (programmatic double-click/Enter).
Fields
id: PropertyIdThe activated node.
ExpansionChanged
A node expanded or collapsed.
Fields
id: PropertyIdThe node whose expansion state changed.
ValidationChanged
The validation message of a node changed.
Fields
id: PropertyIdThe affected node.