pub struct NativePositionMapper { /* private fields */ }Implementations§
Source§impl NativePositionMapper
impl NativePositionMapper
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 NativePositionMapper
impl FromNapiMutRef for NativePositionMapper
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 NativePositionMapper
impl FromNapiRef for NativePositionMapper
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 NativePositionMapper
impl JavaScriptClassExt for NativePositionMapper
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 NativePositionMapper
impl ToNapiValue for NativePositionMapper
Source§unsafe fn to_napi_value(
env: napi_env,
val: NativePositionMapper,
) -> Result<napi_value>
unsafe fn to_napi_value( env: napi_env, val: NativePositionMapper, ) -> Result<napi_value>
Safety Read more
fn into_unknown(self, env: &Env) -> Result<Unknown<'_>, Error>
Source§impl TypeName for &NativePositionMapper
impl TypeName for &NativePositionMapper
Source§impl TypeName for &mut NativePositionMapper
impl TypeName for &mut NativePositionMapper
Source§impl TypeName for NativePositionMapper
impl TypeName for NativePositionMapper
Source§impl ValidateNapiValue for &NativePositionMapper
impl ValidateNapiValue for &NativePositionMapper
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 NativePositionMapper
impl ValidateNapiValue for &mut NativePositionMapper
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 NativePositionMapper
impl RefUnwindSafe for NativePositionMapper
impl Send for NativePositionMapper
impl Sync for NativePositionMapper
impl Unpin for NativePositionMapper
impl UnwindSafe for NativePositionMapper
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