Remove FieldsUnmarshaler and FieldsMarshaler

This commit is contained in:
Tnze
2023-04-27 01:27:41 +08:00
parent 078aaba156
commit e435ab18f7
4 changed files with 51 additions and 64 deletions

View File

@ -10,16 +10,3 @@ type Marshaler interface {
TagType() byte
MarshalNBT(w io.Writer) error
}
// FieldsUnmarshaler is a type can hold many Tags just like a TagCompound.
//
// If and only if a type which implements this interface is used as an anonymous field of a struct,
// and didn't set a struct tag, the content it holds will be considered as in the outer struct.
type FieldsUnmarshaler interface {
UnmarshalField(tagType byte, tagName string, r DecoderReader) (ok bool, err error)
}
// FieldsMarshaler is similar to FieldsUnmarshaler, but for marshaling.
type FieldsMarshaler interface {
MarshalFields(w io.Writer) (ok bool, err error)
}