Hints

smithy4s.Hints
See theHints companion object
trait Hints

A hint is an arbitrary piece of data that can be added to a schema, at the struct level, or at the field/member level.

You can think of it as an annotation that can communicate additional information to encoders/decoders (for instance, a change in a label, a regex pattern some string should abide by, a range, etc)

This Hints interface is a container for hints.

Under the hood, the hints are composed of two maps : one for member-level hints, one for target-level hints.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def ++(other: Hints): Hints

Concatenates two set of hints. The levels are concatenated independently.

Concatenates two set of hints. The levels are concatenated independently.

Attributes

def addMemberHints(hints: Hints): Hints

Add hints to the member-level.

Add hints to the member-level.

Attributes

def addTargetHints(hints: Hints): Hints

Add hints to the target-level.

Add hints to the target-level.

Attributes

def get[A](implicit key: ShapeTag[A]): Option[A]

Provides an instance of hints containing only the member-level hints.

Provides an instance of hints containing only the member-level hints.

Attributes

Provides an instance of hints containing only the target-level hints.

Provides an instance of hints containing only the target-level hints.

Attributes

Returns a map of hints from both level, the member-level having priority over the target-level one.

Returns a map of hints from both level, the member-level having priority over the target-level one.

Attributes

Concrete methods

final def addMemberHints(hints: Hint*): Hints

Add hints to the member-level.

Add hints to the member-level.

Attributes

def addTargetHints(hints: Hint*): Hints

Add hints to the target-level.

Add hints to the target-level.

Attributes

final def filter(predicate: Hint => Boolean): Hints
final def filterNot(predicate: Hint => Boolean): Hints
final def get[A](key: Has[A]): Option[A]
final def get[T](nt: Newtype[T]): Option[Type]
final def has[A](implicit key: ShapeTag[A]): Boolean