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§

Source§

impl Kind for Advancement

Source§

const NAME: &'static str = kind::ADVANCEMENT

Source§

type Id = String

Source§

impl Kind for Biome

Source§

const NAME: &'static str = kind::BIOME

Source§

type Id = String

Source§

impl Kind for Block

Source§

const NAME: &'static str = kind::BLOCK

Source§

type Id = String

Source§

impl Kind for Category

Source§

const NAME: &'static str = kind::CATEGORY

Source§

type Id = String

Source§

impl Kind for Dimension

Source§

const NAME: &'static str = kind::DIMENSION

Source§

type Id = String

Source§

impl Kind for Entity

Source§

const NAME: &'static str = kind::ENTITY

Source§

type Id = String

Source§

impl Kind for Entry

Source§

const NAME: &'static str = kind::ENTRY

Source§

type Id = String

Source§

impl Kind for Fluid

Source§

const NAME: &'static str = kind::FLUID

Source§

type Id = String

Source§

impl Kind for Image

Source§

const NAME: &'static str = typed::IMAGE

Source§

type Id = String

Source§

impl Kind for Item

Source§

const NAME: &'static str = kind::ITEM

Source§

type Id = String

Source§

impl Kind for Lang

Source§

const NAME: &'static str = typed::LANG

Source§

type Id = String

Source§

impl Kind for Material

Source§

const NAME: &'static str = kind::MATERIAL

Source§

type Id = String

Source§

impl Kind for Recipe

Source§

const NAME: &'static str = kind::RECIPE

Source§

type Id = String

Source§

impl Kind for Res

Source§

const NAME: &'static str = typed::RES

Source§

type Id = String

Source§

impl Kind for Tag

Source§

const NAME: &'static str = typed::TAG

Source§

type Id = String

Source§

impl Kind for Texture

Source§

const NAME: &'static str = kind::TEXTURE

Source§

type Id = String

Source§

impl Kind for Video

Source§

const NAME: &'static str = kind::VIDEO

Source§

type Id = String