Trait rustc_data_structures::unify::UnifyKey
[−]
[src]
pub trait UnifyKey: Copy + Clone + Debug + PartialEq { type Value: Clone + PartialEq + Debug; fn index(&self) -> u32; fn from_index(u: u32) -> Self; fn tag(k: Option<Self>) -> &'static str; }
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
This trait is implemented by any type that can serve as a type
variable. We call such variables unification keys. For example,
this trait is implemented by IntVid
, which represents integral
variables.
Each key type has an associated value type V
. For example, for
IntVid
, this is Option<IntVarValue>
, representing some
(possibly not yet known) sort of integer.
Clients are expected to provide implementations of this trait; you
can see some examples in the test
module.
Associated Types
type Value: Clone + PartialEq + Debug
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Required Methods
fn index(&self) -> u32
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn from_index(u: u32) -> Self
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn tag(k: Option<Self>) -> &'static str
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?