MapDeconstructor

zio.blocks.schema.binding.MapDeconstructor
See theMapDeconstructor companion object
trait MapDeconstructor[M[_, _]]

Reads a map of type M[K, V] back as its entries: the deconstruction half of a Binding.Map.

Type parameters

M

the map type constructor

Attributes

Companion
object
Source
MapDeconstructor.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Type members

Types

type KeyValue[_, _]

The type of one entry; (K, V) for chunkMap and map.

The type of one entry; (K, V) for chunkMap and map.

Attributes

Source
MapDeconstructor.scala

Value members

Abstract methods

def deconstruct[K, V](m: M[K, V]): Iterator[KeyValue[K, V]]

Returns an iterator over the entries of m, in the map's iteration order.

Returns an iterator over the entries of m, in the map's iteration order.

Attributes

Source
MapDeconstructor.scala
def get[K, V](m: M[K, V], k: K): Option[V]

Returns the value bound to k in m, or None when there is none.

Returns the value bound to k in m, or None when there is none.

Attributes

Source
MapDeconstructor.scala
def getKey[K, V](kv: KeyValue[K, V]): K

Returns the key of the entry kv.

Returns the key of the entry kv.

Attributes

Source
MapDeconstructor.scala
def getKeyValue[K, V](kv: KeyValue[K, V]): (K, V)

Returns the entry kv as a pair.

Returns the entry kv as a pair.

Attributes

Source
MapDeconstructor.scala
def getValue[K, V](kv: KeyValue[K, V]): V

Returns the value of the entry kv.

Returns the value of the entry kv.

Attributes

Source
MapDeconstructor.scala
def size[K, V](m: M[K, V]): Int

Returns the number of entries in m.

Returns the number of entries in m.

Attributes

Source
MapDeconstructor.scala