Extension is the interface fulfilled by types that want to define their own binary encoding.
| 78 | // by types that want to define their |
| 79 | // own binary encoding. |
| 80 | type Extension interface { |
| 81 | // ExtensionType should return |
| 82 | // a int8 that identifies the concrete |
| 83 | // type of the extension. (Types <0 are |
| 84 | // officially reserved by the MessagePack |
| 85 | // specifications.) |
| 86 | ExtensionType() int8 |
| 87 | |
| 88 | // Len should return the length |
| 89 | // of the data to be encoded |
| 90 | Len() int |
| 91 | |
| 92 | // MarshalBinaryTo should copy |
| 93 | // the data into the supplied slice, |
| 94 | // assuming that the slice has length Len() |
| 95 | MarshalBinaryTo([]byte) error |
| 96 | |
| 97 | UnmarshalBinary([]byte) error |
| 98 | } |
| 99 | |
| 100 | // RawExtension implements the Extension interface |
| 101 | type RawExtension struct { |
no outgoing calls
no test coverage detected
searching dependent graphs…