PositiveNumberCompanionVersionSpecific

zio.blocks.schema.json.PositiveNumberCompanionVersionSpecific

Attributes

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

Members list

Value members

Concrete methods

inline def literal(inline n: Int): PositiveNumber

Creates a PositiveNumber 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 PositiveNumber 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.PositiveNumber

val mult: PositiveNumber = PositiveNumber.literal(5) // compiles
// PositiveNumber.literal(0)                         // does not compile

Attributes

Source
PositiveNumberCompanionVersionSpecific.scala