pub unsafe trait ConstIdentify {
    const CONST_ID: ConstId;
}
Expand description

This trait is used as to mark structs with an id available in const contexts.

Safety

This trait should only be implemented by using the #[derive] macro because it requires that a unique ID is assigned to every struct.

If you do implement this by hand, you must ensure that every impl does not have any overlapping ids.This is done in the macro by using ConstId::generate(concat!(module_path!(), "::", stringify!(StructName)))

Required Associated Constants§

Object Safety§

This trait is not object safe.

Implementors§