Struct swc_plugin::source_map::PluginSourceMapProxy
source · [−]pub struct PluginSourceMapProxy;
Implementations
sourceimpl PluginSourceMapProxy
impl PluginSourceMapProxy
pub fn span_to_source<F, Ret>(
&self,
sp: Span,
extract_source: F
) -> Result<Ret, SpanSnippetError> where
F: FnOnce(&str, usize, usize) -> Ret,
Trait Implementations
sourceimpl Clone for PluginSourceMapProxy
impl Clone for PluginSourceMapProxy
sourcefn clone(&self) -> PluginSourceMapProxy
fn clone(&self) -> PluginSourceMapProxy
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PluginSourceMapProxy
impl Debug for PluginSourceMapProxy
sourceimpl SourceMapper for PluginSourceMapProxy
impl SourceMapper for PluginSourceMapProxy
Subset of SourceMap interface supported in plugin.
Unlike Comments
, this does not fully implement SourceMap
.
fn lookup_char_pos(&self, pos: BytePos) -> Loc
fn span_to_lines(&self, sp: Span) -> Result<FileLines, SpanLinesError>
fn span_to_string(&self, sp: Span) -> String
fn span_to_filename(&self, sp: Span) -> FileName
fn span_to_snippet(&self, sp: Span) -> Result<String, SpanSnippetError>
fn merge_spans(&self, sp_lhs: Span, sp_rhs: Span) -> Option<Span>
fn call_span_if_macro(&self, sp: Span) -> Span
fn doctest_offset_line(&self, line: usize) -> usize
sourceimpl SourceMapperExt for PluginSourceMapProxy
impl SourceMapperExt for PluginSourceMapProxy
fn get_code_map(&self) -> &dyn SourceMapper
fn is_on_same_line(&self, _lo: BytePos, _hi: BytePos) -> bool
fn should_write_separating_line_terminator<P, N>(
&self,
prev: Option<P>,
next: Option<N>,
format: ListFormat
) -> bool where
P: Spanned,
N: Spanned,
fn should_write_leading_line_terminator<N>(
&self,
parent_node: Span,
children: &[N],
format: ListFormat
) -> bool where
N: Spanned,
fn should_write_closing_line_terminator<N>(
&self,
parent_node: Span,
children: &[N],
format: ListFormat
) -> bool where
N: Spanned,
impl Copy for PluginSourceMapProxy
Auto Trait Implementations
impl RefUnwindSafe for PluginSourceMapProxy
impl Send for PluginSourceMapProxy
impl Sync for PluginSourceMapProxy
impl Unpin for PluginSourceMapProxy
impl UnwindSafe for PluginSourceMapProxy
Blanket Implementations
impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more