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§
- Additive
Identity Property - The additive identity property of a numeric type.
- Char
Count Property - Property for types that contain characters.
- Decimal
Properties - Properties of a decimal number.
- Defined
Order Property - Marker trait to specify whether a collection or iterator iterates over its elements in a well-defined order.
- Infinity
Property - A property of floating point numbers that may have infinite or finite values.
- IsEmpty
Property - The “empty” property of a collection-like type.
- IsNan
Property - The not-a-number property of floating point numbers.
- Length
Property - The length property of a collection-like type.
- MapProperties
- The properties of a map-like type.
- Multiplicative
Identity Property - The multiplicative identity property of a numeric type.
- Signum
Property - A property of numeric types that can have negative and positive values.