NonNegativeInt

zio.blocks.schema.json.NonNegativeInt
See theNonNegativeInt companion class

Attributes

Companion
class
Source
JsonSchema.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply(n: Int): Option[NonNegativeInt]

Creates a NonNegativeInt from a runtime value, returning Option.

Creates a NonNegativeInt from a runtime value, returning Option.

Attributes

Source
JsonSchema.scala
def unsafe(n: Int): NonNegativeInt

Attributes

Source
JsonSchema.scala

Inherited 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

Inherited from:
NonNegativeIntCompanionVersionSpecific
Source
NonNegativeIntCompanionVersionSpecific.scala

Concrete fields

Attributes

Source
JsonSchema.scala

Attributes

Source
JsonSchema.scala