pub struct IndexedImport<'query, 'workspace> { /* private fields */ }Expand description
One import in the module index, with its exact target and reading context.
Implementations§
Source§impl IndexedImport<'_, '_>
impl IndexedImport<'_, '_>
Sourcepub fn site(&self) -> (TargetId, &RelPath, usize)
pub fn site(&self) -> (TargetId, &RelPath, usize)
The target and location where this flattened import was written.
Sourcepub fn path(&self) -> (&[String], bool, bool, &'static [Namespace])
pub fn path(&self) -> (&[String], bool, bool, &'static [Namespace])
The imported path segments, whether they start with ::, whether
the declaration imports a glob from that path, and the namespaces
in which the full path is read.
Sourcepub fn resolve(
&self,
path: &str,
namespace: Namespace,
) -> Result<Resolution, CodeResolveError>
pub fn resolve( &self, path: &str, namespace: Namespace, ) -> Result<Resolution, CodeResolveError>
Resolve the whole import path or a prefix of it in its own use context.
§Errors
Preserves shared resolver errors, including invalid prefixes.
Auto Trait Implementations§
impl<'query, 'workspace> Forget for IndexedImport<'query, 'workspace>
impl<'query, 'workspace> Freeze for IndexedImport<'query, 'workspace>
impl<'query, 'workspace> Move for IndexedImport<'query, 'workspace>
impl<'query, 'workspace> RefUnwindSafe for IndexedImport<'query, 'workspace>
impl<'query, 'workspace> Send for IndexedImport<'query, 'workspace>
impl<'query, 'workspace> Sync for IndexedImport<'query, 'workspace>
impl<'query, 'workspace> Unpin for IndexedImport<'query, 'workspace>
impl<'query, 'workspace> UnsafeUnpin for IndexedImport<'query, 'workspace>
impl<'query, 'workspace> UnwindSafe for IndexedImport<'query, 'workspace>
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> 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