Struct rustc_ap_rustc_span::def_id::StableCrateId[][src]

pub struct StableCrateId(_);

A StableCrateId is a 64 bit hash of (crate-name, crate-disambiguator). It is to CrateNum what DefPathHash is to DefId. It is stable across compilation sessions.

Since the ID is a hash value there is a (very small) chance that two crates end up with the same StableCrateId. The compiler will check for such collisions when loading crates and abort compilation in order to avoid further trouble.

Implementations

impl StableCrateId[src]

pub fn new(
    crate_name: &str,
    crate_disambiguator: CrateDisambiguator
) -> StableCrateId
[src]

Computes the stable ID for a crate with the given name and disambiguator.

Trait Implementations

impl Clone for StableCrateId[src]

impl Copy for StableCrateId[src]

impl Debug for StableCrateId[src]

impl<__D: Decoder> Decodable<__D> for StableCrateId[src]

impl<__E: Encoder> Encodable<__E> for StableCrateId[src]

impl Eq for StableCrateId[src]

impl Hash for StableCrateId[src]

impl Ord for StableCrateId[src]

impl PartialEq<StableCrateId> for StableCrateId[src]

impl PartialOrd<StableCrateId> for StableCrateId[src]

impl StructuralEq for StableCrateId[src]

impl StructuralPartialEq for StableCrateId[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Erased for T[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,