pub(crate) struct AstCtx<'a> {
pub(crate) file: &'a FileCtx<'a>,
pub(crate) root: &'a SourceFile,
pub(crate) line_index: &'a LineIndex,
}Fields§
§file: &'a FileCtx<'a>§root: &'a SourceFile§line_index: &'a LineIndexImplementations§
Source§impl AstCtx<'_>
impl AstCtx<'_>
pub(crate) fn nodes<'a, N>(&'a self) -> impl Iterator<Item = N> + 'awhere
N: AstNode + 'a,
pub(crate) fn is_in_test<N>(&self, node: &N) -> boolwhere
N: AstNode,
pub(crate) fn line_of(&self, location: impl RustLocation) -> usize
pub(crate) fn violation( &self, location: impl RustLocation, msg: impl Into<String>, ) -> Violation
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for AstCtx<'a>
impl<'a> !RefUnwindSafe for AstCtx<'a>
impl<'a> !Send for AstCtx<'a>
impl<'a> !Sync for AstCtx<'a>
impl<'a> Unpin for AstCtx<'a>
impl<'a> UnsafeUnpin for AstCtx<'a>
impl<'a> !UnwindSafe for AstCtx<'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