Struct ast_grep_napi::SgRoot

source ·
pub struct SgRoot(_, _);

Implementations§

source§

impl SgRoot

source

pub fn instance_of<V: NapiRaw>(env: Env, value: V) -> Result<bool>

source§

impl SgRoot

source§

impl SgRoot

source

pub fn root(&self, root_ref: Reference<SgRoot>, env: Env) -> Result<SgNode>

source

pub fn filename(&self) -> Result<String>

Trait Implementations§

source§

impl FromNapiMutRef for SgRoot

source§

unsafe fn from_napi_mut_ref( env: napi_env, napi_val: napi_value ) -> Result<&'static mut Self>

Safety Read more
source§

impl FromNapiRef for SgRoot

source§

unsafe fn from_napi_ref( env: napi_env, napi_val: napi_value ) -> Result<&'static Self>

Safety Read more
source§

impl FromNapiValue for &SgRoot

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

Safety Read more
source§

fn from_unknown(value: JsUnknown) -> Result<Self, Error<Status>>

source§

impl FromNapiValue for &mut SgRoot

source§

unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>

Safety Read more
source§

fn from_unknown(value: JsUnknown) -> Result<Self, Error<Status>>

source§

impl NapiRaw for &SgRoot

source§

unsafe fn raw(&self) -> napi_value

source§

impl NapiRaw for &mut SgRoot

source§

unsafe fn raw(&self) -> napi_value

source§

impl ObjectFinalize for SgRoot

source§

fn finalize(self, env: Env) -> Result<(), Error<Status>>

source§

impl ToNapiValue for SgRoot

source§

unsafe fn to_napi_value(env: napi_env, val: SgRoot) -> Result<napi_value>

Safety Read more
source§

impl TypeName for &SgRoot

source§

impl TypeName for &mut SgRoot

source§

impl TypeName for SgRoot

source§

impl ValidateNapiValue for &SgRoot

source§

unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>

Safety Read more
source§

impl ValidateNapiValue for &mut SgRoot

source§

unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>

Safety Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for SgRoot

§

impl Send for SgRoot

§

impl Sync for SgRoot

§

impl Unpin for SgRoot

§

impl !UnwindSafe for SgRoot

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> JsValuesTupleIntoVec for Twhere T: ToNapiValue,

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.