// EqualClass returns true if err is *Error with the same class.
7789
func (ec ErrClass) EqualClass(err error) bool {
	e := errors.Cause(err)
	if e == nil {
		return false
	}
	if te, ok := e.(*Error); ok {
		return te.class == ec
	}
	return false
}
1163065
func (o *AnchoringOption) Equal(o2 *AnchoringOption) bool {
	if o2 == nil {
		return o.value == ""
	}
	return o.value == o2.value
}
435426
func (v *Xception2) Equals(rhs *Xception2) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_I32_EqualsPtr(v.ErrorCode, rhs.ErrorCode) {
		return false
	}
	if !((v.StructThing == nil && rhs.StructThing == nil) || (v.StructThing != nil && rhs.StructThing != nil && v.StructThing.Equals(rhs.StructThing))) {
		return false
	}

	return true
}
1230333
func (e *Errors) Has(class string) bool {
	for _, err := range *e {
		if err.Kind() == class {
			return true
		}
	}
	return false
}
818782
func (e *ErrorClass) Is(parent *ErrorClass) bool {
	for check := e; check != nil; check = check.parent {
		if check == parent {
			return true
		}
	}
	return false
}
61100
func (self FloatEqualer) Equal(e Equaler) bool {
	return self.F == e.(FloatEqualer).F
}
1321475
func (o *SumOrFiltersScoresOption) Equal(o2 *SumOrFiltersScoresOption) bool {
	if o2 == nil {
		return o.value == false
	}
	return o.value == o2.value
}
896971
func (o *ValidUntilOption) Equal(o2 *ValidUntilOption) bool {
	if o2 == nil {
		return o.value.IsZero()
	}
	return o.value.Equal(o2.value)
}
1204935
func Equal(err1 error, err2 error) bool {
	if err1 == err2 {
		return true
	}

	if v, ok := err1.(*error2); ok {
		return Equal(v.Inner, err2)
	}

	if v, ok := err2.(*error2); ok {
		return Equal(v.Inner, err1)
	}

	return false
}
103633
func NewClass(name string, options ...ErrorOption) *ErrorClass {
	return HierarchicalError.NewClass(name, options...)
}
1148363
func (e *Error) Equal(ie interface{}) bool {
	if ie == nil || e == nil || e.err == nil {
		return false
	}
	switch val := ie.(type) {
	case *Error:
		if val == nil {
			return false
		}
		if val.err == nil {
			return false
		}
		return e.err.Error() == val.String()
	case error:
		if val == nil {
			return false
		}
		return e.err.Error() == val.Error()
	case string:
		return e.err.Error() == val
	default:
		panic("invalid type")
	}
}
650812
func (r *Request) Class() string {
	if r.Req == nil {
		return ""
	}
	if len(r.Req.Question) == 0 {
		return ""
	}

	return dns.Class(r.Req.Question[0].Qclass).String()

}
457292
func (o *ClearExistingRulesOption) Equal(o2 *ClearExistingRulesOption) bool {
	if o2 == nil {
		return o.value == false
	}
	return o.value == o2.value
}
76426
func (a *Assertions) EqualErrorf(theError error, errString string, msg string, args ...interface{}) {
	if h, ok := a.t.(tHelper); ok {
		h.Helper()
	}
	EqualErrorf(a.t, theError, errString, msg, args...)
}
570732
func SafeEqual(o1, o2 *SafeOption) bool {
	if o1 != nil {
		return o1.Equal(o2)
	}
	if o2 != nil {
		return o2.Equal(o1)
	}
	return true
}
1274687
func (o *PercentileComputationOption) Equal(o2 *PercentileComputationOption) bool {
	if o2 == nil {
		return o.value == true
	}
	return o.value == o2.value
}
466954
func (self IntEqualer) Equal(e Equaler) bool {
	return self.I == e.(IntEqualer).I
}