ConstraintValueModule
PackageReified.Constraint
Builds and renders portable constraint values.
Summary
| Name | Signature | Synopsis |
|---|---|---|
| Union cases | ||
| IsText | this.IsText | No description available. |
| IsTimeSpan | this.IsTimeSpan | No description available. |
| IsNull | this.IsNull | No description available. |
| IsInteger | this.IsInteger | No description available. |
| IsBoolean | this.IsBoolean | No description available. |
| IsDecimal | this.IsDecimal | No description available. |
| IsBigInteger | this.IsBigInteger | No description available. |
| IsDateTimeOffset | this.IsDateTimeOffset | No description available. |
| IsChar | this.IsChar | No description available. |
| IsList | this.IsList | No description available. |
| IsFloat32 | this.IsFloat32 | No description available. |
| IsFloat | this.IsFloat | No description available. |
| IsGuid | this.IsGuid | No description available. |
| IsDateTime | this.IsDateTime | No description available. |
| Text | Text string | Text. |
| Char | Char char | A single character. |
| Integer | Integer int64 | An integral value that fits a signed 64-bit integer. |
| BigInteger | BigInteger bigint | An arbitrary-width integer. |
| Decimal | Decimal decimal | An exact base-10 value. |
| Float | Float PortableFloat | An IEEE double, retained without passing through decimal. |
| Float32 | Float32 PortableFloat32 | An IEEE single, retained without passing through decimal. |
| Boolean | Boolean bool | A Boolean. |
| Guid | Guid Guid | A globally unique identifier, kept distinct from its textual spelling. |
| DateTime | DateTime DateTime | A date and time without an offset. |
| DateTimeOffset | DateTimeOffset DateTimeOffset | A date and time with an offset from UTC. |
| TimeSpan | TimeSpan TimeSpan | A duration. |
| Null | Null | An absent reference. |
| List | List ConstraintValue list | An ordered collection of portable values. |
| Operations | ||
| ofFloat | ConstraintValue.ofFloat value | Wraps an IEEE double. |
| ofFloat32 | ConstraintValue.ofFloat32 value | Wraps an IEEE single. |
| tryCreate | ConstraintValue.tryCreate value | Projects a runtime value to its portable representation, or None when the type is outside the closed set. |
| ofOperand | ConstraintValue.ofOperand value | Projects an operand to its portable representation, resolving ambiguous types at the call site. |
| render | ConstraintValue.render value | Renders a portable value for a default English message. |
Union cases
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
kind:member
Operations
kind:member
kind:member
kind:member
Projects a runtime value to its portable representation, or
None when the type is outside the closed
set. This never throws, including for NaN, infinities, and values no numeric case can hold.
Parameters
| Name | Type | Description |
|---|---|---|
| value | 'value |
Returns
ConstraintValue option
Verification Examples
ConstraintValue.tryCreate 3 = Some (ConstraintValue.Integer 3L)kind:member
Projects an operand to its portable representation, resolving ambiguous types at the call site.
Parameters
| Name | Type | Description |
|---|---|---|
| value | 'value |
Returns
ConstraintValue option
Verification Examples
let instant = System.DateTimeOffset.UtcNow in ConstraintValue.ofOperand instant // Some (ConstraintValue.DateTimeOffset instant)