[][src]Trait tract_nnef::internal::tract_downcast_rs::__std::marker::StructuralPartialEq

#[lang = "structural_peq"]pub trait StructuralPartialEq { }
🔬 This is a nightly-only experimental API. (structural_match)

Required trait for constants used in pattern matches.

Any type that derives PartialEq automatically implements this trait, regardless of whether its type-parameters implement Eq.

If a const item contains some type that does not implement this trait, then that type either (1.) does not implement PartialEq (which means the constant will not provide that comparison method, which code generation assumes is available), or (2.) it implements its own version of PartialEq (which we assume does not conform to a structural-equality comparison).

In either of the two scenarios above, we reject usage of such a constant in a pattern match.

See also the structural match RFC, and issue 63438 which motivated migrating from attribute-based design to this trait.

Implementors

impl StructuralPartialEq for LValue[src]

impl StructuralPartialEq for Literal[src]

impl StructuralPartialEq for RValue[src]

impl StructuralPartialEq for Subscript[src]

impl StructuralPartialEq for TypeName[src]

impl StructuralPartialEq for TypeSpec[src]

impl StructuralPartialEq for Argument[src]

impl StructuralPartialEq for Assignment[src]

impl StructuralPartialEq for Comprehension[src]

impl StructuralPartialEq for Document[src]

impl StructuralPartialEq for FragmentDecl[src]

impl StructuralPartialEq for FragmentDef[src]

impl StructuralPartialEq for GraphDef[src]

impl StructuralPartialEq for IfThenElse[src]

impl StructuralPartialEq for Invocation[src]

impl StructuralPartialEq for Parameter[src]

impl StructuralPartialEq for Result_[src]

Loading content...