func (nf NatFeatures) Has(feature NatFeatureType) bool {
	_, has := nf[feature]
	return has
}
Has returns true if the given feature is in the set.
package natplugin
type NatFeatureType int
const (
	IN NatFeatureType = iota
	OUT
	OUTPUT_IN
	OUTPUT_OUT
)
func (nft NatFeatureType) String() string {
	switch nft {
	case IN:
		return "IN"
	case OUT:
		return "OUT"
	case OUTPUT_IN:
		return "OUTPUT_IN"
	case OUTPUT_OUT:
		return "OUTPUT_OUT"
	}
	return "INVALID"
}
func (nft NatFeatureType) Opposite() NatFeatureType {
	switch nft {
	case IN:
		return OUTPUT_IN
	case OUT:
		return OUTPUT_OUT
	case OUTPUT_IN:
		return IN
	case OUTPUT_OUT:
		return OUT
	}
	return OUT
}
type NatFeatures map[NatFeatureType]struct{}
func NewNatFeatures(features ...NatFeatureType) NatFeatures {
	nf := make(NatFeatures)
	for _, feature := range features {
		nf.Add(feature)
	}
	return nf
}
func (nf NatFeatures) Add(feature NatFeatureType) bool {
	if !nf.Has(feature) && !nf.Has(feature.Opposite()) {
		nf[feature] = struct{}{}
		return true
	} else {
		return false
	}
}
func (nf NatFeatures) Del(feature NatFeatureType) {
	if nf.Has(feature) {
		delete(nf, feature)
	}
}
func (nf NatFeatures) Copy() NatFeatures {
	nfCopy := NewNatFeatures()
	for feature := range nf {
		nfCopy.Add(feature)
	}
	return nfCopy
}