pub struct NativePlugin { /* private fields */ }Implementations§
Source§impl NativePlugin
impl NativePlugin
pub fn new() -> Self
pub fn log(&self, message: String)
pub fn set_log_file(&self, path: String)
pub fn process_file( &self, _env: Env, filepath: String, code: String, options: Option<ProcessFileOptions>, ) -> Result<ExpandResult>
pub fn get_mapper(&self, filepath: String) -> Option<NativeMapper>
pub fn map_diagnostics( &self, filepath: String, diags: Vec<JsDiagnostic>, ) -> Vec<JsDiagnostic>
Trait Implementations§
Source§impl Default for NativePlugin
impl Default for NativePlugin
Source§impl FromNapiMutRef for NativePlugin
impl FromNapiMutRef for NativePlugin
Source§unsafe fn from_napi_mut_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static mut Self>
unsafe fn from_napi_mut_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static mut Self>
Safety Read more
Source§impl FromNapiRef for NativePlugin
impl FromNapiRef for NativePlugin
Source§unsafe fn from_napi_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static Self>
unsafe fn from_napi_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static Self>
Safety Read more
Source§impl JavaScriptClassExt for NativePlugin
impl JavaScriptClassExt for NativePlugin
fn into_instance<'scope>( self, env: &'scope Env, ) -> Result<ClassInstance<'scope, Self>>
fn into_reference(self, env: Env) -> Result<Reference<Self>>
fn instance_of<'env, V: JsValue<'env>>(env: &Env, value: &V) -> Result<bool>
Source§impl ToNapiValue for NativePlugin
impl ToNapiValue for NativePlugin
Source§unsafe fn to_napi_value(env: napi_env, val: NativePlugin) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: NativePlugin) -> Result<napi_value>
Safety Read more
fn into_unknown(self, env: &Env) -> Result<Unknown<'_>, Error>
Source§impl TypeName for &NativePlugin
impl TypeName for &NativePlugin
Source§impl TypeName for &mut NativePlugin
impl TypeName for &mut NativePlugin
Source§impl TypeName for NativePlugin
impl TypeName for NativePlugin
Source§impl ValidateNapiValue for &NativePlugin
impl ValidateNapiValue for &NativePlugin
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for &mut NativePlugin
impl ValidateNapiValue for &mut NativePlugin
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Auto Trait Implementations§
impl !Freeze for NativePlugin
impl RefUnwindSafe for NativePlugin
impl Send for NativePlugin
impl Sync for NativePlugin
impl Unpin for NativePlugin
impl UnwindSafe for NativePlugin
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more