core::marker

Trait ConstParamTy_

source
pub trait ConstParamTy_:
    UnsizedConstParamTy
    + StructuralPartialEq
    + Eq { }
๐Ÿ”ฌThis is a nightly-only experimental API. (unsized_const_params #95174)
Expand description

A marker for types which can be used as types of const generic parameters.

These types must have a proper equivalence relation (Eq) and it must be automatically derived (StructuralPartialEq). Thereโ€™s a hard-coded check in the compiler ensuring that all fields are also ConstParamTy, which implies that recursively, all fields are StructuralPartialEq.

Object Safetyยง

This trait is not object safe.

Implementorsยง