HasBinding
Reads and replaces the Binding inside a Reflect node's metadata F[T, A]. The Reflect methods that need a binding, such as Reflect.Record#constructor and Reflect#fromDynamicValue, take one implicitly. The library provides instances for Binding itself (Binding.bindingHasBinding) and for BindingInstance, which pairs a binding with a derived type class instance.
A HasBinding is also a zio.blocks.schema.ReflectTransformer that turns every node's metadata into its Binding.
The typed accessors (record, constructor, seq and the others) check the binding's kind at run time and throw a RuntimeException naming the expected kind when it does not match.
Type parameters
- F
-
the metadata type of the nodes
Attributes
- Source
- HasBinding.scala
- Graph
-
- Supertypes
Members list
Value members
Abstract methods
Returns the binding inside fa.
Returns fa with its binding replaced by the result of f. The library's instances call f at once.
Returns fa with its binding replaced by the result of f. The library's instances call f at once.
Attributes
- Source
- HasBinding.scala
Concrete methods
Returns the constructor of the record binding of fa; throws like record when it is not a Binding.Record.
Returns the constructor of the record binding of fa; throws like record when it is not a Binding.Record.
Attributes
- Source
- HasBinding.scala
Returns the deconstructor of the record binding of fa; throws like record when it is not a Binding.Record.
Returns the deconstructor of the record binding of fa; throws like record when it is not a Binding.Record.
Attributes
- Source
- HasBinding.scala
Returns the discriminator of the variant binding of fa; throws like variant when it is not a Binding.Variant.
Returns the discriminator of the variant binding of fa; throws like variant when it is not a Binding.Variant.
Attributes
- Source
- HasBinding.scala
Returns the binding of fa, which must be a Binding.Dynamic; throws a RuntimeException (Expected Binding.Dynamic) when it is another kind.
Returns the binding of fa, which must be a Binding.Dynamic; throws a RuntimeException (Expected Binding.Dynamic) when it is another kind.
Attributes
- Source
- HasBinding.scala
Returns the binding of fa, which must be a Binding.Map; throws a RuntimeException (Expected Binding.Map) when it is another kind.
Returns the binding of fa, which must be a Binding.Map; throws a RuntimeException (Expected Binding.Map) when it is another kind.
Attributes
- Source
- HasBinding.scala
Returns the constructor of the map binding of fa; throws like map when it is not a Binding.Map.
Returns the constructor of the map binding of fa; throws like map when it is not a Binding.Map.
Attributes
- Source
- HasBinding.scala
Returns the deconstructor of the map binding of fa; throws like map when it is not a Binding.Map.
Returns the deconstructor of the map binding of fa; throws like map when it is not a Binding.Map.
Attributes
- Source
- HasBinding.scala
Returns the matchers of the variant binding of fa; throws like variant when it is not a Binding.Variant.
Returns the matchers of the variant binding of fa; throws like variant when it is not a Binding.Variant.
Attributes
- Source
- HasBinding.scala
Returns the binding of fa, which must be a Binding.Primitive; throws a RuntimeException (Expected Binding.Primitive) when it is another kind.
Returns the binding of fa, which must be a Binding.Primitive; throws a RuntimeException (Expected Binding.Primitive) when it is another kind.
Attributes
- Source
- HasBinding.scala
Returns the binding of fa, which must be a Binding.Record; throws a RuntimeException (Expected Binding.Record) when it is another kind.
Returns the binding of fa, which must be a Binding.Record; throws a RuntimeException (Expected Binding.Record) when it is another kind.
Attributes
- Source
- HasBinding.scala
Returns the binding of fa, which must be a Binding.Seq; throws a RuntimeException (Expected Binding.Seq) when it is another kind.
Returns the binding of fa, which must be a Binding.Seq; throws a RuntimeException (Expected Binding.Seq) when it is another kind.
Attributes
- Source
- HasBinding.scala
Returns the constructor of the sequence binding of fa; throws like seq when it is not a Binding.Seq.
Returns the constructor of the sequence binding of fa; throws like seq when it is not a Binding.Seq.
Attributes
- Source
- HasBinding.scala
Returns the deconstructor of the sequence binding of fa; throws like seq when it is not a Binding.Seq.
Returns the deconstructor of the sequence binding of fa; throws like seq when it is not a Binding.Seq.
Attributes
- Source
- HasBinding.scala
Returns what a node holds in the result, given what it held in the source reflect.
Returns what a node holds in the result, given what it held in the source reflect.
Attributes
- Definition Classes
- Source
- HasBinding.scala
Returns fa with the constructor of its record binding replaced by the result of f. It calls updateBinding with a function that throws a RuntimeException (Expected Binding.Record) when the binding is another kind; with the library's instances that function runs during this call.
Returns fa with the constructor of its record binding replaced by the result of f. It calls updateBinding with a function that throws a RuntimeException (Expected Binding.Record) when the binding is another kind; with the library's instances that function runs during this call.
Attributes
- Source
- HasBinding.scala
Returns fa with the deconstructor of its record binding replaced by the result of f. It calls updateBinding with a function that throws a RuntimeException (Expected Binding.Record) when the binding is another kind; with the library's instances that function runs during this call.
Returns fa with the deconstructor of its record binding replaced by the result of f. It calls updateBinding with a function that throws a RuntimeException (Expected Binding.Record) when the binding is another kind; with the library's instances that function runs during this call.
Attributes
- Source
- HasBinding.scala
Returns fa with the discriminator of its variant binding replaced by the result of f. It calls updateBinding with a function that throws a RuntimeException (Expected Binding.Variant) when the binding is another kind; with the library's instances that function runs during this call.
Returns fa with the discriminator of its variant binding replaced by the result of f. It calls updateBinding with a function that throws a RuntimeException (Expected Binding.Variant) when the binding is another kind; with the library's instances that function runs during this call.
Attributes
- Source
- HasBinding.scala
Returns fa with its map binding replaced by the result of f. It calls updateBinding with a function that throws a RuntimeException (Expected Binding.Map) when the binding is another kind; with the library's instances that function runs during this call.
Returns fa with its map binding replaced by the result of f. It calls updateBinding with a function that throws a RuntimeException (Expected Binding.Map) when the binding is another kind; with the library's instances that function runs during this call.
Attributes
- Source
- HasBinding.scala
Returns fa with the matchers of its variant binding replaced by the result of f. It calls updateBinding with a function that throws a RuntimeException (Expected Binding.Variant) when the binding is another kind; with the library's instances that function runs during this call.
Returns fa with the matchers of its variant binding replaced by the result of f. It calls updateBinding with a function that throws a RuntimeException (Expected Binding.Variant) when the binding is another kind; with the library's instances that function runs during this call.
Attributes
- Source
- HasBinding.scala
Returns fa with its primitive binding replaced by the result of f. It calls updateBinding with a function that throws a RuntimeException (Expected Binding.Primitive) when the binding is another kind; with the library's instances that function runs during this call.
Returns fa with its primitive binding replaced by the result of f. It calls updateBinding with a function that throws a RuntimeException (Expected Binding.Primitive) when the binding is another kind; with the library's instances that function runs during this call.
Attributes
- Source
- HasBinding.scala
Returns fa with its sequence binding replaced by the result of f. It calls updateBinding with a function that throws a RuntimeException (Expected Binding.Seq) when the binding is another kind; with the library's instances that function runs during this call.
Returns fa with its sequence binding replaced by the result of f. It calls updateBinding with a function that throws a RuntimeException (Expected Binding.Seq) when the binding is another kind; with the library's instances that function runs during this call.
Attributes
- Source
- HasBinding.scala
Returns the binding of fa, which must be a Binding.Variant; throws a RuntimeException (Expected Binding.Variant) when it is another kind.
Returns the binding of fa, which must be a Binding.Variant; throws a RuntimeException (Expected Binding.Variant) when it is another kind.
Attributes
- Source
- HasBinding.scala
Returns the binding of fa, which must be a Binding.Wrapper; throws a RuntimeException (Expected Binding.Wrapper) when it is another kind.
Returns the binding of fa, which must be a Binding.Wrapper; throws a RuntimeException (Expected Binding.Wrapper) when it is another kind.
Attributes
- Source
- HasBinding.scala
Inherited methods
Rebuilds the dynamic node with transformMetadata(metadata).
Rebuilds the dynamic node with transformMetadata(metadata).
Attributes
- Inherited from:
- OnlyMetadata
- Source
- ReflectTransformer.scala
Rebuilds the map node with transformMetadata(metadata).
Rebuilds the map node with transformMetadata(metadata).
Attributes
- Inherited from:
- OnlyMetadata
- Source
- ReflectTransformer.scala
Rebuilds the primitive node with transformMetadata(metadata).
Rebuilds the primitive node with transformMetadata(metadata).
Attributes
- Inherited from:
- OnlyMetadata
- Source
- ReflectTransformer.scala
Rebuilds the record node with transformMetadata(metadata).
Rebuilds the record node with transformMetadata(metadata).
Attributes
- Inherited from:
- OnlyMetadata
- Source
- ReflectTransformer.scala
Rebuilds the sequence node with transformMetadata(metadata).
Rebuilds the sequence node with transformMetadata(metadata).
Attributes
- Inherited from:
- OnlyMetadata
- Source
- ReflectTransformer.scala
Rebuilds the variant node with transformMetadata(metadata).
Rebuilds the variant node with transformMetadata(metadata).
Attributes
- Inherited from:
- OnlyMetadata
- Source
- ReflectTransformer.scala
Rebuilds the wrapper node with transformMetadata(metadata).
Rebuilds the wrapper node with transformMetadata(metadata).
Attributes
- Inherited from:
- OnlyMetadata
- Source
- ReflectTransformer.scala