// IsAssignable checks if "to" type can be used as "b.Value/ReturnValue".
499319
func (b *BindObject) IsAssignable(to reflect.Type) bool {
	return equalTypes(b.Type, to)
}
1130285
func IsStreamable(p string) (bool, error) {
	proto, err := New(Protocol(p), nil, nil)
	if err != nil {
		return false, err
	}
	return proto.IsStreamable(), nil
}
1065659
func isComparable(t reflect.Type) bool {
	switch t.Kind() {
	case reflect.Array:
		return isComparable(t.Elem())

	case reflect.Struct:
		for i := 0; i < t.NumField(); i++ {
			if !isComparable(t.Field(i).Type) {
				return false
			}
		}

		return true

	case reflect.Slice, reflect.Map, reflect.Func:
		return false
	}

	return true
}
470305
func (p *Plugin) IsEnabled() bool {
	p.mu.RLock()
	defer p.mu.RUnlock()

	return p.PluginObj.Enabled
}
1102448
func isScannable(t reflect.Type) bool {
	if reflect.PtrTo(t).Implements(_unmarshallerInterface) {
		return true
	}
	if t.Kind() != reflect.Struct {
		return true
	}

	// it's not important that we use the right mapper for this particular object,
	// we're only concerned on how many exported fields this struct has
	m := DefaultMapper

	return len(m.TypeMap(t).Index) == 0
}
1053690
func (p Primitive) IsCompatible(val interface{}) bool {
	if p != Boolean && p != Integer && p != Number && p != String && p != DateTime && p != UUID && p != Any {
		panic("unknown primitive type") // bug
	}
	if p == Any {
		return true
	}
	switch val.(type) {
	case bool:
		return p == Boolean
	case int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64:
		return p == Integer || p == Number
	case float32, float64:
		return p == Number
	case string:
		if p == String {
			return true
		}
		if p == DateTime {
			_, err := time.Parse(time.RFC3339, val.(string))
			return err == nil
		}
		if p == UUID {
			_, err := uuid.FromString(val.(string))
			return err == nil
		}
	}
	return false
}
1342907
func (md *RootMetadata) IsReadable() bool {
	return md.TlfID().Type() == tlf.Public || md.data.Dir.IsInitialized()
}
660710
func IsInteroperabilityError(err error) bool {
	if te, ok := err.(tiffErrors); ok {
		_, isInterop := te[loadInteroperability]
		return isInterop
	}
	return false
}
762258
func (m MetricType) isCompatibleInt(val int) bool {
	v := int64(val)
	switch m {
	case Int32Type:
		return v >= math.MinInt32 && v <= math.MaxInt32
	case Int64Type:
		return true
	case Uint32Type:
		return v >= 0 && v <= math.MaxUint32
	case Uint64Type:
		return v >= 0
	}
	return false
}
205622
func (uc Client) IsEnabled(feature string, options ...FeatureOption) (enabled bool) {
	defer func() {
		uc.metrics.count(feature, enabled)
	}()

	f := uc.repository.getToggle(feature)

	var opts featureOption
	for _, o := range options {
		o(&opts)
	}

	if f == nil {
		if opts.fallback != nil {
			return *opts.fallback
		}
		return false
	}

	if !f.Enabled {
		return false
	}

	for _, s := range f.Strategies {
		foundStrategy := uc.getStrategy(s.Name)
		if foundStrategy == nil {
			// TODO: warnOnce missingStrategy
			continue
		}
		if foundStrategy.IsEnabled(s.Parameters, opts.ctx) {
			return true
		}
	}
	return false
}
858651
func isPrintable(name string) bool {
	notASCII := func(r rune) bool {
		return !unicode.IsPrint(r)
	}
	return strings.IndexFunc(name, notASCII) == -1
}
922332
func isReadable(char *gen.CharacteristicMetadata) bool {
	for _, perm := range char.Properties {
		if perm == "read" {
			return true
		}
	}

	return false
}
938805
func IsEnabled(feature string, options ...FeatureOption) bool {
	return defaultClient.IsEnabled(feature, options...)
}
350192
func IsPrintableASCII(s string) bool {
	for _, v := range s {
		if v < ' ' || v > '~' {
			return false
		}
	}
	return true
}
1170225
func (node *ComparisonExpr) IsImpossible() bool {
	var left, right *SQLVal
	var ok bool
	if left, ok = node.Left.(*SQLVal); !ok {
		return false
	}
	if right, ok = node.Right.(*SQLVal); !ok {
		return false
	}
	if node.Operator == NotEqualStr && left.Type == right.Type {
		if len(left.Val) != len(right.Val) {
			return false
		}

		for i := range left.Val {
			if left.Val[i] != right.Val[i] {
				return false
			}
		}
		return true
	}
	return false
}
11284
func isValidResultType(kind reflect.Kind) bool {
	if isNumeric(kind) {
		return true
	}

	switch kind {
	case reflect.String, reflect.Struct, reflect.Array, reflect.Slice,
		reflect.Bool, reflect.Map:

		return true
	}

	return false
}
378118
func IsParameterizableValue(s string) bool {
	return strings.Contains(s, "${") || strings.Contains(s, "$(")
}