Enum deno_lint::ProgramRef
source · pub enum ProgramRef<'a> {
Module(&'a Module),
Script(&'a Script),
}
Variants§
Trait Implementations§
source§impl<'a> Clone for ProgramRef<'a>
impl<'a> Clone for ProgramRef<'a>
source§fn clone(&self) -> ProgramRef<'a>
fn clone(&self) -> ProgramRef<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> From<&'a Module> for ProgramRef<'a>
impl<'a> From<&'a Module> for ProgramRef<'a>
source§fn from(module: &'a Module) -> ProgramRef<'a>
fn from(module: &'a Module) -> ProgramRef<'a>
Converts to this type from the input type.
source§impl<'a> From<&'a Program> for ProgramRef<'a>
impl<'a> From<&'a Program> for ProgramRef<'a>
source§fn from(program: &'a Program) -> ProgramRef<'a>
fn from(program: &'a Program) -> ProgramRef<'a>
Converts to this type from the input type.
source§impl<'a> From<&'a Script> for ProgramRef<'a>
impl<'a> From<&'a Script> for ProgramRef<'a>
source§fn from(script: &'a Script) -> ProgramRef<'a>
fn from(script: &'a Script) -> ProgramRef<'a>
Converts to this type from the input type.
source§impl<'a> SourceRanged for ProgramRef<'a>
impl<'a> SourceRanged for ProgramRef<'a>
fn start(&self) -> SourcePos
fn end(&self) -> SourcePos
fn range(&self) -> SourceRange
fn byte_width(&self) -> usize
fn start_line_fast<'a, P>(&self, source: P) -> usizewhere
P: SourceTextInfoProvider<'a>,
fn end_line_fast<'a, P>(&self, source: P) -> usizewhere
P: SourceTextInfoProvider<'a>,
fn start_column_fast<'a, P>(&self, source: P) -> usizewhere
P: SourceTextInfoProvider<'a>,
fn end_column_fast<'a, P>(&self, source: P) -> usizewhere
P: SourceTextInfoProvider<'a>,
fn column_at_pos<'a, P>(&self, source: P, pos: SourcePos) -> usizewhere
P: SourceTextInfoProvider<'a>,
fn char_width_fast<'a, P>(&self, source: P) -> usizewhere
P: SourceTextInfoProvider<'a>,
fn text_fast<'a, P>(&self, source: P) -> &'a strwhere
P: SourceTextInfoProvider<'a>,
fn tokens_fast<'a>(&self, program: impl RootNode<'a>) -> &'a [TokenAndSpan]
fn leading_comments_fast<'a>( &self, program: impl RootNode<'a> ) -> CommentsIterator<'a>
fn trailing_comments_fast<'a>( &self, program: impl RootNode<'a> ) -> CommentsIterator<'a>
fn previous_token_fast<'a>( &self, program: impl RootNode<'a> ) -> Option<&'a TokenAndSpan>
fn next_token_fast<'a>( &self, program: impl RootNode<'a> ) -> Option<&'a TokenAndSpan>
fn previous_tokens_fast<'a>( &self, program: impl RootNode<'a> ) -> &'a [TokenAndSpan]
fn next_tokens_fast<'a>(&self, program: impl RootNode<'a>) -> &'a [TokenAndSpan]
impl<'a> Copy for ProgramRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for ProgramRef<'a>
impl<'a> RefUnwindSafe for ProgramRef<'a>
impl<'a> Send for ProgramRef<'a>
impl<'a> Sync for ProgramRef<'a>
impl<'a> Unpin for ProgramRef<'a>
impl<'a> UnwindSafe for ProgramRef<'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
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