An abstraction that codifies the notion of writing a piece of data into an output, provided some contextual information.
This has two input channels:
- one for contextual information (In)
- one for the actual data (A)
This is particularly useful for http requests/responses, where different subsets of data have a different impact on different locations of the http message : some fields may impact headers, some fields may impact the http body, other things that are driven from static information (smithy traits) may lead to a transformation of the message. In this situation, the Input and Output channels are of the same type.
Having the ability to decompose the notion of encoding a piece of data into different writers that can be composed together is powerful and helps centralising some complexity in third-party agnostic code.
Type parameters
- A:
-
the type of data that is being written into the output channel
- In
-
: some input channel used as context to write data. When set to Any, the implication is that the data produces some output on its own
- Out:
-
the output channel in which the data is written.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-