TypeData

Trait TypeData 

Source
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§

Required Methods§

Source

fn first_available(forall: &Generics<Self>) -> Self::Generic

Generate the next unused generic. Used when lifting infered types into top-level declerations

Provided Methods§

Source

fn fmt_specific( constr: &Self::Concrete, t: &Type<Self>, f: &mut Formatter<'_>, ) -> Result

Gets instantiated during formatting so that fancy containers like tuples can be pretty printed

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.

Implementors§