pub enum TSParseError {
Parse(ParserError),
Language(LanguageError),
TreeUnavailable,
}
Expand description
Represents tree-sitter related error
Variants§
Parse(ParserError)
Language(LanguageError)
A general error when tree sitter fails to parse in time. It can be caused by the following reasons but tree-sitter does not provide error detail.
- The timeout set with Parser::set_timeout_micros expired
- The cancellation flag set with Parser::set_cancellation_flag was flipped
- The parser has not yet had a language assigned with Parser::set_language
Trait Implementations§
Source§impl Debug for TSParseError
impl Debug for TSParseError
Source§impl Display for TSParseError
impl Display for TSParseError
Source§impl Error for TSParseError
impl Error for TSParseError
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<LanguageError> for TSParseError
impl From<LanguageError> for TSParseError
Source§fn from(source: LanguageError) -> Self
fn from(source: LanguageError) -> Self
Converts to this type from the input type.
Source§impl From<ParserError> for TSParseError
impl From<ParserError> for TSParseError
Source§fn from(source: ParserError) -> Self
fn from(source: ParserError) -> Self
Converts to this type from the input type.
Source§impl From<TSParseError> for PatternError
impl From<TSParseError> for PatternError
Source§fn from(source: TSParseError) -> Self
fn from(source: TSParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TSParseError
impl RefUnwindSafe for TSParseError
impl Send for TSParseError
impl Sync for TSParseError
impl Unpin for TSParseError
impl UnwindSafe for TSParseError
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