pub enum AstGrepError {
PathNotFound(String),
Glob(GlobError),
UnsupportedLanguage(String),
InvalidPattern(String),
InvalidConstraintRegex {
name: String,
reason: String,
},
ReadFailed {
path: String,
reason: String,
},
SearchFailed(String),
}Expand description
Errors related to ast-grep structural search operations
Variants§
PathNotFound(String)
Search path does not exist
Glob(GlobError)
Glob filter errors
UnsupportedLanguage(String)
Unsupported ast-grep language
InvalidPattern(String)
Invalid ast-grep pattern
InvalidConstraintRegex
Invalid regex in a capture constraint
ReadFailed
Failed to read file
SearchFailed(String)
Search failed during ast-grep processing
Trait Implementations§
Source§impl Debug for AstGrepError
impl Debug for AstGrepError
Source§impl Display for AstGrepError
impl Display for AstGrepError
Source§impl Error for AstGrepError
impl Error for AstGrepError
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<AstGrepError> for CodingError
impl From<AstGrepError> for CodingError
Source§fn from(source: AstGrepError) -> Self
fn from(source: AstGrepError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AstGrepError
impl RefUnwindSafe for AstGrepError
impl Send for AstGrepError
impl Sync for AstGrepError
impl Unpin for AstGrepError
impl UnsafeUnpin for AstGrepError
impl UnwindSafe for AstGrepError
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