any

io.github.iltotore.iron.constraint.any$
object any

Constraints working for any type (e.g any.StrictEqual) and constraint operators (e.g any.Not...).

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
any.type

Members list

Concise view

Type members

Classlikes

final class DescribedAs[C, V <: String]

A constraint decorator with a custom description.

A constraint decorator with a custom description.

Attributes

C

the decorated constraint.

V

the description to attach.

Example:
//Literal
type PosInt = Greater[0] DescribedAs "Should be positive"
//Using type-level String concatenation (example taken from `numeric`)
import io.github.iltotore.iron.ops.*
type GreaterEqual[V] = (Greater[V] || StrictEqual[V]) DescribedAs ("Should be greater than or equal to " + V)
Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
final class False

An always-invalid constraint.

An always-invalid constraint.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
object False

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
False.type
final class Not[C]

A constraint decorator acting like a boolean "not".

A constraint decorator acting like a boolean "not".

Attributes

C

the decorated constraint.

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
object Not

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Not.type
final class StrictEqual[V]

Tests strict equality with the given value.

Tests strict equality with the given value.

Attributes

V

the value the input must be equal to.

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
final class True

An always-valid constraint.

An always-valid constraint.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
object True

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
True.type
final class Xor[C1, C2]

A constraint operator acting like a boolean "xor".

A constraint operator acting like a boolean "xor".

Attributes

C1

the left constraint.

C2

the right constraint.

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
object Xor

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Xor.type

Types

type ![C] = C match { case Boolean => ![C] case Any => Not[C] }

Alias for Not.

Alias for Not.

Attributes

type In[V <: NonEmptyTuple] = V match { case h *: EmptyTuple => StrictEqual[h] case h *: t => StrictEqual[h] | In[t] }

Tests strict equality with any one of the given values.

Tests strict equality with any one of the given values.

Attributes

V

the values the input must be in.

Example:
type Digit = In[(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)]
type Pure = True

Alias for True. Usually used for new types with no constraint.

Alias for True. Usually used for new types with no constraint.

Attributes

See also:

"Creating new types" reference.