tests
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package tests serves a list of tests for tailscale.com/cmd/viewer.
Index¶
- type BasicType
- type Container
- type ContainerView
- type GenericBasicStruct
- type GenericCloneableStruct
- type GenericCloneableStructView
- func (v GenericCloneableStructView[T, V]) AsStruct() *GenericCloneableStruct[T, V]
- func (v GenericCloneableStructView[T, V]) Map() views.MapFn[string, T, V]
- func (v GenericCloneableStructView[T, V]) MarshalJSON() ([]byte, error)
- func (v GenericCloneableStructView[T, V]) MarshalJSONTo(enc *jsontext.Encoder) error
- func (v GenericCloneableStructView[T, V]) Pointer() map[string]T
- func (v GenericCloneableStructView[T, V]) PtrKeyMap() map[*T]string
- func (v GenericCloneableStructView[T, V]) PtrSlice() *T
- func (v GenericCloneableStructView[T, V]) PtrValueMap() map[string]*T
- func (v GenericCloneableStructView[T, V]) Slice() views.SliceView[T, V]
- func (v GenericCloneableStructView[T, V]) SliceMap() map[string][]T
- func (v *GenericCloneableStructView[T, V]) UnmarshalJSON(b []byte) error
- func (v *GenericCloneableStructView[T, V]) UnmarshalJSONFrom(dec *jsontext.Decoder) error
- func (v GenericCloneableStructView[T, V]) Valid() bool
- func (v GenericCloneableStructView[T, V]) Value() V
- type GenericIntStruct
- type GenericIntStructView
- func (v GenericIntStructView[T]) AsStruct() *GenericIntStruct[T]
- func (v GenericIntStructView[T]) Map() views.Map[string, T]
- func (v GenericIntStructView[T]) MarshalJSON() ([]byte, error)
- func (v GenericIntStructView[T]) MarshalJSONTo(enc *jsontext.Encoder) error
- func (v GenericIntStructView[T]) Pointer() views.ValuePointer[T]
- func (v GenericIntStructView[T]) PtrKeyMap() map[*T]string
- func (v GenericIntStructView[T]) PtrSlice() *T
- func (v GenericIntStructView[T]) PtrValueMap() map[string]*T
- func (v GenericIntStructView[T]) Slice() views.Slice[T]
- func (v GenericIntStructView[T]) SliceMap() map[string][]T
- func (v *GenericIntStructView[T]) UnmarshalJSON(b []byte) error
- func (v *GenericIntStructView[T]) UnmarshalJSONFrom(dec *jsontext.Decoder) error
- func (v GenericIntStructView[T]) Valid() bool
- func (v GenericIntStructView[T]) Value() T
- type GenericNoPtrsStruct
- type GenericNoPtrsStructView
- func (v GenericNoPtrsStructView[T]) AsStruct() *GenericNoPtrsStruct[T]
- func (v GenericNoPtrsStructView[T]) Map() views.Map[string, T]
- func (v GenericNoPtrsStructView[T]) MarshalJSON() ([]byte, error)
- func (v GenericNoPtrsStructView[T]) MarshalJSONTo(enc *jsontext.Encoder) error
- func (v GenericNoPtrsStructView[T]) Pointer() views.ValuePointer[T]
- func (v GenericNoPtrsStructView[T]) PtrKeyMap() map[*T]string
- func (v GenericNoPtrsStructView[T]) PtrSlice() *T
- func (v GenericNoPtrsStructView[T]) PtrValueMap() map[string]*T
- func (v GenericNoPtrsStructView[T]) Slice() views.Slice[T]
- func (v GenericNoPtrsStructView[T]) SliceMap() map[string][]T
- func (v *GenericNoPtrsStructView[T]) UnmarshalJSON(b []byte) error
- func (v *GenericNoPtrsStructView[T]) UnmarshalJSONFrom(dec *jsontext.Decoder) error
- func (v GenericNoPtrsStructView[T]) Valid() bool
- func (v GenericNoPtrsStructView[T]) Value() T
- type GenericTypeAliasStruct
- type GenericTypeAliasStructView
- func (v GenericTypeAliasStructView[T, T2, V2]) AsStruct() *GenericTypeAliasStruct[T, T2, V2]
- func (v GenericTypeAliasStructView[T, T2, V2]) Cloneable() V2
- func (v GenericTypeAliasStructView[T, T2, V2]) MarshalJSON() ([]byte, error)
- func (v GenericTypeAliasStructView[T, T2, V2]) MarshalJSONTo(enc *jsontext.Encoder) error
- func (v GenericTypeAliasStructView[T, T2, V2]) NonCloneable() T
- func (v *GenericTypeAliasStructView[T, T2, V2]) UnmarshalJSON(b []byte) error
- func (v *GenericTypeAliasStructView[T, T2, V2]) UnmarshalJSONFrom(dec *jsontext.Decoder) error
- func (v GenericTypeAliasStructView[T, T2, V2]) Valid() bool
- type Map
- type MapContainer
- type MapContainerView
- type MapView
- func (v MapView) AsStruct() *Map
- func (v MapView) Int() views.Map[string, int]
- func (v MapView) MarshalJSON() ([]byte, error)
- func (v MapView) MarshalJSONTo(enc *jsontext.Encoder) error
- func (v MapView) PointerKey() map[*string]int
- func (v MapView) SliceInt() views.MapSlice[string, int]
- func (v MapView) SliceIntPtr() map[string][]*int
- func (v MapView) SlicesWithPtrs() ...
- func (v MapView) SlicesWithoutPtrs() ...
- func (v MapView) StructPtrWithPtr() views.MapFn[string, *StructWithPtrs, StructWithPtrsView]
- func (v MapView) StructPtrWithoutPtr() views.MapFn[string, *StructWithoutPtrs, StructWithoutPtrsView]
- func (v MapView) StructWithPtr() views.MapFn[string, StructWithPtrs, StructWithPtrsView]
- func (v MapView) StructWithPtrKey() map[StructWithPtrs]int
- func (v MapView) StructWithoutPtr() views.Map[string, StructWithoutPtrs]
- func (v MapView) StructWithoutPtrKey() views.Map[StructWithoutPtrs, int]
- func (v *MapView) UnmarshalJSON(b []byte) error
- func (v *MapView) UnmarshalJSONFrom(dec *jsontext.Decoder) error
- func (v MapView) Valid() bool
- type OnlyGetClone
- type StructWithContainers
- type StructWithContainersView
- func (v StructWithContainersView) AsStruct() *StructWithContainers
- func (v StructWithContainersView) BasicGenericContainer() Container[GenericBasicStruct[int]]
- func (v StructWithContainersView) CloneableContainer() ContainerView[*StructWithPtrs, StructWithPtrsView]
- func (v StructWithContainersView) CloneableGenericContainer() ContainerView[*GenericNoPtrsStruct[int], GenericNoPtrsStructView[int]]
- func (v StructWithContainersView) CloneableGenericMap() MapContainerView[int, *GenericNoPtrsStruct[int], GenericNoPtrsStructView[int]]
- func (v StructWithContainersView) CloneableMap() MapContainerView[int, *StructWithPtrs, StructWithPtrsView]
- func (v StructWithContainersView) IntContainer() Container[int]
- func (v StructWithContainersView) MarshalJSON() ([]byte, error)
- func (v StructWithContainersView) MarshalJSONTo(enc *jsontext.Encoder) error
- func (v *StructWithContainersView) UnmarshalJSON(b []byte) error
- func (v *StructWithContainersView) UnmarshalJSONFrom(dec *jsontext.Decoder) error
- func (v StructWithContainersView) Valid() bool
- type StructWithEmbedded
- type StructWithEmbeddedView
- func (v StructWithEmbeddedView) A() StructWithPtrsView
- func (v StructWithEmbeddedView) AsStruct() *StructWithEmbedded
- func (v StructWithEmbeddedView) MarshalJSON() ([]byte, error)
- func (v StructWithEmbeddedView) MarshalJSONTo(enc *jsontext.Encoder) error
- func (v StructWithEmbeddedView) StructWithSlices() StructWithSlicesView
- func (v *StructWithEmbeddedView) UnmarshalJSON(b []byte) error
- func (v *StructWithEmbeddedView) UnmarshalJSONFrom(dec *jsontext.Decoder) error
- func (v StructWithEmbeddedView) Valid() bool
- type StructWithMapOfViews
- type StructWithMapOfViewsView
- func (v StructWithMapOfViewsView) AsStruct() *StructWithMapOfViews
- func (v StructWithMapOfViewsView) MapOfViews() views.Map[string, StructWithoutPtrsView]
- func (v StructWithMapOfViewsView) MarshalJSON() ([]byte, error)
- func (v StructWithMapOfViewsView) MarshalJSONTo(enc *jsontext.Encoder) error
- func (v *StructWithMapOfViewsView) UnmarshalJSON(b []byte) error
- func (v *StructWithMapOfViewsView) UnmarshalJSONFrom(dec *jsontext.Decoder) error
- func (v StructWithMapOfViewsView) Valid() bool
- type StructWithNoView
- type StructWithPtrs
- type StructWithPtrsAlias
- type StructWithPtrsAliasView
- type StructWithPtrsView
- func (v StructWithPtrsView) AsStruct() *StructWithPtrs
- func (v StructWithPtrsView) Equal(v2 StructWithPtrsView) bool
- func (v StructWithPtrsView) Int() views.ValuePointer[int]
- func (v StructWithPtrsView) MarshalJSON() ([]byte, error)
- func (v StructWithPtrsView) MarshalJSONTo(enc *jsontext.Encoder) error
- func (v StructWithPtrsView) NoCloneValue() *StructWithoutPtrs
- func (v StructWithPtrsView) NoView() views.ValuePointer[StructWithNoView]
- func (v StructWithPtrsView) String() string
- func (v *StructWithPtrsView) UnmarshalJSON(b []byte) error
- func (v *StructWithPtrsView) UnmarshalJSONFrom(dec *jsontext.Decoder) error
- func (v StructWithPtrsView) Valid() bool
- func (v StructWithPtrsView) Value() StructWithoutPtrsView
- type StructWithSlices
- type StructWithSlicesView
- func (v StructWithSlicesView) AsStruct() *StructWithSlices
- func (v StructWithSlicesView) Data() views.ByteSlice[[]byte]
- func (v StructWithSlicesView) Ints() *int
- func (v StructWithSlicesView) MarshalJSON() ([]byte, error)
- func (v StructWithSlicesView) MarshalJSONTo(enc *jsontext.Encoder) error
- func (v StructWithSlicesView) Prefixes() views.Slice[netip.Prefix]
- func (v StructWithSlicesView) Slice() views.Slice[string]
- func (v StructWithSlicesView) StructPointers() views.SliceView[*StructWithPtrs, StructWithPtrsView]
- func (v StructWithSlicesView) Structs() StructWithPtrs
- func (v *StructWithSlicesView) UnmarshalJSON(b []byte) error
- func (v *StructWithSlicesView) UnmarshalJSONFrom(dec *jsontext.Decoder) error
- func (v StructWithSlicesView) Valid() bool
- func (v StructWithSlicesView) ValuePointers() views.SliceView[*StructWithoutPtrs, StructWithoutPtrsView]
- func (v StructWithSlicesView) Values() views.Slice[StructWithoutPtrs]
- type StructWithTypeAliasFields
- type StructWithTypeAliasFieldsView
- func (v StructWithTypeAliasFieldsView) AsStruct() *StructWithTypeAliasFields
- func (v StructWithTypeAliasFieldsView) MapOfSlicesWithPtrs() ...
- func (v StructWithTypeAliasFieldsView) MapOfSlicesWithoutPtrs() ...
- func (v StructWithTypeAliasFieldsView) MapWithPtrs() views.MapFn[string, *StructWithPtrsAlias, StructWithPtrsAliasView]
- func (v StructWithTypeAliasFieldsView) MapWithoutPtrs() views.MapFn[string, *StructWithoutPtrsAlias, StructWithoutPtrsAliasView]
- func (v StructWithTypeAliasFieldsView) MarshalJSON() ([]byte, error)
- func (v StructWithTypeAliasFieldsView) MarshalJSONTo(enc *jsontext.Encoder) error
- func (v StructWithTypeAliasFieldsView) SliceWithPtrs() views.SliceView[*StructWithPtrsAlias, StructWithPtrsAliasView]
- func (v StructWithTypeAliasFieldsView) SliceWithoutPtrs() views.SliceView[*StructWithoutPtrsAlias, StructWithoutPtrsAliasView]
- func (v *StructWithTypeAliasFieldsView) UnmarshalJSON(b []byte) error
- func (v *StructWithTypeAliasFieldsView) UnmarshalJSONFrom(dec *jsontext.Decoder) error
- func (v StructWithTypeAliasFieldsView) Valid() bool
- func (v StructWithTypeAliasFieldsView) WithPtr() StructWithPtrsAliasView
- func (v StructWithTypeAliasFieldsView) WithPtrByPtr() StructWithPtrsAliasView
- func (v StructWithTypeAliasFieldsView) WithoutPtr() StructWithoutPtrsAlias
- func (v StructWithTypeAliasFieldsView) WithoutPtrByPtr() StructWithoutPtrsAliasView
- type StructWithoutPtrs
- type StructWithoutPtrsAlias
- type StructWithoutPtrsAliasView
- type StructWithoutPtrsView
- func (v StructWithoutPtrsView) AsStruct() *StructWithoutPtrs
- func (v StructWithoutPtrsView) Int() int
- func (v StructWithoutPtrsView) MarshalJSON() ([]byte, error)
- func (v StructWithoutPtrsView) MarshalJSONTo(enc *jsontext.Encoder) error
- func (v StructWithoutPtrsView) Pfx() netip.Prefix
- func (v *StructWithoutPtrsView) UnmarshalJSON(b []byte) error
- func (v *StructWithoutPtrsView) UnmarshalJSONFrom(dec *jsontext.Decoder) error
- func (v StructWithoutPtrsView) Valid() bool
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeBasicType¶added inv1.70.0
type BasicType interface {~bool |constraints.Integer |constraints.Float |constraints.Complex | ~string}typeContainer¶added inv1.72.0
type Container[Tany] struct {Item T}
Container is a pre-defined container type, such as a collection, an optionalvalue or a generic wrapper.
typeContainerView¶added inv1.72.0
type ContainerView[Tviews.ViewCloner[T, V], Vviews.StructView[T]] struct {// contains filtered or unexported fields}
ContainerView is a pre-defined read-only view of a Container[T].
funcContainerViewOf¶added inv1.72.0
func ContainerViewOf[Tviews.ViewCloner[T, V], Vviews.StructView[T]](c *Container[T])ContainerView[T, V]
func (ContainerView[T, V])Item¶added inv1.72.0
func (cvContainerView[T, V]) Item() V
typeGenericBasicStruct¶added inv1.72.0
type GenericBasicStruct[TBasicType] struct {Value T}
typeGenericCloneableStruct¶added inv1.70.0
type GenericCloneableStruct[Tviews.ViewCloner[T, V], Vviews.StructView[T]] struct {Value TSlice []TMap map[string]T// Unsupported views.Pointer *TPtrSlice []*TPtrKeyMap map[*T]string `json:"-"`PtrValueMap map[string]*TSliceMap map[string][]T}
func (*GenericCloneableStruct[T, V])Clone¶added inv1.70.0
func (src *GenericCloneableStruct[T, V]) Clone() *GenericCloneableStruct[T, V]
Clone makes a deep copy of GenericCloneableStruct.The result aliases no memory with the original.
func (*GenericCloneableStruct[T, V])View¶added inv1.70.0
func (p *GenericCloneableStruct[T, V]) View()GenericCloneableStructView[T, V]
View returns a read-only view of GenericCloneableStruct.
typeGenericCloneableStructView¶added inv1.70.0
type GenericCloneableStructView[Tviews.ViewCloner[T, V], Vviews.StructView[T]] struct {// contains filtered or unexported fields}
GenericCloneableStructView[T, V] provides a read-only view over GenericCloneableStruct[T, V].
Its methods should only be called if `Valid()` returns true.
func (GenericCloneableStructView[T, V])AsStruct¶added inv1.70.0
func (vGenericCloneableStructView[T, V]) AsStruct() *GenericCloneableStruct[T, V]
AsStruct returns a clone of the underlying value which aliases no memory withthe original.
func (GenericCloneableStructView[T, V])Map¶added inv1.70.0
func (vGenericCloneableStructView[T, V]) Map()views.MapFn[string, T, V]
func (GenericCloneableStructView[T, V])MarshalJSON¶added inv1.70.0
func (vGenericCloneableStructView[T, V]) MarshalJSON() ([]byte,error)
MarshalJSON implementsjsonv1.Marshaler.
func (GenericCloneableStructView[T, V])MarshalJSONTo¶added inv1.88.0
func (vGenericCloneableStructView[T, V]) MarshalJSONTo(enc *jsontext.Encoder)error
MarshalJSONTo implementsjsonv2.MarshalerTo.
func (GenericCloneableStructView[T, V])Pointer¶added inv1.70.0
func (vGenericCloneableStructView[T, V]) Pointer() map[string]T
Unsupported views.
func (GenericCloneableStructView[T, V])PtrKeyMap¶added inv1.70.0
func (vGenericCloneableStructView[T, V]) PtrKeyMap() map[*T]string
func (GenericCloneableStructView[T, V])PtrSlice¶added inv1.70.0
func (vGenericCloneableStructView[T, V]) PtrSlice() *T
func (GenericCloneableStructView[T, V])PtrValueMap¶added inv1.70.0
func (vGenericCloneableStructView[T, V]) PtrValueMap() map[string]*T
func (GenericCloneableStructView[T, V])Slice¶added inv1.70.0
func (vGenericCloneableStructView[T, V]) Slice()views.SliceView[T, V]
func (GenericCloneableStructView[T, V])SliceMap¶added inv1.70.0
func (vGenericCloneableStructView[T, V]) SliceMap() map[string][]T
func (*GenericCloneableStructView[T, V])UnmarshalJSON¶added inv1.70.0
func (v *GenericCloneableStructView[T, V]) UnmarshalJSON(b []byte)error
UnmarshalJSON implementsjsonv1.Unmarshaler.
func (*GenericCloneableStructView[T, V])UnmarshalJSONFrom¶added inv1.88.0
func (v *GenericCloneableStructView[T, V]) UnmarshalJSONFrom(dec *jsontext.Decoder)error
UnmarshalJSONFrom implementsjsonv2.UnmarshalerFrom.
func (GenericCloneableStructView[T, V])Valid¶added inv1.70.0
func (vGenericCloneableStructView[T, V]) Valid()bool
Valid reports whether v's underlying value is non-nil.
func (GenericCloneableStructView[T, V])Value¶added inv1.70.0
func (vGenericCloneableStructView[T, V]) Value() V
typeGenericIntStruct¶added inv1.70.0
type GenericIntStruct[Tconstraints.Integer] struct {Value TPointer *TSlice []TMap map[string]T// Unsupported views.PtrSlice []*TPtrKeyMap map[*T]string `json:"-"`PtrValueMap map[string]*TSliceMap map[string][]T}
func (*GenericIntStruct[T])Clone¶added inv1.70.0
func (src *GenericIntStruct[T]) Clone() *GenericIntStruct[T]
Clone makes a deep copy of GenericIntStruct.The result aliases no memory with the original.
func (*GenericIntStruct[T])View¶added inv1.70.0
func (p *GenericIntStruct[T]) View()GenericIntStructView[T]
View returns a read-only view of GenericIntStruct.
typeGenericIntStructView¶added inv1.70.0
type GenericIntStructView[Tconstraints.Integer] struct {// contains filtered or unexported fields}
GenericIntStructView[T] provides a read-only view over GenericIntStruct[T].
Its methods should only be called if `Valid()` returns true.
func (GenericIntStructView[T])AsStruct¶added inv1.70.0
func (vGenericIntStructView[T]) AsStruct() *GenericIntStruct[T]
AsStruct returns a clone of the underlying value which aliases no memory withthe original.
func (GenericIntStructView[T])Map¶added inv1.70.0
func (vGenericIntStructView[T]) Map()views.Map[string, T]
func (GenericIntStructView[T])MarshalJSON¶added inv1.70.0
func (vGenericIntStructView[T]) MarshalJSON() ([]byte,error)
MarshalJSON implementsjsonv1.Marshaler.
func (GenericIntStructView[T])MarshalJSONTo¶added inv1.88.0
func (vGenericIntStructView[T]) MarshalJSONTo(enc *jsontext.Encoder)error
MarshalJSONTo implementsjsonv2.MarshalerTo.
func (GenericIntStructView[T])Pointer¶added inv1.70.0
func (vGenericIntStructView[T]) Pointer()views.ValuePointer[T]
func (GenericIntStructView[T])PtrKeyMap¶added inv1.70.0
func (vGenericIntStructView[T]) PtrKeyMap() map[*T]string
func (GenericIntStructView[T])PtrSlice¶added inv1.70.0
func (vGenericIntStructView[T]) PtrSlice() *T
Unsupported views.
func (GenericIntStructView[T])PtrValueMap¶added inv1.70.0
func (vGenericIntStructView[T]) PtrValueMap() map[string]*T
func (GenericIntStructView[T])Slice¶added inv1.70.0
func (vGenericIntStructView[T]) Slice()views.Slice[T]
func (GenericIntStructView[T])SliceMap¶added inv1.70.0
func (vGenericIntStructView[T]) SliceMap() map[string][]T
func (*GenericIntStructView[T])UnmarshalJSON¶added inv1.70.0
func (v *GenericIntStructView[T]) UnmarshalJSON(b []byte)error
UnmarshalJSON implementsjsonv1.Unmarshaler.
func (*GenericIntStructView[T])UnmarshalJSONFrom¶added inv1.88.0
func (v *GenericIntStructView[T]) UnmarshalJSONFrom(dec *jsontext.Decoder)error
UnmarshalJSONFrom implementsjsonv2.UnmarshalerFrom.
func (GenericIntStructView[T])Valid¶added inv1.70.0
func (vGenericIntStructView[T]) Valid()bool
Valid reports whether v's underlying value is non-nil.
func (GenericIntStructView[T])Value¶added inv1.70.0
func (vGenericIntStructView[T]) Value() T
typeGenericNoPtrsStruct¶added inv1.70.0
type GenericNoPtrsStruct[TStructWithoutPtrs |netip.Prefix |BasicType] struct {Value TPointer *TSlice []TMap map[string]T// Unsupported views.PtrSlice []*TPtrKeyMap map[*T]string `json:"-"`PtrValueMap map[string]*TSliceMap map[string][]T}
func (*GenericNoPtrsStruct[T])Clone¶added inv1.70.0
func (src *GenericNoPtrsStruct[T]) Clone() *GenericNoPtrsStruct[T]
Clone makes a deep copy of GenericNoPtrsStruct.The result aliases no memory with the original.
func (*GenericNoPtrsStruct[T])View¶added inv1.70.0
func (p *GenericNoPtrsStruct[T]) View()GenericNoPtrsStructView[T]
View returns a read-only view of GenericNoPtrsStruct.
typeGenericNoPtrsStructView¶added inv1.70.0
type GenericNoPtrsStructView[TStructWithoutPtrs |netip.Prefix |BasicType] struct {// contains filtered or unexported fields}
GenericNoPtrsStructView[T] provides a read-only view over GenericNoPtrsStruct[T].
Its methods should only be called if `Valid()` returns true.
func (GenericNoPtrsStructView[T])AsStruct¶added inv1.70.0
func (vGenericNoPtrsStructView[T]) AsStruct() *GenericNoPtrsStruct[T]
AsStruct returns a clone of the underlying value which aliases no memory withthe original.
func (GenericNoPtrsStructView[T])Map¶added inv1.70.0
func (vGenericNoPtrsStructView[T]) Map()views.Map[string, T]
func (GenericNoPtrsStructView[T])MarshalJSON¶added inv1.70.0
func (vGenericNoPtrsStructView[T]) MarshalJSON() ([]byte,error)
MarshalJSON implementsjsonv1.Marshaler.
func (GenericNoPtrsStructView[T])MarshalJSONTo¶added inv1.88.0
func (vGenericNoPtrsStructView[T]) MarshalJSONTo(enc *jsontext.Encoder)error
MarshalJSONTo implementsjsonv2.MarshalerTo.
func (GenericNoPtrsStructView[T])Pointer¶added inv1.70.0
func (vGenericNoPtrsStructView[T]) Pointer()views.ValuePointer[T]
func (GenericNoPtrsStructView[T])PtrKeyMap¶added inv1.70.0
func (vGenericNoPtrsStructView[T]) PtrKeyMap() map[*T]string
func (GenericNoPtrsStructView[T])PtrSlice¶added inv1.70.0
func (vGenericNoPtrsStructView[T]) PtrSlice() *T
Unsupported views.
func (GenericNoPtrsStructView[T])PtrValueMap¶added inv1.70.0
func (vGenericNoPtrsStructView[T]) PtrValueMap() map[string]*T
func (GenericNoPtrsStructView[T])Slice¶added inv1.70.0
func (vGenericNoPtrsStructView[T]) Slice()views.Slice[T]
func (GenericNoPtrsStructView[T])SliceMap¶added inv1.70.0
func (vGenericNoPtrsStructView[T]) SliceMap() map[string][]T
func (*GenericNoPtrsStructView[T])UnmarshalJSON¶added inv1.70.0
func (v *GenericNoPtrsStructView[T]) UnmarshalJSON(b []byte)error
UnmarshalJSON implementsjsonv1.Unmarshaler.
func (*GenericNoPtrsStructView[T])UnmarshalJSONFrom¶added inv1.88.0
func (v *GenericNoPtrsStructView[T]) UnmarshalJSONFrom(dec *jsontext.Decoder)error
UnmarshalJSONFrom implementsjsonv2.UnmarshalerFrom.
func (GenericNoPtrsStructView[T])Valid¶added inv1.70.0
func (vGenericNoPtrsStructView[T]) Valid()bool
Valid reports whether v's underlying value is non-nil.
func (GenericNoPtrsStructView[T])Value¶added inv1.70.0
func (vGenericNoPtrsStructView[T]) Value() T
typeGenericTypeAliasStruct¶added inv1.74.0
type GenericTypeAliasStruct[T integer, T2views.ViewCloner[T2, V2], V2views.StructView[T2]] struct {NonCloneable TCloneable T2}
func (*GenericTypeAliasStruct[T, T2, V2])Clone¶added inv1.74.0
func (src *GenericTypeAliasStruct[T, T2, V2]) Clone() *GenericTypeAliasStruct[T, T2, V2]
Clone makes a deep copy of GenericTypeAliasStruct.The result aliases no memory with the original.
func (*GenericTypeAliasStruct[T, T2, V2])View¶added inv1.74.0
func (p *GenericTypeAliasStruct[T, T2, V2]) View()GenericTypeAliasStructView[T, T2, V2]
View returns a read-only view of GenericTypeAliasStruct.
typeGenericTypeAliasStructView¶added inv1.74.0
type GenericTypeAliasStructView[T integer, T2views.ViewCloner[T2, V2], V2views.StructView[T2]] struct {// contains filtered or unexported fields}
GenericTypeAliasStructView[T, T2, V2] provides a read-only view over GenericTypeAliasStruct[T, T2, V2].
Its methods should only be called if `Valid()` returns true.
func (GenericTypeAliasStructView[T, T2, V2])AsStruct¶added inv1.74.0
func (vGenericTypeAliasStructView[T, T2, V2]) AsStruct() *GenericTypeAliasStruct[T, T2, V2]
AsStruct returns a clone of the underlying value which aliases no memory withthe original.
func (GenericTypeAliasStructView[T, T2, V2])Cloneable¶added inv1.74.0
func (vGenericTypeAliasStructView[T, T2, V2]) Cloneable() V2
func (GenericTypeAliasStructView[T, T2, V2])MarshalJSON¶added inv1.74.0
func (vGenericTypeAliasStructView[T, T2, V2]) MarshalJSON() ([]byte,error)
MarshalJSON implementsjsonv1.Marshaler.
func (GenericTypeAliasStructView[T, T2, V2])MarshalJSONTo¶added inv1.88.0
func (vGenericTypeAliasStructView[T, T2, V2]) MarshalJSONTo(enc *jsontext.Encoder)error
MarshalJSONTo implementsjsonv2.MarshalerTo.
func (GenericTypeAliasStructView[T, T2, V2])NonCloneable¶added inv1.74.0
func (vGenericTypeAliasStructView[T, T2, V2]) NonCloneable() T
func (*GenericTypeAliasStructView[T, T2, V2])UnmarshalJSON¶added inv1.74.0
func (v *GenericTypeAliasStructView[T, T2, V2]) UnmarshalJSON(b []byte)error
UnmarshalJSON implementsjsonv1.Unmarshaler.
func (*GenericTypeAliasStructView[T, T2, V2])UnmarshalJSONFrom¶added inv1.88.0
func (v *GenericTypeAliasStructView[T, T2, V2]) UnmarshalJSONFrom(dec *jsontext.Decoder)error
UnmarshalJSONFrom implementsjsonv2.UnmarshalerFrom.
func (GenericTypeAliasStructView[T, T2, V2])Valid¶added inv1.74.0
func (vGenericTypeAliasStructView[T, T2, V2]) Valid()bool
Valid reports whether v's underlying value is non-nil.
typeMap¶
type Map struct {Int map[string]intSliceInt map[string][]intStructPtrWithPtr map[string]*StructWithPtrsStructPtrWithoutPtr map[string]*StructWithoutPtrsStructWithoutPtr map[string]StructWithoutPtrsSlicesWithPtrs map[string][]*StructWithPtrsSlicesWithoutPtrs map[string][]*StructWithoutPtrsStructWithoutPtrKey map[StructWithoutPtrs]int `json:"-"`StructWithPtr map[string]StructWithPtrs// Unsupported views.SliceIntPtr map[string][]*intPointerKey map[*string]int `json:"-"`StructWithPtrKey map[StructWithPtrs]int `json:"-"`}typeMapContainer¶added inv1.72.0
type MapContainer[Kcomparable, Vviews.Cloner[V]] struct {Items map[K]V}
MapContainer is a predefined map-like container type.UnlikeContainer, it has two type parameters, where the valueis the second parameter.
func (*MapContainer[K, V])Clone¶added inv1.72.0
func (c *MapContainer[K, V]) Clone() *MapContainer[K, V]
typeMapContainerView¶added inv1.72.0
type MapContainerView[Kcomparable, Tviews.ViewCloner[T, V], Vviews.StructView[T]] struct {// contains filtered or unexported fields}
MapContainerView is a pre-defined read-only view of aMapContainer[K, T].
funcMapContainerViewOf¶added inv1.72.0
func MapContainerViewOf[Kcomparable, Tviews.ViewCloner[T, V], Vviews.StructView[T]](c *MapContainer[K, T])MapContainerView[K, T, V]
func (MapContainerView[K, T, V])Items¶added inv1.72.0
func (cvMapContainerView[K, T, V]) Items()views.MapFn[K, T, V]
typeMapView¶
type MapView struct {// contains filtered or unexported fields}MapView provides a read-only view over Map.
Its methods should only be called if `Valid()` returns true.
func (MapView)AsStruct¶
AsStruct returns a clone of the underlying value which aliases no memory withthe original.
func (MapView)MarshalJSON¶
MarshalJSON implementsjsonv1.Marshaler.
func (MapView)MarshalJSONTo¶added inv1.88.0
MarshalJSONTo implementsjsonv2.MarshalerTo.
func (MapView)PointerKey¶
func (MapView)SlicesWithPtrs¶
func (vMapView) SlicesWithPtrs()views.MapFn[string, []*StructWithPtrs,views.SliceView[*StructWithPtrs,StructWithPtrsView]]
func (MapView)SlicesWithoutPtrs¶
func (vMapView) SlicesWithoutPtrs()views.MapFn[string, []*StructWithoutPtrs,views.SliceView[*StructWithoutPtrs,StructWithoutPtrsView]]
func (MapView)StructPtrWithPtr¶added inv1.30.0
func (vMapView) StructPtrWithPtr()views.MapFn[string, *StructWithPtrs,StructWithPtrsView]
func (MapView)StructPtrWithoutPtr¶added inv1.30.0
func (vMapView) StructPtrWithoutPtr()views.MapFn[string, *StructWithoutPtrs,StructWithoutPtrsView]
func (MapView)StructWithPtr¶
func (vMapView) StructWithPtr()views.MapFn[string,StructWithPtrs,StructWithPtrsView]
func (MapView)StructWithPtrKey¶
func (vMapView) StructWithPtrKey() map[StructWithPtrs]int
func (MapView)StructWithoutPtr¶
func (vMapView) StructWithoutPtr()views.Map[string,StructWithoutPtrs]
func (MapView)StructWithoutPtrKey¶
func (vMapView) StructWithoutPtrKey()views.Map[StructWithoutPtrs,int]
func (*MapView)UnmarshalJSON¶
UnmarshalJSON implementsjsonv1.Unmarshaler.
func (*MapView)UnmarshalJSONFrom¶added inv1.88.0
UnmarshalJSONFrom implementsjsonv2.UnmarshalerFrom.
typeOnlyGetClone¶added inv1.30.0
type OnlyGetClone struct {SinViewerPorFavorbool}func (*OnlyGetClone)Clone¶added inv1.30.0
func (src *OnlyGetClone) Clone() *OnlyGetClone
Clone makes a deep copy of OnlyGetClone.The result aliases no memory with the original.
typeStructWithContainers¶added inv1.72.0
type StructWithContainers struct {IntContainerContainer[int]CloneableContainerContainer[*StructWithPtrs]BasicGenericContainerContainer[GenericBasicStruct[int]]CloneableGenericContainerContainer[*GenericNoPtrsStruct[int]]CloneableMapMapContainer[int, *StructWithPtrs]CloneableGenericMapMapContainer[int, *GenericNoPtrsStruct[int]]}func (*StructWithContainers)Clone¶added inv1.72.0
func (src *StructWithContainers) Clone() *StructWithContainers
Clone makes a deep copy of StructWithContainers.The result aliases no memory with the original.
func (*StructWithContainers)View¶added inv1.72.0
func (p *StructWithContainers) View()StructWithContainersView
View returns a read-only view of StructWithContainers.
typeStructWithContainersView¶added inv1.72.0
type StructWithContainersView struct {// contains filtered or unexported fields}StructWithContainersView provides a read-only view over StructWithContainers.
Its methods should only be called if `Valid()` returns true.
func (StructWithContainersView)AsStruct¶added inv1.72.0
func (vStructWithContainersView) AsStruct() *StructWithContainers
AsStruct returns a clone of the underlying value which aliases no memory withthe original.
func (StructWithContainersView)BasicGenericContainer¶added inv1.72.0
func (vStructWithContainersView) BasicGenericContainer()Container[GenericBasicStruct[int]]
func (StructWithContainersView)CloneableContainer¶added inv1.72.0
func (vStructWithContainersView) CloneableContainer()ContainerView[*StructWithPtrs,StructWithPtrsView]
func (StructWithContainersView)CloneableGenericContainer¶added inv1.72.0
func (vStructWithContainersView) CloneableGenericContainer()ContainerView[*GenericNoPtrsStruct[int],GenericNoPtrsStructView[int]]
func (StructWithContainersView)CloneableGenericMap¶added inv1.72.0
func (vStructWithContainersView) CloneableGenericMap()MapContainerView[int, *GenericNoPtrsStruct[int],GenericNoPtrsStructView[int]]
func (StructWithContainersView)CloneableMap¶added inv1.72.0
func (vStructWithContainersView) CloneableMap()MapContainerView[int, *StructWithPtrs,StructWithPtrsView]
func (StructWithContainersView)IntContainer¶added inv1.72.0
func (vStructWithContainersView) IntContainer()Container[int]
func (StructWithContainersView)MarshalJSON¶added inv1.72.0
func (vStructWithContainersView) MarshalJSON() ([]byte,error)
MarshalJSON implementsjsonv1.Marshaler.
func (StructWithContainersView)MarshalJSONTo¶added inv1.88.0
func (vStructWithContainersView) MarshalJSONTo(enc *jsontext.Encoder)error
MarshalJSONTo implementsjsonv2.MarshalerTo.
func (*StructWithContainersView)UnmarshalJSON¶added inv1.72.0
func (v *StructWithContainersView) UnmarshalJSON(b []byte)error
UnmarshalJSON implementsjsonv1.Unmarshaler.
func (*StructWithContainersView)UnmarshalJSONFrom¶added inv1.88.0
func (v *StructWithContainersView) UnmarshalJSONFrom(dec *jsontext.Decoder)error
UnmarshalJSONFrom implementsjsonv2.UnmarshalerFrom.
func (StructWithContainersView)Valid¶added inv1.72.0
func (vStructWithContainersView) Valid()bool
Valid reports whether v's underlying value is non-nil.
typeStructWithEmbedded¶added inv1.42.0
type StructWithEmbedded struct {A *StructWithPtrsStructWithSlices}func (*StructWithEmbedded)Clone¶added inv1.42.0
func (src *StructWithEmbedded) Clone() *StructWithEmbedded
Clone makes a deep copy of StructWithEmbedded.The result aliases no memory with the original.
func (*StructWithEmbedded)View¶added inv1.42.0
func (p *StructWithEmbedded) View()StructWithEmbeddedView
View returns a read-only view of StructWithEmbedded.
typeStructWithEmbeddedView¶added inv1.42.0
type StructWithEmbeddedView struct {// contains filtered or unexported fields}StructWithEmbeddedView provides a read-only view over StructWithEmbedded.
Its methods should only be called if `Valid()` returns true.
func (StructWithEmbeddedView)A¶added inv1.42.0
func (vStructWithEmbeddedView) A()StructWithPtrsView
func (StructWithEmbeddedView)AsStruct¶added inv1.42.0
func (vStructWithEmbeddedView) AsStruct() *StructWithEmbedded
AsStruct returns a clone of the underlying value which aliases no memory withthe original.
func (StructWithEmbeddedView)MarshalJSON¶added inv1.42.0
func (vStructWithEmbeddedView) MarshalJSON() ([]byte,error)
MarshalJSON implementsjsonv1.Marshaler.
func (StructWithEmbeddedView)MarshalJSONTo¶added inv1.88.0
func (vStructWithEmbeddedView) MarshalJSONTo(enc *jsontext.Encoder)error
MarshalJSONTo implementsjsonv2.MarshalerTo.
func (StructWithEmbeddedView)StructWithSlices¶added inv1.42.0
func (vStructWithEmbeddedView) StructWithSlices()StructWithSlicesView
func (*StructWithEmbeddedView)UnmarshalJSON¶added inv1.42.0
func (v *StructWithEmbeddedView) UnmarshalJSON(b []byte)error
UnmarshalJSON implementsjsonv1.Unmarshaler.
func (*StructWithEmbeddedView)UnmarshalJSONFrom¶added inv1.88.0
func (v *StructWithEmbeddedView) UnmarshalJSONFrom(dec *jsontext.Decoder)error
UnmarshalJSONFrom implementsjsonv2.UnmarshalerFrom.
func (StructWithEmbeddedView)Valid¶added inv1.42.0
func (vStructWithEmbeddedView) Valid()bool
Valid reports whether v's underlying value is non-nil.
typeStructWithMapOfViews¶added inv1.92.0
type StructWithMapOfViews struct {MapOfViews map[string]StructWithoutPtrsView}func (*StructWithMapOfViews)Clone¶added inv1.92.0
func (src *StructWithMapOfViews) Clone() *StructWithMapOfViews
Clone makes a deep copy of StructWithMapOfViews.The result aliases no memory with the original.
func (*StructWithMapOfViews)View¶added inv1.92.0
func (p *StructWithMapOfViews) View()StructWithMapOfViewsView
View returns a read-only view of StructWithMapOfViews.
typeStructWithMapOfViewsView¶added inv1.92.0
type StructWithMapOfViewsView struct {// contains filtered or unexported fields}StructWithMapOfViewsView provides a read-only view over StructWithMapOfViews.
Its methods should only be called if `Valid()` returns true.
func (StructWithMapOfViewsView)AsStruct¶added inv1.92.0
func (vStructWithMapOfViewsView) AsStruct() *StructWithMapOfViews
AsStruct returns a clone of the underlying value which aliases no memory withthe original.
func (StructWithMapOfViewsView)MapOfViews¶added inv1.92.0
func (vStructWithMapOfViewsView) MapOfViews()views.Map[string,StructWithoutPtrsView]
func (StructWithMapOfViewsView)MarshalJSON¶added inv1.92.0
func (vStructWithMapOfViewsView) MarshalJSON() ([]byte,error)
MarshalJSON implementsjsonv1.Marshaler.
func (StructWithMapOfViewsView)MarshalJSONTo¶added inv1.92.0
func (vStructWithMapOfViewsView) MarshalJSONTo(enc *jsontext.Encoder)error
MarshalJSONTo implementsjsonv2.MarshalerTo.
func (*StructWithMapOfViewsView)UnmarshalJSON¶added inv1.92.0
func (v *StructWithMapOfViewsView) UnmarshalJSON(b []byte)error
UnmarshalJSON implementsjsonv1.Unmarshaler.
func (*StructWithMapOfViewsView)UnmarshalJSONFrom¶added inv1.92.0
func (v *StructWithMapOfViewsView) UnmarshalJSONFrom(dec *jsontext.Decoder)error
UnmarshalJSONFrom implementsjsonv2.UnmarshalerFrom.
func (StructWithMapOfViewsView)Valid¶added inv1.92.0
func (vStructWithMapOfViewsView) Valid()bool
Valid reports whether v's underlying value is non-nil.
typeStructWithNoView¶added inv1.80.0
type StructWithNoView struct {Valueint}typeStructWithPtrs¶
type StructWithPtrs struct {Value *StructWithoutPtrsInt *intNoView *StructWithNoViewNoCloneValue *StructWithoutPtrs `codegen:"noclone"`}func (*StructWithPtrs)Clone¶
func (src *StructWithPtrs) Clone() *StructWithPtrs
Clone makes a deep copy of StructWithPtrs.The result aliases no memory with the original.
func (*StructWithPtrs)Equal¶
func (v *StructWithPtrs) Equal(v2 *StructWithPtrs)bool
func (*StructWithPtrs)String¶
func (v *StructWithPtrs) String()string
func (*StructWithPtrs)View¶
func (p *StructWithPtrs) View()StructWithPtrsView
View returns a read-only view of StructWithPtrs.
typeStructWithPtrsAlias¶added inv1.74.0
type StructWithPtrsAlias =StructWithPtrs
typeStructWithPtrsAliasView¶added inv1.74.0
type StructWithPtrsAliasView =StructWithPtrsView
typeStructWithPtrsView¶
type StructWithPtrsView struct {// contains filtered or unexported fields}StructWithPtrsView provides a read-only view over StructWithPtrs.
Its methods should only be called if `Valid()` returns true.
func (StructWithPtrsView)AsStruct¶
func (vStructWithPtrsView) AsStruct() *StructWithPtrs
AsStruct returns a clone of the underlying value which aliases no memory withthe original.
func (StructWithPtrsView)Equal¶
func (vStructWithPtrsView) Equal(v2StructWithPtrsView)bool
func (StructWithPtrsView)Int¶
func (vStructWithPtrsView) Int()views.ValuePointer[int]
func (StructWithPtrsView)MarshalJSON¶
func (vStructWithPtrsView) MarshalJSON() ([]byte,error)
MarshalJSON implementsjsonv1.Marshaler.
func (StructWithPtrsView)MarshalJSONTo¶added inv1.88.0
func (vStructWithPtrsView) MarshalJSONTo(enc *jsontext.Encoder)error
MarshalJSONTo implementsjsonv2.MarshalerTo.
func (StructWithPtrsView)NoCloneValue¶
func (vStructWithPtrsView) NoCloneValue() *StructWithoutPtrs
func (StructWithPtrsView)NoView¶added inv1.80.0
func (vStructWithPtrsView) NoView()views.ValuePointer[StructWithNoView]
func (StructWithPtrsView)String¶
func (vStructWithPtrsView) String()string
func (*StructWithPtrsView)UnmarshalJSON¶
func (v *StructWithPtrsView) UnmarshalJSON(b []byte)error
UnmarshalJSON implementsjsonv1.Unmarshaler.
func (*StructWithPtrsView)UnmarshalJSONFrom¶added inv1.88.0
func (v *StructWithPtrsView) UnmarshalJSONFrom(dec *jsontext.Decoder)error
UnmarshalJSONFrom implementsjsonv2.UnmarshalerFrom.
func (StructWithPtrsView)Valid¶
func (vStructWithPtrsView) Valid()bool
Valid reports whether v's underlying value is non-nil.
func (StructWithPtrsView)Value¶
func (vStructWithPtrsView) Value()StructWithoutPtrsView
typeStructWithSlices¶
type StructWithSlices struct {Values []StructWithoutPtrsValuePointers []*StructWithoutPtrsStructPointers []*StructWithPtrsSlice []stringPrefixes []netip.PrefixData []byte// Unsupported views.Structs []StructWithPtrsInts []*int}func (*StructWithSlices)Clone¶
func (src *StructWithSlices) Clone() *StructWithSlices
Clone makes a deep copy of StructWithSlices.The result aliases no memory with the original.
func (*StructWithSlices)View¶
func (p *StructWithSlices) View()StructWithSlicesView
View returns a read-only view of StructWithSlices.
typeStructWithSlicesView¶
type StructWithSlicesView struct {// contains filtered or unexported fields}StructWithSlicesView provides a read-only view over StructWithSlices.
Its methods should only be called if `Valid()` returns true.
func (StructWithSlicesView)AsStruct¶
func (vStructWithSlicesView) AsStruct() *StructWithSlices
AsStruct returns a clone of the underlying value which aliases no memory withthe original.
func (StructWithSlicesView)Ints¶
func (vStructWithSlicesView) Ints() *int
func (StructWithSlicesView)MarshalJSON¶
func (vStructWithSlicesView) MarshalJSON() ([]byte,error)
MarshalJSON implementsjsonv1.Marshaler.
func (StructWithSlicesView)MarshalJSONTo¶added inv1.88.0
func (vStructWithSlicesView) MarshalJSONTo(enc *jsontext.Encoder)error
MarshalJSONTo implementsjsonv2.MarshalerTo.
func (StructWithSlicesView)Prefixes¶
func (vStructWithSlicesView) Prefixes()views.Slice[netip.Prefix]
func (StructWithSlicesView)StructPointers¶
func (vStructWithSlicesView) StructPointers()views.SliceView[*StructWithPtrs,StructWithPtrsView]
func (StructWithSlicesView)Structs¶
func (vStructWithSlicesView) Structs()StructWithPtrs
Unsupported views.
func (*StructWithSlicesView)UnmarshalJSON¶
func (v *StructWithSlicesView) UnmarshalJSON(b []byte)error
UnmarshalJSON implementsjsonv1.Unmarshaler.
func (*StructWithSlicesView)UnmarshalJSONFrom¶added inv1.88.0
func (v *StructWithSlicesView) UnmarshalJSONFrom(dec *jsontext.Decoder)error
UnmarshalJSONFrom implementsjsonv2.UnmarshalerFrom.
func (StructWithSlicesView)Valid¶
func (vStructWithSlicesView) Valid()bool
Valid reports whether v's underlying value is non-nil.
func (StructWithSlicesView)ValuePointers¶
func (vStructWithSlicesView) ValuePointers()views.SliceView[*StructWithoutPtrs,StructWithoutPtrsView]
func (StructWithSlicesView)Values¶
func (vStructWithSlicesView) Values()views.Slice[StructWithoutPtrs]
typeStructWithTypeAliasFields¶added inv1.74.0
type StructWithTypeAliasFields struct {WithPtrStructWithPtrsAliasWithoutPtrStructWithoutPtrsAliasWithPtrByPtr *StructWithPtrsAliasWithoutPtrByPtr *StructWithoutPtrsAliasSliceWithPtrs []*StructWithPtrsAliasSliceWithoutPtrs []*StructWithoutPtrsAliasMapWithPtrs map[string]*StructWithPtrsAliasMapWithoutPtrs map[string]*StructWithoutPtrsAliasMapOfSlicesWithPtrs map[string][]*StructWithPtrsAliasMapOfSlicesWithoutPtrs map[string][]*StructWithoutPtrsAlias}func (*StructWithTypeAliasFields)Clone¶added inv1.74.0
func (src *StructWithTypeAliasFields) Clone() *StructWithTypeAliasFields
Clone makes a deep copy of StructWithTypeAliasFields.The result aliases no memory with the original.
func (*StructWithTypeAliasFields)View¶added inv1.74.0
func (p *StructWithTypeAliasFields) View()StructWithTypeAliasFieldsView
View returns a read-only view of StructWithTypeAliasFields.
typeStructWithTypeAliasFieldsView¶added inv1.74.0
type StructWithTypeAliasFieldsView struct {// contains filtered or unexported fields}StructWithTypeAliasFieldsView provides a read-only view over StructWithTypeAliasFields.
Its methods should only be called if `Valid()` returns true.
func (StructWithTypeAliasFieldsView)AsStruct¶added inv1.74.0
func (vStructWithTypeAliasFieldsView) AsStruct() *StructWithTypeAliasFields
AsStruct returns a clone of the underlying value which aliases no memory withthe original.
func (StructWithTypeAliasFieldsView)MapOfSlicesWithPtrs¶added inv1.74.0
func (vStructWithTypeAliasFieldsView) MapOfSlicesWithPtrs()views.MapFn[string, []*StructWithPtrsAlias,views.SliceView[*StructWithPtrsAlias,StructWithPtrsAliasView]]
func (StructWithTypeAliasFieldsView)MapOfSlicesWithoutPtrs¶added inv1.74.0
func (vStructWithTypeAliasFieldsView) MapOfSlicesWithoutPtrs()views.MapFn[string, []*StructWithoutPtrsAlias,views.SliceView[*StructWithoutPtrsAlias,StructWithoutPtrsAliasView]]
func (StructWithTypeAliasFieldsView)MapWithPtrs¶added inv1.74.0
func (vStructWithTypeAliasFieldsView) MapWithPtrs()views.MapFn[string, *StructWithPtrsAlias,StructWithPtrsAliasView]
func (StructWithTypeAliasFieldsView)MapWithoutPtrs¶added inv1.74.0
func (vStructWithTypeAliasFieldsView) MapWithoutPtrs()views.MapFn[string, *StructWithoutPtrsAlias,StructWithoutPtrsAliasView]
func (StructWithTypeAliasFieldsView)MarshalJSON¶added inv1.74.0
func (vStructWithTypeAliasFieldsView) MarshalJSON() ([]byte,error)
MarshalJSON implementsjsonv1.Marshaler.
func (StructWithTypeAliasFieldsView)MarshalJSONTo¶added inv1.88.0
func (vStructWithTypeAliasFieldsView) MarshalJSONTo(enc *jsontext.Encoder)error
MarshalJSONTo implementsjsonv2.MarshalerTo.
func (StructWithTypeAliasFieldsView)SliceWithPtrs¶added inv1.74.0
func (vStructWithTypeAliasFieldsView) SliceWithPtrs()views.SliceView[*StructWithPtrsAlias,StructWithPtrsAliasView]
func (StructWithTypeAliasFieldsView)SliceWithoutPtrs¶added inv1.74.0
func (vStructWithTypeAliasFieldsView) SliceWithoutPtrs()views.SliceView[*StructWithoutPtrsAlias,StructWithoutPtrsAliasView]
func (*StructWithTypeAliasFieldsView)UnmarshalJSON¶added inv1.74.0
func (v *StructWithTypeAliasFieldsView) UnmarshalJSON(b []byte)error
UnmarshalJSON implementsjsonv1.Unmarshaler.
func (*StructWithTypeAliasFieldsView)UnmarshalJSONFrom¶added inv1.88.0
func (v *StructWithTypeAliasFieldsView) UnmarshalJSONFrom(dec *jsontext.Decoder)error
UnmarshalJSONFrom implementsjsonv2.UnmarshalerFrom.
func (StructWithTypeAliasFieldsView)Valid¶added inv1.74.0
func (vStructWithTypeAliasFieldsView) Valid()bool
Valid reports whether v's underlying value is non-nil.
func (StructWithTypeAliasFieldsView)WithPtr¶added inv1.74.0
func (vStructWithTypeAliasFieldsView) WithPtr()StructWithPtrsAliasView
func (StructWithTypeAliasFieldsView)WithPtrByPtr¶added inv1.74.0
func (vStructWithTypeAliasFieldsView) WithPtrByPtr()StructWithPtrsAliasView
func (StructWithTypeAliasFieldsView)WithoutPtr¶added inv1.74.0
func (vStructWithTypeAliasFieldsView) WithoutPtr()StructWithoutPtrsAlias
func (StructWithTypeAliasFieldsView)WithoutPtrByPtr¶added inv1.74.0
func (vStructWithTypeAliasFieldsView) WithoutPtrByPtr()StructWithoutPtrsAliasView
typeStructWithoutPtrs¶
func (*StructWithoutPtrs)Clone¶
func (src *StructWithoutPtrs) Clone() *StructWithoutPtrs
Clone makes a deep copy of StructWithoutPtrs.The result aliases no memory with the original.
func (*StructWithoutPtrs)View¶
func (p *StructWithoutPtrs) View()StructWithoutPtrsView
View returns a read-only view of StructWithoutPtrs.
typeStructWithoutPtrsAlias¶added inv1.74.0
type StructWithoutPtrsAlias =StructWithoutPtrs
typeStructWithoutPtrsAliasView¶added inv1.74.0
type StructWithoutPtrsAliasView =StructWithoutPtrsView
typeStructWithoutPtrsView¶
type StructWithoutPtrsView struct {// contains filtered or unexported fields}StructWithoutPtrsView provides a read-only view over StructWithoutPtrs.
Its methods should only be called if `Valid()` returns true.
func (StructWithoutPtrsView)AsStruct¶
func (vStructWithoutPtrsView) AsStruct() *StructWithoutPtrs
AsStruct returns a clone of the underlying value which aliases no memory withthe original.
func (StructWithoutPtrsView)Int¶
func (vStructWithoutPtrsView) Int()int
func (StructWithoutPtrsView)MarshalJSON¶
func (vStructWithoutPtrsView) MarshalJSON() ([]byte,error)
MarshalJSON implementsjsonv1.Marshaler.
func (StructWithoutPtrsView)MarshalJSONTo¶added inv1.88.0
func (vStructWithoutPtrsView) MarshalJSONTo(enc *jsontext.Encoder)error
MarshalJSONTo implementsjsonv2.MarshalerTo.
func (StructWithoutPtrsView)Pfx¶
func (vStructWithoutPtrsView) Pfx()netip.Prefix
func (*StructWithoutPtrsView)UnmarshalJSON¶
func (v *StructWithoutPtrsView) UnmarshalJSON(b []byte)error
UnmarshalJSON implementsjsonv1.Unmarshaler.
func (*StructWithoutPtrsView)UnmarshalJSONFrom¶added inv1.88.0
func (v *StructWithoutPtrsView) UnmarshalJSONFrom(dec *jsontext.Decoder)error
UnmarshalJSONFrom implementsjsonv2.UnmarshalerFrom.
func (StructWithoutPtrsView)Valid¶
func (vStructWithoutPtrsView) Valid()bool
Valid reports whether v's underlying value is non-nil.