#[non_exhaustive]pub enum GenError {
ProseValueReachable {
rule: String,
prose: String,
},
UnrepresentableTerminal {
rule: String,
terminal: String,
},
UnknownRule(String),
NoFiniteExpansion {
rule: String,
},
OutputLimit,
StepLimit,
}Expand description
Generation could not be attempted, or could not be finished.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ProseValueReachable
The start rule can reach a prose value, which cannot be generated (SCOPE.md 6.5).
UnrepresentableTerminal
The start rule can reach a terminal with no representable scalar value (SCOPE.md 6.1).
UnknownRule(String)
No such rule in the grammar or the core environment.
NoFiniteExpansion
The start rule is unproductive: it has no finite expansion (D9).
OutputLimit
GenOptions::max_output_len was exceeded.
Mandatory work is not bounded by depth — start = 1000000000*"a" is productive and has
no shorter expansion — so this bound, not termination, is what makes generation
practical (SCOPE.md 6.8, D29).
StepLimit
GenOptions::max_steps was exceeded.
Trait Implementations§
impl Eq for GenError
Source§impl Error for GenError
impl Error for GenError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl StructuralPartialEq for GenError
Auto Trait Implementations§
impl Freeze for GenError
impl RefUnwindSafe for GenError
impl Send for GenError
impl Sync for GenError
impl Unpin for GenError
impl UnsafeUnpin for GenError
impl UnwindSafe for GenError
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