logo
pub trait Arity: Copy {
    fn into_interval(self) -> (usize, Option<usize>);
}
Expand description

Arity of primitives and polygonal meshes.

The arity of a primitive topological structure (e.g., an edge, trigon, pentagon, etc.) is the number of edges that comprise the structure. For compound structures like polygonal meshes, arity describes the individual polygons that form the structure and may not be representable as a singular value.

Arity is most generally described as an open interval with a minimum and optional maximum inclusive range. This trait provides a conversion into this general form for all types that represent arity. See the implementations of this trait for more information.

Types with arity implement the StaticArity and DynamicArity traits, which describe their type-level and value-level arity, respectively.

Required Methods

Implementations on Foreign Types

Singular arity.

Closed interval arity.

This type represents a closed interval arity with a minimum and maximum inclusive range.

Open interval arity.

This type represents an open interval arity with a minimum and optional maximum inclusive range. When there is no maximum (None), the maximum arity is unspecified. This typically means that there is no theoretical maximum.

Implementors