pub trait TypeData:
Sized
+ Debug
+ Clone
+ PartialEq {
type Concrete: Key;
type Generic: Key;
type Trait: Key;
type Association: Key;
type Meta: Clone + Debug + Default;
// Required method
fn first_available(forall: &Generics<Self>) -> Self::Generic;
// Provided method
fn fmt_specific(
constr: &Self::Concrete,
t: &Type<Self>,
f: &mut Formatter<'_>,
) -> Result { ... }
}Required Associated Types§
type Concrete: Key
type Generic: Key
type Trait: Key
type Association: Key
type Meta: Clone + Debug + Default
Required Methods§
Sourcefn first_available(forall: &Generics<Self>) -> Self::Generic
fn first_available(forall: &Generics<Self>) -> Self::Generic
Generate the next unused generic. Used when lifting infered types into top-level declerations
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.