NonNegativeIntCompanionVersionSpecific

zio.blocks.schema.json.NonNegativeIntCompanionVersionSpecific

Attributes

Source
NonNegativeIntCompanionVersionSpecific.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Concrete methods

inline def literal(inline n: Int): NonNegativeInt

Creates a NonNegativeInt from a literal integer value, validated at compile time. Use this when the value is known at compile time for zero runtime overhead.

Creates a NonNegativeInt from a literal integer value, validated at compile time. Use this when the value is known at compile time for zero runtime overhead.

import zio.blocks.schema.json.NonNegativeInt

val min: NonNegativeInt = NonNegativeInt.literal(3) // compiles
// NonNegativeInt.literal(-1)                       // does not compile

Attributes

Source
NonNegativeIntCompanionVersionSpecific.scala