pub struct ExternLibrary<'a> { /* private fields */ }Expand description
One actual admitted external library under a Rust name visible in the source model.
The receipt borrows one code query and keeps its complete original-name candidate
group. It is not durable identity or configuration proof. Same-package injected
libraries and extern crate self roots are excluded.
Implementations§
Source§impl ExternLibrary<'_>
impl ExternLibrary<'_>
Sourcepub const fn route_kind(&self) -> ExternRouteKind
pub const fn route_kind(&self) -> ExternRouteKind
Whether the receipt represents an absolute name or a lexical declaration.
Sourcepub const fn rust_name(&self) -> &str
pub const fn rust_name(&self) -> &str
The actual Rust external name, including a custom library or explicit alias.
Sourcepub fn resolve(
&self,
relative: &str,
namespace: Namespace,
) -> Result<Resolution, CodeResolveError>
pub fn resolve( &self, relative: &str, namespace: Namespace, ) -> Result<Resolution, CodeResolveError>
Resolve a relative definition that this library actually exports.
Public reexports retain their actual defining sites. Canonical definition paths are admitted only when those definitions appear on this library’s public surface. This does not replace lexical classification of a consumer occurrence. Resolution, surface construction and membership share one query work grant and retain the reading table’s original item-byte allowance, including hidden but public definitions.
§Errors
Preserves original external-name ambiguity, native resolution/surface causes, and an explicit refusal for definitions that are not exported.
Auto Trait Implementations§
impl<'a> Forget for ExternLibrary<'a>
impl<'a> Freeze for ExternLibrary<'a>
impl<'a> Move for ExternLibrary<'a>
impl<'a> RefUnwindSafe for ExternLibrary<'a>
impl<'a> Send for ExternLibrary<'a>
impl<'a> Sync for ExternLibrary<'a>
impl<'a> Unpin for ExternLibrary<'a>
impl<'a> UnsafeUnpin for ExternLibrary<'a>
impl<'a> UnwindSafe for ExternLibrary<'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
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> ⓘ
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> ⓘ
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