pub struct Identity {
pub origin: ModulePath,
pub version: Option<String>,
pub name: String,
}Expand description
A declaration’s identity: where it lives and its name (abi.md,
Identity and signatures). Written library@tag/module.Name for a
remote library, std@v1/module.Name for std and library/module.Name
for a local one, without /module for a library’s root module, and
path.Name for a module outside every library, from its tree.
Identity is a name: two identities are equal when they are written alike, whatever else their origins hold.
Fields§
§origin: ModulePathThe module it is declared in.
version: Option<String>The version its tree resolved to: the tag a remote import resolved,
v1 for std, and None for the local tree.
name: StringIts name.
Implementations§
Trait Implementations§
impl Eq for Identity
Auto Trait Implementations§
impl Forget for Identity
impl Freeze for Identity
impl Move for Identity
impl RefUnwindSafe for Identity
impl Send for Identitywhere
RawVecInner: Send,
impl Sync for Identitywhere
RawVecInner: Sync,
impl Unpin for Identity
impl UnsafeUnpin for Identity
impl UnwindSafe for Identitywhere
RawVecInner: UnwindSafe,
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