Trait proc_macro::bridge::server::Span
source · pub trait Span: Types {
Show 15 methods
// Required methods
fn debug(&mut self, self_: Self::Span) -> String;
fn source_file(&mut self, self_: Self::Span) -> Self::SourceFile;
fn parent(&mut self, self_: Self::Span) -> Option<Self::Span>;
fn source(&mut self, self_: Self::Span) -> Self::Span;
fn byte_range(&mut self, self_: Self::Span) -> Range<usize>;
fn start(&mut self, self_: Self::Span) -> Self::Span;
fn end(&mut self, self_: Self::Span) -> Self::Span;
fn line(&mut self, self_: Self::Span) -> usize;
fn column(&mut self, self_: Self::Span) -> usize;
fn join(
&mut self,
self_: Self::Span,
other: Self::Span
) -> Option<Self::Span>;
fn subspan(
&mut self,
self_: Self::Span,
start: Bound<usize>,
end: Bound<usize>
) -> Option<Self::Span>;
fn resolved_at(&mut self, self_: Self::Span, at: Self::Span) -> Self::Span;
fn source_text(&mut self, self_: Self::Span) -> Option<String>;
fn save_span(&mut self, self_: Self::Span) -> usize;
fn recover_proc_macro_span(&mut self, id: usize) -> Self::Span;
}
🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)Required Methods§
sourcefn debug(&mut self, self_: Self::Span) -> String
fn debug(&mut self, self_: Self::Span) -> String
🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)sourcefn source_file(&mut self, self_: Self::Span) -> Self::SourceFile
fn source_file(&mut self, self_: Self::Span) -> Self::SourceFile
🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)sourcefn parent(&mut self, self_: Self::Span) -> Option<Self::Span>
fn parent(&mut self, self_: Self::Span) -> Option<Self::Span>
🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)sourcefn source(&mut self, self_: Self::Span) -> Self::Span
fn source(&mut self, self_: Self::Span) -> Self::Span
🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)sourcefn byte_range(&mut self, self_: Self::Span) -> Range<usize>
fn byte_range(&mut self, self_: Self::Span) -> Range<usize>
🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)sourcefn start(&mut self, self_: Self::Span) -> Self::Span
fn start(&mut self, self_: Self::Span) -> Self::Span
🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)sourcefn end(&mut self, self_: Self::Span) -> Self::Span
fn end(&mut self, self_: Self::Span) -> Self::Span
🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)sourcefn line(&mut self, self_: Self::Span) -> usize
fn line(&mut self, self_: Self::Span) -> usize
🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)sourcefn column(&mut self, self_: Self::Span) -> usize
fn column(&mut self, self_: Self::Span) -> usize
🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)sourcefn join(&mut self, self_: Self::Span, other: Self::Span) -> Option<Self::Span>
fn join(&mut self, self_: Self::Span, other: Self::Span) -> Option<Self::Span>
🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)sourcefn subspan(
&mut self,
self_: Self::Span,
start: Bound<usize>,
end: Bound<usize>
) -> Option<Self::Span>
fn subspan( &mut self, self_: Self::Span, start: Bound<usize>, end: Bound<usize> ) -> Option<Self::Span>
🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)sourcefn resolved_at(&mut self, self_: Self::Span, at: Self::Span) -> Self::Span
fn resolved_at(&mut self, self_: Self::Span, at: Self::Span) -> Self::Span
🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)sourcefn source_text(&mut self, self_: Self::Span) -> Option<String>
fn source_text(&mut self, self_: Self::Span) -> Option<String>
🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)sourcefn save_span(&mut self, self_: Self::Span) -> usize
fn save_span(&mut self, self_: Self::Span) -> usize
🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)sourcefn recover_proc_macro_span(&mut self, id: usize) -> Self::Span
fn recover_proc_macro_span(&mut self, id: usize) -> Self::Span
🔬This is a nightly-only experimental API. (
proc_macro_internals
#27812)