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