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

Interface Sizer

msgp/write.go:28–30  ·  view source on GitHub ↗

Sizer is an interface implemented by types that can estimate their size when MessagePack encoded. This interface is optional, but encoding/marshaling implementations may use this as a way to pre-allocate memory for serialization.

Source from the content-addressed store, hash-verified

26// may use this as a way to pre-allocate
27// memory for serialization.
28type Sizer interface {
29 Msgsize() int
30}
31
32var (
33 // Nowhere is an io.Writer to nowhere

Callers 6

BenchmarkWriteReadFileFunction · 0.65
WriteFileFunction · 0.65
GuessSizeFunction · 0.65
TestTextMarshalerSizeFunction · 0.65
TestStructSizeEstimationFunction · 0.65

Implementers 5

Numbermsgp/number.go
RegexIGNORETest_generated/def.go
RegexIGNSIZETest_generated/def.go
OmitZeroExt_generated/omitzero_ext.go
OmitZeroExtPtr_generated/omitzero_ext.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…