Skip to main content

FieldAlg

Trait FieldAlg 

Source
pub trait FieldAlg: Sorts {
    // Required methods
    fn field(&self, words: Words<'_>, shape: Self::Ty) -> Self::Field;
    fn merge(&self, shape: Self::Ty) -> Self::Field;
}
Expand description

The member sort: the ways one member of a product arises.

Required Methods§

Source

fn field(&self, words: Words<'_>, shape: Self::Ty) -> Self::Field

A member under the name it is written with.

Source

fn merge(&self, shape: Self::Ty) -> Self::Field

Another product’s members, observed as this product’s own.

Not a member, but two products seen as one. Taking a shape and answering with a member is what makes merging a non-product inexpressible.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§