pub enum Ambiguity {
FirstMatch,
Error,
}Expand description
How to resolve an entity type that the grammar leaves ambiguous.
When a phrase omits a type (e.g. "jack contacts jill"), nl3 infers it from
the matched predicate. If the predicate maps to a single type, that type is
always used. This policy only applies when more than one candidate type
exists.
Variants§
FirstMatch
Use the first candidate type, in grammar declaration order. (Default.)
Error
Return ParseError::AmbiguousType instead of guessing.
Trait Implementations§
impl Copy for Ambiguity
impl Eq for Ambiguity
impl StructuralPartialEq for Ambiguity
Auto Trait Implementations§
impl Freeze for Ambiguity
impl RefUnwindSafe for Ambiguity
impl Send for Ambiguity
impl Sync for Ambiguity
impl Unpin for Ambiguity
impl UnsafeUnpin for Ambiguity
impl UnwindSafe for Ambiguity
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