#[non_exhaustive]pub enum StatementEditError {
Content(StatementContentError),
UnknownRule {
rule: usize,
},
IndexOutOfRange {
rule: usize,
list: StatementList,
index: usize,
},
StatementKind {
rule: usize,
list: StatementList,
},
EmptyInsert {
rule: usize,
list: StatementList,
},
SourceUnavailable {
rule: usize,
},
StaleAddress {
rule: usize,
list: StatementList,
},
Emission(WorkshopError),
Edit(SourceEditError),
}Expand description
Why Program::edit_statements refused an edit. Every refusal produces
no crate::source::SourceEdit.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Content(StatementContentError)
A statement node statement_from_content could not convert.
UnknownRule
address.rule indexes no rule of the program.
IndexOutOfRange
address.index addresses no statement: past the end of the list, or
into the synthesized tail a rule-final unclosed if group carries in
the public model but not in the source.
Fields
list: StatementListThe addressed list.
StatementKind
A condition node was addressed at actions, or an action node at
conditions.
EmptyInsert
insert was given an empty statement list.
The program carries no retained source for the addressed rule, or the retained text can no longer be read back.
StaleAddress
The retained source does not match the public model at the addressed position: the statement count differs, the addressed index is a source-synthesized entry, or the statement recorded there no longer has the model’s content.
Emission(WorkshopError)
Statement emission failed (for example a spelling missing in the requested locale, or a statement the Workshop grammar cannot carry).
Edit(SourceEditError)
The computed edit failed Program::edit_source’s checked range.
Trait Implementations§
Source§impl Debug for StatementEditError
impl Debug for StatementEditError
Source§impl Display for StatementEditError
impl Display for StatementEditError
Source§impl Error for StatementEditError
impl Error for StatementEditError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()