Skip to main content

Kind

Trait Kind 

Source
pub trait Kind {
    type Id: RefId;

    const NAME: &'static str;

    // Provided method
    fn kind_name() -> KindName { ... }
}
Expand description

A kind of thing a reference names: user, doc, file, … — a format declares its own with kind!, each with the type of its ids.

Required Associated Constants§

Source

const NAME: &'static str

As written: lower case letters, digits and _ (kind! checks it when it compiles).

Required Associated Types§

Source

type Id: RefId

Its ids.

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§