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