pub enum SourceSyntaxError {
Grammar(LanguageError),
MissingTree,
LimitExceeded(ExtractionLimitExceeded),
}Expand description
Error produced when a mandatory Tree-sitter grammar cannot inspect an input.
Variants§
Grammar(LanguageError)
The selected grammar could not be configured.
MissingTree
Tree-sitter did not return a syntax tree.
LimitExceeded(ExtractionLimitExceeded)
Parsing or traversal exceeded one configured invocation resource.
Trait Implementations§
Source§impl Debug for SourceSyntaxError
impl Debug for SourceSyntaxError
Source§impl Display for SourceSyntaxError
impl Display for SourceSyntaxError
Source§impl Error for SourceSyntaxError
impl Error for SourceSyntaxError
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()
Source§impl From<ExtractionLimitExceeded> for SourceSyntaxError
impl From<ExtractionLimitExceeded> for SourceSyntaxError
Source§fn from(source: ExtractionLimitExceeded) -> Self
fn from(source: ExtractionLimitExceeded) -> Self
Converts to this type from the input type.
Source§impl From<LanguageError> for SourceSyntaxError
impl From<LanguageError> for SourceSyntaxError
Source§fn from(source: LanguageError) -> Self
fn from(source: LanguageError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SourceSyntaxError
impl RefUnwindSafe for SourceSyntaxError
impl Send for SourceSyntaxError
impl Sync for SourceSyntaxError
impl Unpin for SourceSyntaxError
impl UnsafeUnpin for SourceSyntaxError
impl UnwindSafe for SourceSyntaxError
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