pub struct NativeMapper { /* private fields */ }Implementations§
Source§impl NativeMapper
impl NativeMapper
pub fn new(mapping: SourceMappingResult) -> Self
pub fn is_empty(&self) -> bool
pub fn original_to_expanded(&self, pos: u32) -> u32
pub fn expanded_to_original(&self, pos: u32) -> Option<u32>
pub fn generated_by(&self, pos: u32) -> Option<String>
pub fn map_span_to_original( &self, start: u32, length: u32, ) -> Option<SpanResult>
pub fn map_span_to_expanded(&self, start: u32, length: u32) -> SpanResult
pub fn is_in_generated(&self, pos: u32) -> bool
Trait Implementations§
Source§impl FromNapiMutRef for NativeMapper
impl FromNapiMutRef for NativeMapper
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 NativeMapper
impl FromNapiRef for NativeMapper
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 NativeMapper
impl JavaScriptClassExt for NativeMapper
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 NativeMapper
impl ToNapiValue for NativeMapper
Source§unsafe fn to_napi_value(env: napi_env, val: NativeMapper) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: NativeMapper) -> Result<napi_value>
Safety Read more
fn into_unknown(self, env: &Env) -> Result<Unknown<'_>, Error>
Source§impl TypeName for &NativeMapper
impl TypeName for &NativeMapper
Source§impl TypeName for &mut NativeMapper
impl TypeName for &mut NativeMapper
Source§impl TypeName for NativeMapper
impl TypeName for NativeMapper
Source§impl ValidateNapiValue for &NativeMapper
impl ValidateNapiValue for &NativeMapper
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 NativeMapper
impl ValidateNapiValue for &mut NativeMapper
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 NativeMapper
impl RefUnwindSafe for NativeMapper
impl Send for NativeMapper
impl Sync for NativeMapper
impl Unpin for NativeMapper
impl UnwindSafe for NativeMapper
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