Encoder is implemented by types that require custom encoding rules or want to encode private fields.
| 35 | // Encoder is implemented by types that require custom |
| 36 | // encoding rules or want to encode private fields. |
| 37 | type Encoder interface { |
| 38 | // EncodeRLP should write the RLP encoding of its receiver to w. |
| 39 | // If the implementation is a pointer method, it may also be |
| 40 | // called for nil pointers. |
| 41 | // |
| 42 | // Implementations should generate valid RLP. The data written is |
| 43 | // not verified at the moment, but a future version might. It is |
| 44 | // recommended to write only a single value but writing multiple |
| 45 | // values or no value at all is also permitted. |
| 46 | EncodeRLP(io.Writer) error |
| 47 | } |
| 48 | |
| 49 | // Encode writes the RLP encoding of val to w. Note that Encode may |
| 50 | // perform many small writes in some cases. Consider making w |
no outgoing calls
no test coverage detected