Documentation ¶
Index ¶
- func GetElem[U []E, E any](v ArrayValue[U, E]) *E
- func Identity[V any](v V) V
- func MarshalBinary[V any, W Widget[V]](v V, w W) ([]byte, error)
- func MarshalJSON[V any, W Widget[V]](v V, w W) ([]byte, error)
- func UnmarshalBinary[V any, W Widget[V]](v V, w W, b []byte) error
- func UnmarshalJSON[V any, W Widget[V]](v V, w W, b []byte) error
- type Array
- func (a *Array[V, U, E]) CopyTo(dst, src V)
- func (a *Array[V, U, E]) Empty(v V) bool
- func (a *Array[V, U, E]) Equal(x, y V) bool
- func (a *Array[V, U, E]) IsNil(v V) bool
- func (a *Array[V, U, E]) MarshalBinary(e *benc, v V) error
- func (a *Array[V, U, E]) MarshalJSON(e *jenc, v V) error
- func (a *Array[V, U, E]) UnmarshalBinary(d *bdec, v V) error
- func (a *Array[V, U, E]) UnmarshalJSON(d *jdec, v V) error
- type ArrayValue
- type Bool
- func (f Bool[V]) CopyTo(dst, src V)
- func (f Bool[V]) Empty(v V) bool
- func (f Bool[V]) Equal(a, b V) bool
- func (f Bool[V]) IsNil(v V) bool
- func (f Bool[V]) MarshalBinary(e *benc, v V) error
- func (f Bool[V]) MarshalJSON(e *jenc, v V) error
- func (f Bool[V]) UnmarshalBinary(d *bdec, v V) error
- func (f Bool[V]) UnmarshalJSON(d *jdec, v V) error
- type BoolPtr
- func (f BoolPtr[V]) CopyTo(dst, src V)
- func (f BoolPtr[V]) Empty(v V) bool
- func (f BoolPtr[V]) Equal(a, b V) bool
- func (f BoolPtr[V]) IsNil(v V) bool
- func (f BoolPtr[V]) MarshalBinary(e *benc, v V) error
- func (f BoolPtr[V]) MarshalJSON(e *jenc, v V) error
- func (f BoolPtr[V]) UnmarshalBinary(d *bdec, v V) error
- func (f BoolPtr[V]) UnmarshalJSON(d *jdec, v V) error
- type Bytes
- func (f Bytes[V]) CopyTo(dst, src V)
- func (f Bytes[V]) Empty(v V) bool
- func (f Bytes[V]) Equal(a, b V) bool
- func (f Bytes[V]) IsNil(v V) bool
- func (f Bytes[V]) MarshalBinary(e *benc, v V) error
- func (f Bytes[V]) MarshalJSON(e *jenc, v V) error
- func (f Bytes[V]) UnmarshalBinary(d *bdec, v V) error
- func (f Bytes[V]) UnmarshalJSON(d *jdec, v V) error
- type Composite
- func (c *Composite[V, U]) CopyTo(dst, src V)
- func (c *Composite[V, U]) Empty(v V) bool
- func (c *Composite[V, U]) Equal(a, b V) bool
- func (c *Composite[V, U]) IsNil(v V) bool
- func (c *Composite[V, U]) MarshalBinary(e *benc, v V) error
- func (c *Composite[V, U]) MarshalJSON(e *jenc, v V) error
- func (c *Composite[V, U]) UnmarshalBinary(d *bdec, v V) error
- func (c *Composite[V, U]) UnmarshalJSON(d *jdec, v V) error
- type CompositePtr
- func (c *CompositePtr[V, U]) CopyTo(dst, src V)
- func (c *CompositePtr[V, U]) Empty(v V) bool
- func (c *CompositePtr[V, U]) Equal(a, b V) bool
- func (c *CompositePtr[V, U]) IsNil(v V) bool
- func (c *CompositePtr[V, U]) MarshalBinary(e *benc, v V) error
- func (c *CompositePtr[V, U]) MarshalJSON(e *jenc, v V) error
- func (c *CompositePtr[V, U]) UnmarshalBinary(d *bdec, v V) error
- func (c *CompositePtr[V, U]) UnmarshalJSON(d *jdec, v V) error
- type EncodableValue
- type Enum
- func (f Enum[V, E, U]) CopyTo(dst, src V)
- func (f Enum[V, E, U]) Empty(v V) bool
- func (f Enum[V, E, U]) Equal(a, b V) bool
- func (f Enum[V, E, U]) IsNil(v V) bool
- func (f Enum[V, E, U]) MarshalBinary(e *benc, v V) error
- func (f Enum[V, E, U]) MarshalJSON(e *jenc, v V) error
- func (f Enum[V, E, U]) UnmarshalBinary(d *bdec, v V) error
- func (f Enum[V, E, U]) UnmarshalJSON(d *jdec, v V) error
- type EnumPtr
- func (f EnumPtr[V, E, U]) CopyTo(dst, src V)
- func (f EnumPtr[V, E, U]) Empty(v V) bool
- func (f EnumPtr[V, E, U]) Equal(a, b V) bool
- func (f EnumPtr[V, E, U]) IsNil(v V) bool
- func (f EnumPtr[V, E, U]) MarshalBinary(e *benc, v V) error
- func (f EnumPtr[V, E, U]) MarshalJSON(e *jenc, v V) error
- func (f EnumPtr[V, E, U]) UnmarshalBinary(d *bdec, v V) error
- func (f EnumPtr[V, E, U]) UnmarshalJSON(d *jdec, v V) error
- type EnumUnderlying
- type EnumValue
- type Field
- type Fields
- func (c Fields[V]) CopyTo(dst, src *V)
- func (c Fields[V]) Empty(v *V) bool
- func (c Fields[V]) Equal(a, b *V) bool
- func (c Fields[V]) MarshalBinary(e *benc, v *V) error
- func (c Fields[V]) MarshalJSON(e *jenc, v *V) error
- func (c Fields[V]) UnmarshalBinary(d *bdec, v *V) error
- func (c Fields[V]) UnmarshalJSON(d *jdec, v *V) error
- type Float
- func (f Float[V]) CopyTo(dst, src V)
- func (f Float[V]) Empty(v V) bool
- func (f Float[V]) Equal(a, b V) bool
- func (f Float[V]) IsNil(v V) bool
- func (f Float[V]) MarshalBinary(e *benc, v V) error
- func (f Float[V]) MarshalJSON(e *jenc, v V) error
- func (f Float[V]) UnmarshalBinary(d *bdec, v V) error
- func (f Float[V]) UnmarshalJSON(d *jdec, v V) error
- type FloatPtr
- func (f FloatPtr[V]) CopyTo(dst, src V)
- func (f FloatPtr[V]) Empty(v V) bool
- func (f FloatPtr[V]) Equal(a, b V) bool
- func (f FloatPtr[V]) IsNil(v V) bool
- func (f FloatPtr[V]) MarshalBinary(e *benc, v V) error
- func (f FloatPtr[V]) MarshalJSON(e *jenc, v V) error
- func (f FloatPtr[V]) UnmarshalBinary(d *bdec, v V) error
- func (f FloatPtr[V]) UnmarshalJSON(d *jdec, v V) error
- type Hash
- func (f Hash[V]) CopyTo(dst, src V)
- func (f Hash[V]) Empty(v V) bool
- func (f Hash[V]) Equal(a, b V) bool
- func (f Hash[V]) IsNil(v V) bool
- func (f Hash[V]) MarshalBinary(e *benc, v V) error
- func (f Hash[V]) MarshalJSON(e *jenc, v V) error
- func (f Hash[V]) UnmarshalBinary(d *bdec, v V) error
- func (f Hash[V]) UnmarshalJSON(d *jdec, v V) error
- type HashPtr
- func (f HashPtr[V]) CopyTo(dst, src V)
- func (f HashPtr[V]) Empty(v V) bool
- func (f HashPtr[V]) Equal(a, b V) bool
- func (f HashPtr[V]) IsNil(v V) bool
- func (f HashPtr[V]) MarshalBinary(e *benc, v V) error
- func (f HashPtr[V]) MarshalJSON(e *jenc, v V) error
- func (f HashPtr[V]) UnmarshalBinary(d *bdec, v V) error
- func (f HashPtr[V]) UnmarshalJSON(d *jdec, v V) error
- type Int
- func (f Int[V]) CopyTo(dst, src V)
- func (f Int[V]) Empty(v V) bool
- func (f Int[V]) Equal(a, b V) bool
- func (f Int[V]) IsNil(v V) bool
- func (f Int[V]) MarshalBinary(e *benc, v V) error
- func (f Int[V]) MarshalJSON(e *jenc, v V) error
- func (f Int[V]) UnmarshalBinary(d *bdec, v V) error
- func (f Int[V]) UnmarshalJSON(d *jdec, v V) error
- type IntPtr
- func (f IntPtr[V]) CopyTo(dst, src V)
- func (f IntPtr[V]) Empty(v V) bool
- func (f IntPtr[V]) Equal(a, b V) bool
- func (f IntPtr[V]) IsNil(v V) bool
- func (f IntPtr[V]) MarshalBinary(e *benc, v V) error
- func (f IntPtr[V]) MarshalJSON(e *jenc, v V) error
- func (f IntPtr[V]) UnmarshalBinary(d *bdec, v V) error
- func (f IntPtr[V]) UnmarshalJSON(d *jdec, v V) error
- type String
- func (f String[V]) CopyTo(dst, src V)
- func (f String[V]) Empty(v V) bool
- func (f String[V]) Equal(a, b V) bool
- func (f String[V]) IsNil(v V) bool
- func (f String[V]) MarshalBinary(e *benc, v V) error
- func (f String[V]) MarshalJSON(e *jenc, v V) error
- func (f String[V]) UnmarshalBinary(d *bdec, v V) error
- func (f String[V]) UnmarshalJSON(d *jdec, v V) error
- type StringPtr
- func (f StringPtr[V]) CopyTo(dst, src V)
- func (f StringPtr[V]) Empty(v V) bool
- func (f StringPtr[V]) Equal(a, b V) bool
- func (f StringPtr[V]) IsNil(v V) bool
- func (f StringPtr[V]) MarshalBinary(e *benc, v V) error
- func (f StringPtr[V]) MarshalJSON(e *jenc, v V) error
- func (f StringPtr[V]) UnmarshalBinary(d *bdec, v V) error
- func (f StringPtr[V]) UnmarshalJSON(d *jdec, v V) error
- type Uint
- func (f Uint[V]) CopyTo(dst, src V)
- func (f Uint[V]) Empty(v V) bool
- func (f Uint[V]) Equal(a, b V) bool
- func (f Uint[V]) IsNil(v V) bool
- func (f Uint[V]) MarshalBinary(e *benc, v V) error
- func (f Uint[V]) MarshalJSON(e *jenc, v V) error
- func (f Uint[V]) UnmarshalBinary(d *bdec, v V) error
- func (f Uint[V]) UnmarshalJSON(d *jdec, v V) error
- type UintPtr
- func (f UintPtr[V]) CopyTo(dst, src V)
- func (f UintPtr[V]) Empty(v V) bool
- func (f UintPtr[V]) Equal(a, b V) bool
- func (f UintPtr[V]) IsNil(v V) bool
- func (f UintPtr[V]) MarshalBinary(e *benc, v V) error
- func (f UintPtr[V]) MarshalJSON(e *jenc, v V) error
- func (f UintPtr[V]) UnmarshalBinary(d *bdec, v V) error
- func (f UintPtr[V]) UnmarshalJSON(d *jdec, v V) error
- type Union
- func (n *Union[V, U, EV, EU]) CopyTo(dst, src V)
- func (n *Union[V, U, EV, EU]) Empty(v V) bool
- func (n *Union[V, U, EV, EU]) Equal(a, b V) bool
- func (n *Union[V, U, EV, EU]) IsNil(v V) bool
- func (n *Union[V, U, EV, EU]) MarshalBinary(e *benc, v V) error
- func (n *Union[V, U, EV, EU]) MarshalJSON(e *jenc, v V) error
- func (n *Union[V, U, EV, EU]) UnmarshalBinary(d *bdec, v V) error
- func (n *Union[V, U, EV, EU]) UnmarshalJSON(d *jdec, v V) error
- type UnionMember
- func (um *UnionMember[U, M]) CopyTo(dst, src *U)
- func (um *UnionMember[U, M]) Empty(u *U) bool
- func (um *UnionMember[U, M]) Equal(a, b *U) bool
- func (um *UnionMember[U, M]) IsNil(u *U) bool
- func (um *UnionMember[U, M]) MarshalBinary(e *benc, u *U) error
- func (um *UnionMember[U, M]) MarshalJSON(e *jenc, u *U) error
- func (um *UnionMember[U, M]) New() U
- func (um *UnionMember[U, M]) UnmarshalBinary(d *bdec, u *U) error
- func (um *UnionMember[U, M]) UnmarshalJSON(d *jdec, u *U) error
- type UnionMemberFields
- type UnionTag
- func (ut *UnionTag[U, EV, EU]) CopyTo(U, U)
- func (ut *UnionTag[U, EV, EU]) Empty(U) bool
- func (ut *UnionTag[U, EV, EU]) Equal(a, b U) bool
- func (ut *UnionTag[U, EV, EU]) IsNil(U) bool
- func (ut *UnionTag[U, EV, EU]) MarshalBinary(e *benc, u U) error
- func (ut *UnionTag[U, EV, EU]) MarshalJSON(e *jenc, u U) error
- func (ut *UnionTag[U, EV, EU]) UnmarshalBinary(d *bdec, u U) error
- func (ut *UnionTag[U, EV, EU]) UnmarshalJSON(d *jdec, u U) error
- type Value
- func (f Value[V, U]) CopyTo(dst, src V)
- func (f Value[V, U]) Empty(v V) bool
- func (f Value[V, U]) Equal(a, b V) bool
- func (f Value[V, U]) IsNil(v V) bool
- func (f Value[V, U]) MarshalBinary(e *benc, v V) error
- func (f Value[V, U]) MarshalJSON(e *jenc, v V) error
- func (f Value[V, U]) UnmarshalBinary(d *bdec, v V) error
- func (f Value[V, U]) UnmarshalJSON(d *jdec, v V) error
- type Widget
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetElem ¶
func GetElem[U []E, E any](v ArrayValue[U, E]) *E
Types ¶
type Array ¶
type Array[V any, U []E, E any] struct { Get func(V) *U Elem Widget[ArrayValue[U, E]] }
func ForArray ¶
func ForArray[V any, U []E, E any]( elem Widget[ArrayValue[U, E]], get func(V) *U, ) *Array[V, U, E]
func (*Array[V, U, E]) MarshalBinary ¶
func (*Array[V, U, E]) MarshalJSON ¶
func (*Array[V, U, E]) UnmarshalBinary ¶
func (*Array[V, U, E]) UnmarshalJSON ¶
type ArrayValue ¶
type Bool ¶
func (Bool[V]) MarshalBinary ¶
func (Bool[V]) MarshalJSON ¶
func (Bool[V]) UnmarshalBinary ¶
func (Bool[V]) UnmarshalJSON ¶
type BoolPtr ¶
func ForBoolPtr ¶
func (BoolPtr[V]) MarshalBinary ¶
func (BoolPtr[V]) MarshalJSON ¶
func (BoolPtr[V]) UnmarshalBinary ¶
func (BoolPtr[V]) UnmarshalJSON ¶
type Bytes ¶
func (Bytes[V]) MarshalBinary ¶
func (Bytes[V]) MarshalJSON ¶
func (Bytes[V]) UnmarshalBinary ¶
func (Bytes[V]) UnmarshalJSON ¶
type Composite ¶
func ForComposite ¶
func (*Composite[V, U]) MarshalBinary ¶
func (*Composite[V, U]) MarshalJSON ¶
func (*Composite[V, U]) UnmarshalBinary ¶
func (*Composite[V, U]) UnmarshalJSON ¶
type CompositePtr ¶
func ForCompositePtr ¶
func ForCompositePtr[V, U any]( fields Fields[U], get func(V) **U, ) *CompositePtr[V, U]
func (*CompositePtr[V, U]) CopyTo ¶
func (c *CompositePtr[V, U]) CopyTo(dst, src V)
func (*CompositePtr[V, U]) Empty ¶
func (c *CompositePtr[V, U]) Empty(v V) bool
func (*CompositePtr[V, U]) Equal ¶
func (c *CompositePtr[V, U]) Equal(a, b V) bool
func (*CompositePtr[V, U]) IsNil ¶
func (c *CompositePtr[V, U]) IsNil(v V) bool
func (*CompositePtr[V, U]) MarshalBinary ¶
func (c *CompositePtr[V, U]) MarshalBinary(e *benc, v V) error
func (*CompositePtr[V, U]) MarshalJSON ¶
func (c *CompositePtr[V, U]) MarshalJSON(e *jenc, v V) error
func (*CompositePtr[V, U]) UnmarshalBinary ¶
func (c *CompositePtr[V, U]) UnmarshalBinary(d *bdec, v V) error
func (*CompositePtr[V, U]) UnmarshalJSON ¶
func (c *CompositePtr[V, U]) UnmarshalJSON(d *jdec, v V) error
type EncodableValue ¶
type EncodableValue[V any] interface { comparable Copy() V Equal(V) bool }
type Enum ¶
type Enum[V any, E EnumValue[U], U EnumUnderlying] func(V) *U
func ForEnum ¶
func ForEnum[E EnumValue[U], V any, U EnumUnderlying]( f Enum[V, E, U], ) Enum[V, E, U]
func (Enum[V, E, U]) MarshalBinary ¶
func (Enum[V, E, U]) MarshalJSON ¶
func (Enum[V, E, U]) UnmarshalBinary ¶
func (Enum[V, E, U]) UnmarshalJSON ¶
type EnumPtr ¶
type EnumPtr[V any, E EnumValue[U], U EnumUnderlying] func(V) **U
func ForEnumPtr ¶
func ForEnumPtr[E EnumValue[U], V any, U EnumUnderlying]( f EnumPtr[V, E, U], ) EnumPtr[V, E, U]
func (EnumPtr[V, E, U]) MarshalBinary ¶
func (EnumPtr[V, E, U]) MarshalJSON ¶
func (EnumPtr[V, E, U]) UnmarshalBinary ¶
func (EnumPtr[V, E, U]) UnmarshalJSON ¶
type EnumUnderlying ¶
type EnumUnderlying = constraints.Integer
type Fields ¶
func (Fields[V]) MarshalBinary ¶
func (Fields[V]) MarshalJSON ¶
func (Fields[V]) UnmarshalBinary ¶
func (Fields[V]) UnmarshalJSON ¶
type Float ¶
func (Float[V]) MarshalBinary ¶
func (Float[V]) MarshalJSON ¶
func (Float[V]) UnmarshalBinary ¶
func (Float[V]) UnmarshalJSON ¶
type FloatPtr ¶
func ForFloatPtr ¶
func (FloatPtr[V]) MarshalBinary ¶
func (FloatPtr[V]) MarshalJSON ¶
func (FloatPtr[V]) UnmarshalBinary ¶
func (FloatPtr[V]) UnmarshalJSON ¶
type Hash ¶
func (Hash[V]) MarshalBinary ¶
func (Hash[V]) MarshalJSON ¶
func (Hash[V]) UnmarshalBinary ¶
func (Hash[V]) UnmarshalJSON ¶
type HashPtr ¶
func ForHashPtr ¶
func (HashPtr[V]) MarshalBinary ¶
func (HashPtr[V]) MarshalJSON ¶
func (HashPtr[V]) UnmarshalBinary ¶
func (HashPtr[V]) UnmarshalJSON ¶
type Int ¶
func (Int[V]) MarshalBinary ¶
func (Int[V]) MarshalJSON ¶
func (Int[V]) UnmarshalBinary ¶
func (Int[V]) UnmarshalJSON ¶
type IntPtr ¶
func (IntPtr[V]) MarshalBinary ¶
func (IntPtr[V]) MarshalJSON ¶
func (IntPtr[V]) UnmarshalBinary ¶
func (IntPtr[V]) UnmarshalJSON ¶
type String ¶
func (String[V]) MarshalBinary ¶
func (String[V]) MarshalJSON ¶
func (String[V]) UnmarshalBinary ¶
func (String[V]) UnmarshalJSON ¶
type StringPtr ¶
func ForStringPtr ¶
func (StringPtr[V]) MarshalBinary ¶
func (StringPtr[V]) MarshalJSON ¶
func (StringPtr[V]) UnmarshalBinary ¶
func (StringPtr[V]) UnmarshalJSON ¶
type Uint ¶
func (Uint[V]) MarshalBinary ¶
func (Uint[V]) MarshalJSON ¶
func (Uint[V]) UnmarshalBinary ¶
func (Uint[V]) UnmarshalJSON ¶
type UintPtr ¶
func ForUintPtr ¶
func (UintPtr[V]) MarshalBinary ¶
func (UintPtr[V]) MarshalJSON ¶
func (UintPtr[V]) UnmarshalBinary ¶
func (UintPtr[V]) UnmarshalJSON ¶
type Union ¶
type Union[V any, U comparable, EV EnumValue[EU], EU EnumUnderlying] struct { Get func(V) *U Tag UnionTag[U, EV, EU] Members map[EU]UnionMemberFields[U] }
func ForUnion ¶
func ForUnion[EV EnumValue[EU], EU EnumUnderlying, V any, U comparable]( tagName string, getTag func(U) EU, members map[EU]UnionMemberFields[U], get func(V) *U, ) *Union[V, U, EV, EU]
func (*Union[V, U, EV, EU]) MarshalBinary ¶
func (*Union[V, U, EV, EU]) MarshalJSON ¶
func (*Union[V, U, EV, EU]) UnmarshalBinary ¶
func (*Union[V, U, EV, EU]) UnmarshalJSON ¶
type UnionMember ¶
type UnionMember[U comparable, M any] struct { Fields Fields[M] }
func (*UnionMember[U, M]) CopyTo ¶
func (um *UnionMember[U, M]) CopyTo(dst, src *U)
func (*UnionMember[U, M]) Empty ¶
func (um *UnionMember[U, M]) Empty(u *U) bool
func (*UnionMember[U, M]) Equal ¶
func (um *UnionMember[U, M]) Equal(a, b *U) bool
func (*UnionMember[U, M]) IsNil ¶
func (um *UnionMember[U, M]) IsNil(u *U) bool
func (*UnionMember[U, M]) MarshalBinary ¶
func (um *UnionMember[U, M]) MarshalBinary(e *benc, u *U) error
func (*UnionMember[U, M]) MarshalJSON ¶
func (um *UnionMember[U, M]) MarshalJSON(e *jenc, u *U) error
func (*UnionMember[U, M]) New ¶
func (um *UnionMember[U, M]) New() U
func (*UnionMember[U, M]) UnmarshalBinary ¶
func (um *UnionMember[U, M]) UnmarshalBinary(d *bdec, u *U) error
func (*UnionMember[U, M]) UnmarshalJSON ¶
func (um *UnionMember[U, M]) UnmarshalJSON(d *jdec, u *U) error
type UnionMemberFields ¶
type UnionTag ¶
type UnionTag[U any, EV EnumValue[EU], EU EnumUnderlying] struct { Name string Get func(U) EU }
func ForTag ¶
func ForTag[EV EnumValue[EU], EU EnumUnderlying, V any]( tagName string, get func(V) EU, ) *UnionTag[V, EV, EU]
func (*UnionTag[U, EV, EU]) MarshalBinary ¶
func (*UnionTag[U, EV, EU]) MarshalJSON ¶
func (*UnionTag[U, EV, EU]) UnmarshalBinary ¶
func (*UnionTag[U, EV, EU]) UnmarshalJSON ¶
type Value ¶
type Value[V any, U EncodableValue[U]] func(V) *U
func (Value[V, U]) MarshalBinary ¶
func (Value[V, U]) MarshalJSON ¶
func (Value[V, U]) UnmarshalBinary ¶
func (Value[V, U]) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.