github.com/safing/portbase@v0.19.5/formats/dsd/interfaces.go (about)

     1  package dsd
     2  
     3  // GenCodeCompatible is an interface to identify and use gencode compatible structs.
     4  type GenCodeCompatible interface {
     5  	// GenCodeMarshal gencode marshalls the struct into the given byte array, or a new one if its too small.
     6  	GenCodeMarshal(buf []byte) ([]byte, error)
     7  	// GenCodeUnmarshal gencode unmarshalls the struct and returns the bytes read.
     8  	GenCodeUnmarshal(buf []byte) (uint64, error)
     9  }