pub enum ResolvedSourceEdge<'a> {
Import(&'a ResolvedImport),
ReExport(&'a ResolvedReExport),
}Expand description
Any source-bearing module edge that resolves one literal specifier.
Variants§
Import(&'a ResolvedImport)
Static or literal dynamic import edge.
ReExport(&'a ResolvedReExport)
Re-export source edge.
Implementations§
Source§impl<'a> ResolvedSourceEdge<'a>
impl<'a> ResolvedSourceEdge<'a>
Sourcepub fn source_specifier(&self) -> &'a str
pub fn source_specifier(&self) -> &'a str
Return the original source specifier.
Sourcepub const fn target(&self) -> &'a ResolveResult
pub const fn target(&self) -> &'a ResolveResult
Return the resolved target.
Sourcepub const fn is_type_only(&self) -> bool
pub const fn is_type_only(&self) -> bool
Return whether this edge is type-only.
Sourcepub const fn source_span(&self) -> Span
pub const fn source_span(&self) -> Span
Return the source literal span when the extractor has one.
Sourcepub const fn statement_span(&self) -> Span
pub const fn statement_span(&self) -> Span
Return the span of the enclosing statement.
Imports do not record a statement span, so their per-binding declaration span is the closest available statement anchor.
Auto Trait Implementations§
impl<'a> Freeze for ResolvedSourceEdge<'a>
impl<'a> RefUnwindSafe for ResolvedSourceEdge<'a>
impl<'a> Send for ResolvedSourceEdge<'a>
impl<'a> Sync for ResolvedSourceEdge<'a>
impl<'a> Unpin for ResolvedSourceEdge<'a>
impl<'a> UnsafeUnpin for ResolvedSourceEdge<'a>
impl<'a> UnwindSafe for ResolvedSourceEdge<'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