Utils
Getter functions
BoundTypes.bound_type
— Functionbound_type(x) -> type
Returns the type of the internal object of x
.
Examples
julia> bound_type(NumberPositive{Float64}(1.0))
Float64
julia> bound_type(NumberLess{NumberGreater{Int64,2},8}(6))
Int64
BoundTypes.bound_value
— Functionbound_value(x) -> value
Getter function for the underlying value from the bound type object x
.
Examples
julia> val = StringFixedLength{String,3}("abc")
"abc"
julia> typeof(val)
StringFixedLength{String, 3}
julia> inner_val = bound_value(val)
"abc"
julia> typeof(inner_val)
String
Errors
BoundTypes.ConstraintError
— TypeConstraintError
Exception thrown when a constraint is violated on bound type creation.
Fields
message::String
: The error message.