[][src]Trait wasmer_types::entity::__core::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 ExportIndex[src]

impl StructuralPartialEq for ExternType[src]

impl StructuralPartialEq for ImportIndex[src]

impl StructuralPartialEq for Mutability[src]

impl StructuralPartialEq for Type[src]

impl StructuralPartialEq for Bytes[src]

impl StructuralPartialEq for CustomSectionIndex[src]

impl StructuralPartialEq for DataIndex[src]

impl StructuralPartialEq for ElemIndex[src]

impl StructuralPartialEq for Features[src]

impl StructuralPartialEq for FunctionIndex[src]

impl StructuralPartialEq for FunctionType[src]

impl StructuralPartialEq for GlobalIndex[src]

impl StructuralPartialEq for GlobalType[src]

impl StructuralPartialEq for LocalFunctionIndex[src]

impl StructuralPartialEq for LocalGlobalIndex[src]

impl StructuralPartialEq for LocalMemoryIndex[src]

impl StructuralPartialEq for LocalTableIndex[src]

impl StructuralPartialEq for MemoryIndex[src]

impl StructuralPartialEq for MemoryType[src]

impl StructuralPartialEq for Pages[src]

impl StructuralPartialEq for SignatureIndex[src]

impl StructuralPartialEq for TableIndex[src]

impl StructuralPartialEq for TableType[src]

impl StructuralPartialEq for V128[src]

impl<T> StructuralPartialEq for Value<T>[src]

impl<T> StructuralPartialEq for ExportType<T>[src]

impl<T> StructuralPartialEq for ImportType<T>[src]

Loading content...