Documentation
¶
Index ¶
- Variables
- type DTS
- func (d DTS[T]) DTM() com.DTM
- func (d DTS[T]) Marshal(t T, bs []byte) (n int)
- func (d DTS[T]) Size(t T) (size int)
- func (d DTS[T]) Skip(bs []byte) (n int, err error)
- func (d DTS[T]) SkipData(bs []byte) (n int, err error)
- func (d DTS[T]) Unmarshal(bs []byte) (t T, n int, err error)
- func (d DTS[T]) UnmarshalData(bs []byte) (t T, n int, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var DTMSer = dtmSer{}
View Source
var ErrWrongDTM = errors.New("wrong data type metadata")
ErrWrongDTM happens when DTS tries to unmarshal data with wrong DTM.
Functions ¶
This section is empty.
Types ¶
type DTS ¶
type DTS[T any] struct { // contains filtered or unexported fields }
DTM implements the mus.Serializer interface and provides DTM support for the mus-go serializer. It helps to serializer DTM + data.
func (DTS[T]) Skip ¶
Skip skips DTM + data.
Returns ErrWrongDTM if the unmarshalled DTM differs from the d.DTM().
Click to show internal directories.
Click to hide internal directories.