func (t *TxStructure) HSet(key []byte, field []byte, value []byte) error {
	if t.readWriter == nil {
		return errWriteOnSnapshot
	}
	return t.updateHash(key, field, func([]byte) ([]byte, error) {
		return value, nil
	})
}
HSet sets the string value of a hash field.
package structure
import (
	"bytes"
	"context"
	"encoding/binary"
	"strconv"
	"github.com/pingcap/errors"
	"github.com/pingcap/tidb/kv"
)
type HashPair struct {
	Field []byte
	Value []byte
}
type hashMeta struct {
	FieldCount int64
}
func (meta hashMeta) Value() []byte {
	buf := make([]byte, 8)
	binary.BigEndian.PutUint64(buf[0:8], uint64(meta.FieldCount))
	return buf
}
func (meta hashMeta) IsEmpty() bool {
	return meta.FieldCount <= 0
}