Module properties

Module properties 

Source
Expand description

Definitions of “properties” that are used by implementations of certain assertions.

A property can be some kind of information about a type’s value or a certain behavior of the type. A property is defined by a trait. Each trait defines one property. Assertions around a specific property can be implemented once for all types that implement the related property trait.

Property traits that define access to a specific kind of information of a type’s value define an accessor method to query this information.

For example, the trait LengthProperty defines that all implementing types have a length. The trait defines the accessor method length_property to query the length of a value of this type. For all types that implement the LengthProperty trait, the assertions around a type’s length defined by AssertHasLength trait can be used.

Property traits that define a certain behavior of a type are often marker traits.

An example for a behavior property is the DefinedOrderProperty trait. It specifies that a collection’s iterator yields the items in a well-defined order.

Traits§

AdditiveIdentityProperty
The additive identity property of a numeric type.
CharCountProperty
Property for types that contain characters.
DecimalProperties
Properties of a decimal number.
DefinedOrderProperty
Marker trait to specify whether a collection or iterator iterates over its elements in a well-defined order.
InfinityProperty
A property of floating point numbers that may have infinite or finite values.
IsEmptyProperty
The “empty” property of a collection-like type.
IsNanProperty
The not-a-number property of floating point numbers.
LengthProperty
The length property of a collection-like type.
MapProperties
The properties of a map-like type.
MultiplicativeIdentityProperty
The multiplicative identity property of a numeric type.
SignumProperty
A property of numeric types that can have negative and positive values.