kubernetes/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/custom.go

// Returns a non-nil error if and only if the argument's type (or one of its component types, for
// composite types) implements json.Marshaler or encoding.TextMarshaler without also implementing
// cbor.Marshaler and likewise for the respective Unmarshaler interfaces.
//
// This is a temporary, graduation-blocking restriction and will be removed in favor of automatic
// transcoding between CBOR and JSON/text for these types. This restriction allows CBOR to be
// exercised for in-tree and unstructured types while mitigating the risk of mangling out-of-tree
// types in client programs.
func RejectCustomMarshalers(v interface{}

var errMaxDepthExceeded

const maxDepth

var marshalerCache

var unmarshalerCache

type checker

var noop

type checkers

func (cache *checkers) getChecker(rt reflect.Type) checker {}

type path

func (p path) cyclic(rt reflect.Type) bool {}

func (cache *checkers) getCheckerInternal(rt reflect.Type, parent *path) (c checker) {}

func checkUnstructuredValue(cache *checkers, v interface{}