kubernetes/vendor/github.com/google/cel-go/common/types/optional.go

var OptionalType

var OptionalNone

// OptionalOf returns an optional value which wraps a concrete CEL value.
func OptionalOf(value ref.Val) *Optional {}

type Optional

// HasValue returns true if the optional has a value.
func (o *Optional) HasValue() bool {}

// GetValue returns the wrapped value contained in the optional.
func (o *Optional) GetValue() ref.Val {}

// ConvertToNative implements the ref.Val interface method.
func (o *Optional) ConvertToNative(typeDesc reflect.Type) (any, error) {}

// ConvertToType implements the ref.Val interface method.
func (o *Optional) ConvertToType(typeVal ref.Type) ref.Val {}

// Equal determines whether the values contained by two optional values are equal.
func (o *Optional) Equal(other ref.Val) ref.Val {}

func (o *Optional) String() string {}

// Type implements the ref.Val interface method.
func (o *Optional) Type() ref.Type {}

// Value returns the underlying 'Value()' of the wrapped value, if present.
func (o *Optional) Value() any {}