MCPcopy Create free account
hub / github.com/apache/fory / WriteData

Method WriteData

go/fory/pointer.go:218–224  ·  view source on GitHub ↗

============================================================================ ptrToInterfaceSerializer - pointer to interface type ============================================================================

(ctx *WriteContext, value reflect.Value)

Source from the content-addressed store, hash-verified

216// ============================================================================
217
218func (s *ptrToInterfaceSerializer) WriteData(ctx *WriteContext, value reflect.Value) {
219 // Get the concrete element that the interface pointer points to
220 elemValue := value.Elem()
221
222 // Use WriteValue to handle the polymorphic interface value with ref tracking and type info
223 ctx.WriteValue(elemValue, RefModeTracking, true)
224}
225
226func (s *ptrToInterfaceSerializer) Write(ctx *WriteContext, refMode RefMode, writeType bool, hasGenerics bool, value reflect.Value) {
227 switch refMode {

Callers 1

WriteMethod · 0.95

Calls 1

WriteValueMethod · 0.80

Tested by

no test coverage detected