pub(crate) struct RawConverter<'a> {
pub(crate) lexed: LexedStr<'a>,
pub(crate) pos: usize,
pub(crate) anchor: SpanAnchor,
pub(crate) ctx: SyntaxContext,
pub(crate) mode: DocCommentDesugarMode,
}Expand description
A raw token (straight from lexer) converter
Fields§
§lexed: LexedStr<'a>§pos: usize§anchor: SpanAnchor§ctx: SyntaxContext§mode: DocCommentDesugarModeTrait Implementations§
Source§impl SrcToken<RawConverter<'_>> for usize
impl SrcToken<RawConverter<'_>> for usize
Source§impl TokenConverter for RawConverter<'_>
impl TokenConverter for RawConverter<'_>
type Token = usize
fn convert_doc_comment( &self, token: &usize, span: Span, builder: &mut TopSubtreeBuilder, )
fn bump(&mut self) -> Option<(Self::Token, TextRange)>
fn peek(&self) -> Option<Self::Token>
fn span_for(&self, range: TextRange) -> Span
fn call_site(&self) -> Span
Auto Trait Implementations§
impl<'a> Freeze for RawConverter<'a>
impl<'a> !RefUnwindSafe for RawConverter<'a>
impl<'a> Send for RawConverter<'a>
impl<'a> Sync for RawConverter<'a>
impl<'a> Unpin for RawConverter<'a>
impl<'a> !UnwindSafe for RawConverter<'a>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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