MCPcopy
hub / github.com/tinylib/msgp / Extension

Interface Extension

msgp/extension.go:80–98  ·  view source on GitHub ↗

Extension is the interface fulfilled by types that want to define their own binary encoding.

Source from the content-addressed store, hash-verified

78// by types that want to define their
79// own binary encoding.
80type 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
101type RawExtension struct {

Callers 17

WriteExtensionMethod · 0.65
ReadExtensionMethod · 0.65
AppendExtensionFunction · 0.65
ReadExtensionBytesFunction · 0.65
TestCopyNextFunction · 0.65
WriteExtensionMethod · 0.65
AppendExtensionFunction · 0.65
TestWriteInt64Function · 0.65
TestWriteUint64Function · 0.65
TestWriteBytesFunction · 0.65
TestWriteTimeFunction · 0.65
AppendIntfFunction · 0.65

Implementers 2

testExtmsgp/fuzz_test.go
RawExtensionmsgp/extension.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…