Struct ast_grep_napi::FindConfig
source · pub struct FindConfig {
pub paths: Vec<String>,
pub matcher: NapiConfig,
pub language_globs: Option<Vec<String>>,
}
Fields§
§paths: Vec<String>
specify the file paths to recursively find files
matcher: NapiConfig
a Rule object to find what nodes will match
language_globs: Option<Vec<String>>
An list of pattern globs to treat of certain files in the specified language. eg. [‘.vue’, ‘.svelte’] for html.findFiles, or [‘*.ts’] for tsx.findFiles. It is slightly different from https://ast-grep.github.io/reference/sgconfig.html#languageglobs
Trait Implementations§
source§impl FromNapiValue for FindConfig
impl FromNapiValue for FindConfig
source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
source§impl ToNapiValue for FindConfig
impl ToNapiValue for FindConfig
source§unsafe fn to_napi_value(env: napi_env, val: FindConfig) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: FindConfig) -> Result<napi_value>
Safety Read more
source§impl TypeName for FindConfig
impl TypeName for FindConfig
source§impl ValidateNapiValue for FindConfig
impl ValidateNapiValue for FindConfig
source§unsafe fn validate(
env: *mut napi_env__,
napi_val: *mut napi_value__
) -> Result<*mut napi_value__, Error>
unsafe fn validate( env: *mut napi_env__, napi_val: *mut napi_value__ ) -> Result<*mut napi_value__, Error>
Safety Read more
Auto Trait Implementations§
impl Freeze for FindConfig
impl RefUnwindSafe for FindConfig
impl Send for FindConfig
impl Sync for FindConfig
impl Unpin for FindConfig
impl UnwindSafe for FindConfig
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