gtype
13 分钟阅读
原文:https://pkg.go.dev/github.com/gogf/gf/v2@v2.6.4/container/gtype
Package gtype provides high performance and concurrent-safe basic variable types.
软件包 gtype 提供高性能和并发安全的基本变量类型。
常量
This section is empty.
变量
This section is empty.
函数
This section is empty.
类型
type Bool
| |
Bool is a struct for concurrent-safe operation for type bool.
Bool 是用于 bool 类型并发安全操作的结构。
func NewBool
| |
NewBool creates and returns a concurrent-safe object for bool type, with given initial value value.
NewBool 创建并返回一个 bool 类型的并发安全对象,其初始值 value 为 。
(*Bool) Cas
| |
Cas executes the compare-and-swap operation for value.
Cas 执行值的比较和交换操作。
(*Bool) Clone
| |
Clone clones and returns a new concurrent-safe object for bool type.
克隆克隆并返回 bool 类型的新并发安全对象。
(*Bool) DeepCopy
| |
DeepCopy implements interface for deep copy of current type.
DeepCopy实现了当前类型的深度拷贝接口。
(Bool) MarshalJSON
| |
MarshalJSON implements the interface MarshalJSON for json.Marshal.
MarshalJSON 实现 json 的接口 MarshalJSON。元帅。
(*Bool) Set
| |
Set atomically stores value into t.value and returns the previous value of t.value.
设置以原子方式存储 value 到 t.value 中,并返回 t.value 的上一个值。
(*Bool) String
| |
String implements String interface for string printing.
String 实现用于字符串打印的 String 接口。
(*Bool) UnmarshalJSON
| |
UnmarshalJSON implements the interface UnmarshalJSON for json.Unmarshal.
UnmarshalJSON 实现 json 的接口 UnmarshalJSON。元帅。
(*Bool) UnmarshalValue
| |
UnmarshalValue is an interface implement which sets any type of value for v.
UnmarshalValue 是一个接口实现,它为 v .
(*Bool) Val
| |
Val atomically loads and returns t.value.
Val 以原子方式加载并返回 t.value。
type Byte
| |
Byte is a struct for concurrent-safe operation for type byte.
Byte 是用于类型 byte 的并发安全操作的结构。
func NewByte
| |
NewByte creates and returns a concurrent-safe object for byte type, with given initial value value.
NewByte 创建并返回字节类型的并发安全对象,其初始值 value 为 。
(*Byte) Add
| |
Add atomically adds delta to t.value and returns the new value.
以原子方式添加 delta to t.value 并返回新值。
(*Byte) Cas
| |
Cas executes the compare-and-swap operation for value.
Cas 执行值的比较和交换操作。
(*Byte) Clone
| |
Clone clones and returns a new concurrent-safe object for byte type.
克隆克隆并返回字节类型的新并发安全对象。
(*Byte) DeepCopy
| |
DeepCopy implements interface for deep copy of current type.
DeepCopy实现了当前类型的深度拷贝接口。
(Byte) MarshalJSON
| |
MarshalJSON implements the interface MarshalJSON for json.Marshal.
MarshalJSON 实现 json 的接口 MarshalJSON。元帅。
(*Byte) Set
| |
Set atomically stores value into t.value and returns the previous value of t.value.
设置以原子方式存储 value 到 t.value 中,并返回 t.value 的上一个值。
(*Byte) String
| |
String implements String interface for string printing.
String 实现用于字符串打印的 String 接口。
(*Byte) UnmarshalJSON
| |
UnmarshalJSON implements the interface UnmarshalJSON for json.Unmarshal.
UnmarshalJSON 实现 json 的接口 UnmarshalJSON。元帅。
(*Byte) UnmarshalValue
| |
UnmarshalValue is an interface implement which sets any type of value for v.
UnmarshalValue 是一个接口实现,它为 v .
(*Byte) Val
| |
Val atomically loads and returns t.value.
Val 以原子方式加载并返回 t.value。
type Bytes
| |
Bytes is a struct for concurrent-safe operation for type []byte.
Bytes 是用于 []byte 类型的并发安全操作的结构。
func NewBytes
| |
NewBytes creates and returns a concurrent-safe object for []byte type, with given initial value value.
NewBytes 为 []byte 类型创建并返回一个并发安全对象,其初始值 value 为 。
(*Bytes) Clone
| |
Clone clones and returns a new shallow copy object for []byte type.
克隆克隆并返回 []byte 类型的新浅层复制对象。
(*Bytes) DeepCopy
| |
DeepCopy implements interface for deep copy of current type.
DeepCopy实现了当前类型的深度拷贝接口。
(Bytes) MarshalJSON
| |
MarshalJSON implements the interface MarshalJSON for json.Marshal.
MarshalJSON 实现 json 的接口 MarshalJSON。元帅。
(*Bytes) Set
| |
Set atomically stores value into t.value and returns the previous value of t.value. Note: The parameter value cannot be nil.
设置以原子方式存储 value 到 t.value 中,并返回 t.value 的上一个值。注意:该参数 value 不能为零。
(*Bytes) String
| |
String implements String interface for string printing.
String 实现用于字符串打印的 String 接口。
(*Bytes) UnmarshalJSON
| |
UnmarshalJSON implements the interface UnmarshalJSON for json.Unmarshal.
UnmarshalJSON 实现 json 的接口 UnmarshalJSON。元帅。
(*Bytes) UnmarshalValue
| |
UnmarshalValue is an interface implement which sets any type of value for v.
UnmarshalValue 是一个接口实现,它为 v .
(*Bytes) Val
| |
Val atomically loads and returns t.value.
Val 以原子方式加载并返回 t.value。
type Float32
| |
Float32 is a struct for concurrent-safe operation for type float32.
float32 是用于 float32 类型的并发安全操作的结构。
func NewFloat32
| |
NewFloat32 creates and returns a concurrent-safe object for float32 type, with given initial value value.
NewFloat32 为 float32 类型创建并返回一个并发安全对象,该对象具有给定的初始值 value 。
(*Float32) Add
| |
Add atomically adds delta to t.value and returns the new value.
以原子方式添加 delta to t.value 并返回新值。
(*Float32) Cas
| |
Cas executes the compare-and-swap operation for value.
Cas 执行值的比较和交换操作。
(*Float32) Clone
| |
Clone clones and returns a new concurrent-safe object for float32 type.
克隆克隆并返回 float32 类型的新并发安全对象。
(*Float32) DeepCopy
| |
DeepCopy implements interface for deep copy of current type.
DeepCopy实现了当前类型的深度拷贝接口。
(Float32) MarshalJSON
| |
MarshalJSON implements the interface MarshalJSON for json.Marshal.
MarshalJSON 实现 json 的接口 MarshalJSON。元帅。
(*Float32) Set
| |
Set atomically stores value into t.value and returns the previous value of t.value.
设置以原子方式存储 value 到 t.value 中,并返回 t.value 的上一个值。
(*Float32) String
| |
String implements String interface for string printing.
String 实现用于字符串打印的 String 接口。
(*Float32) UnmarshalJSON
| |
UnmarshalJSON implements the interface UnmarshalJSON for json.Unmarshal.
UnmarshalJSON 实现 json 的接口 UnmarshalJSON。元帅。
(*Float32) UnmarshalValue
| |
UnmarshalValue is an interface implement which sets any type of value for v.
UnmarshalValue 是一个接口实现,它为 v .
(*Float32) Val
| |
Val atomically loads and returns t.value.
Val 以原子方式加载并返回 t.value。
type Float64
| |
Float64 is a struct for concurrent-safe operation for type float64.
float64 是用于 float64 类型的并发安全操作的结构。
func NewFloat64
| |
NewFloat64 creates and returns a concurrent-safe object for float64 type, with given initial value value.
NewFloat64 为 float64 类型创建并返回一个并发安全对象,该对象具有给定的初始值 value 。
(*Float64) Add
| |
Add atomically adds delta to t.value and returns the new value.
以原子方式添加 delta to t.value 并返回新值。
(*Float64) Cas
| |
Cas executes the compare-and-swap operation for value.
Cas 执行值的比较和交换操作。
(*Float64) Clone
| |
Clone clones and returns a new concurrent-safe object for float64 type.
克隆克隆并返回 float64 类型的新并发安全对象。
(*Float64) DeepCopy
| |
DeepCopy implements interface for deep copy of current type.
DeepCopy实现了当前类型的深度拷贝接口。
(Float64) MarshalJSON
| |
MarshalJSON implements the interface MarshalJSON for json.Marshal.
MarshalJSON 实现 json 的接口 MarshalJSON。元帅。
(*Float64) Set
| |
Set atomically stores value into t.value and returns the previous value of t.value.
设置以原子方式存储 value 到 t.value 中,并返回 t.value 的上一个值。
(*Float64) String
| |
String implements String interface for string printing.
String 实现用于字符串打印的 String 接口。
(*Float64) UnmarshalJSON
| |
UnmarshalJSON implements the interface UnmarshalJSON for json.Unmarshal.
UnmarshalJSON 实现 json 的接口 UnmarshalJSON。元帅。
(*Float64) UnmarshalValue
| |
UnmarshalValue is an interface implement which sets any type of value for v.
UnmarshalValue 是一个接口实现,它为 v .
(*Float64) Val
| |
Val atomically loads and returns t.value.
Val 以原子方式加载并返回 t.value。
type Int
| |
Int is a struct for concurrent-safe operation for type int.
Int 是用于 int 类型的并发安全操作的结构。
func NewInt
| |
NewInt creates and returns a concurrent-safe object for int type, with given initial value value.
NewInt 创建并返回 int 类型的并发安全对象,其初始值 value 为 。
(*Int) Add
| |
Add atomically adds delta to t.value and returns the new value.
以原子方式添加 delta to t.value 并返回新值。
(*Int) Cas
| |
Cas executes the compare-and-swap operation for value.
Cas 执行值的比较和交换操作。
(*Int) Clone
| |
Clone clones and returns a new concurrent-safe object for int type.
克隆克隆并返回 int 类型的新并发安全对象。
(*Int) DeepCopy
| |
DeepCopy implements interface for deep copy of current type.
DeepCopy实现了当前类型的深度拷贝接口。
(Int) MarshalJSON
| |
MarshalJSON implements the interface MarshalJSON for json.Marshal.
MarshalJSON 实现 json 的接口 MarshalJSON。元帅。
(*Int) Set
| |
Set atomically stores value into t.value and returns the previous value of t.value.
设置以原子方式存储 value 到 t.value 中,并返回 t.value 的上一个值。
(*Int) String
| |
String implements String interface for string printing.
String 实现用于字符串打印的 String 接口。
(*Int) UnmarshalJSON
| |
UnmarshalJSON implements the interface UnmarshalJSON for json.Unmarshal.
UnmarshalJSON 实现 json 的接口 UnmarshalJSON。元帅。
(*Int) UnmarshalValue
| |
UnmarshalValue is an interface implement which sets any type of value for v.
UnmarshalValue 是一个接口实现,它为 v .
(*Int) Val
| |
Val atomically loads and returns t.value.
Val 以原子方式加载并返回 t.value。
type Int32
| |
Int32 is a struct for concurrent-safe operation for type int32.
Int32 是用于 int32 类型的并发安全操作的结构。
func NewInt32
| |
NewInt32 creates and returns a concurrent-safe object for int32 type, with given initial value value.
NewInt32 创建并返回 int32 类型的并发安全对象,其初始值 value 为 。
(*Int32) Add
| |
Add atomically adds delta to t.value and returns the new value.
以原子方式添加 delta to t.value 并返回新值。
(*Int32) Cas
| |
Cas executes the compare-and-swap operation for value.
Cas 执行值的比较和交换操作。
(*Int32) Clone
| |
Clone clones and returns a new concurrent-safe object for int32 type.
克隆克隆并返回 int32 类型的新并发安全对象。
(*Int32) DeepCopy
| |
DeepCopy implements interface for deep copy of current type.
DeepCopy实现了当前类型的深度拷贝接口。
(Int32) MarshalJSON
| |
MarshalJSON implements the interface MarshalJSON for json.Marshal.
MarshalJSON 实现 json 的接口 MarshalJSON。元帅。
(*Int32) Set
| |
Set atomically stores value into t.value and returns the previous value of t.value.
设置以原子方式存储 value 到 t.value 中,并返回 t.value 的上一个值。
(*Int32) String
| |
String implements String interface for string printing.
String 实现用于字符串打印的 String 接口。
(*Int32) UnmarshalJSON
| |
UnmarshalJSON implements the interface UnmarshalJSON for json.Unmarshal.
UnmarshalJSON 实现 json 的接口 UnmarshalJSON。元帅。
(*Int32) UnmarshalValue
| |
UnmarshalValue is an interface implement which sets any type of value for v.
UnmarshalValue 是一个接口实现,它为 v .
(*Int32) Val
| |
Val atomically loads and returns t.value.
Val 以原子方式加载并返回 t.value。
type Int64
| |
Int64 is a struct for concurrent-safe operation for type int64.
Int64 是用于 int64 类型的并发安全操作的结构。
func NewInt64
| |
NewInt64 creates and returns a concurrent-safe object for int64 type, with given initial value value.
NewInt64 创建并返回 int64 类型的并发安全对象,其初始值 value 为 。
(*Int64) Add
| |
Add atomically adds delta to t.value and returns the new value.
以原子方式添加 delta to t.value 并返回新值。
(*Int64) Cas
| |
Cas executes the compare-and-swap operation for value.
Cas 执行值的比较和交换操作。
(*Int64) Clone
| |
Clone clones and returns a new concurrent-safe object for int64 type.
克隆克隆并返回 int64 类型的新并发安全对象。
(*Int64) DeepCopy
| |
DeepCopy implements interface for deep copy of current type.
DeepCopy实现了当前类型的深度拷贝接口。
(Int64) MarshalJSON
| |
MarshalJSON implements the interface MarshalJSON for json.Marshal.
MarshalJSON 实现 json 的接口 MarshalJSON。元帅。
(*Int64) Set
| |
Set atomically stores value into t.value and returns the previous value of t.value.
设置以原子方式存储 value 到 t.value 中,并返回 t.value 的上一个值。
(*Int64) String
| |
String implements String interface for string printing.
String 实现用于字符串打印的 String 接口。
(*Int64) UnmarshalJSON
| |
UnmarshalJSON implements the interface UnmarshalJSON for json.Unmarshal.
UnmarshalJSON 实现 json 的接口 UnmarshalJSON。元帅。
(*Int64) UnmarshalValue
| |
UnmarshalValue is an interface implement which sets any type of value for v.
UnmarshalValue 是一个接口实现,它为 v .
(*Int64) Val
| |
Val atomically loads and returns t.value.
Val 以原子方式加载并返回 t.value。
type Interface
| |
Interface is a struct for concurrent-safe operation for type interface{}.
interface 是 interface{} 类型的并发安全操作的结构。
func New
| |
New is alias of NewInterface. See NewInterface.
New 是 NewInterface 的别名。请参阅 NewInterface。
func NewInterface
| |
NewInterface creates and returns a concurrent-safe object for interface{} type, with given initial value value.
NewInterface 为 interface{} 类型创建并返回一个并发安全对象,该对象具有给定的初始值 value 。
(*Interface) Clone
| |
Clone clones and returns a new concurrent-safe object for interface{} type.
克隆克隆并返回 interface{} 类型的新并发安全对象。
(*Interface) DeepCopy
| |
DeepCopy implements interface for deep copy of current type.
DeepCopy实现了当前类型的深度拷贝接口。
(Interface) MarshalJSON
| |
MarshalJSON implements the interface MarshalJSON for json.Marshal.
MarshalJSON 实现 json 的接口 MarshalJSON。元帅。
(*Interface) Set
| |
Set atomically stores value into t.value and returns the previous value of t.value. Note: The parameter value cannot be nil.
设置以原子方式存储 value 到 t.value 中,并返回 t.value 的上一个值。注意:该参数 value 不能为零。
(*Interface) String
| |
String implements String interface for string printing.
String 实现用于字符串打印的 String 接口。
(*Interface) UnmarshalJSON
| |
UnmarshalJSON implements the interface UnmarshalJSON for json.Unmarshal.
UnmarshalJSON 实现 json 的接口 UnmarshalJSON。元帅。
(*Interface) UnmarshalValue
| |
UnmarshalValue is an interface implement which sets any type of value for v.
UnmarshalValue 是一个接口实现,它为 v .
(*Interface) Val
| |
Val atomically loads and returns t.value.
Val 以原子方式加载并返回 t.value。
type String
| |
String is a struct for concurrent-safe operation for type string.
String 是用于字符串类型并发安全操作的结构。
func NewString
| |
NewString creates and returns a concurrent-safe object for string type, with given initial value value.
NewString 创建并返回字符串类型的并发安全对象,该对象具有给定的初始值 value 。
(*String) Clone
| |
Clone clones and returns a new concurrent-safe object for string type.
克隆克隆并返回字符串类型的新并发安全对象。
(*String) DeepCopy
| |
DeepCopy implements interface for deep copy of current type.
DeepCopy实现了当前类型的深度拷贝接口。
(String) MarshalJSON
| |
MarshalJSON implements the interface MarshalJSON for json.Marshal.
MarshalJSON 实现 json 的接口 MarshalJSON。元帅。
(*String) Set
| |
Set atomically stores value into t.value and returns the previous value of t.value.
设置以原子方式存储 value 到 t.value 中,并返回 t.value 的上一个值。
(*String) String
| |
String implements String interface for string printing.
String 实现用于字符串打印的 String 接口。
(*String) UnmarshalJSON
| |
UnmarshalJSON implements the interface UnmarshalJSON for json.Unmarshal.
UnmarshalJSON 实现 json 的接口 UnmarshalJSON。元帅。
(*String) UnmarshalValue
| |
UnmarshalValue is an interface implement which sets any type of value for v.
UnmarshalValue 是一个接口实现,它为 v .
(*String) Val
| |
Val atomically loads and returns t.value.
Val 以原子方式加载并返回 t.value。
type Uint
| |
Uint is a struct for concurrent-safe operation for type uint.
Uint 是用于 uint 类型并发安全操作的结构。
func NewUint
| |
NewUint creates and returns a concurrent-safe object for uint type, with given initial value value.
NewUint 为 uint 类型创建并返回一个并发安全对象,该对象具有给定的初始值 value 。
(*Uint) Add
| |
Add atomically adds delta to t.value and returns the new value.
以原子方式添加 delta to t.value 并返回新值。
(*Uint) Cas
| |
Cas executes the compare-and-swap operation for value.
Cas 执行值的比较和交换操作。
(*Uint) Clone
| |
Clone clones and returns a new concurrent-safe object for uint type.
克隆克隆并返回 uint 类型的新并发安全对象。
(*Uint) DeepCopy
| |
DeepCopy implements interface for deep copy of current type.
DeepCopy实现了当前类型的深度拷贝接口。
(Uint) MarshalJSON
| |
MarshalJSON implements the interface MarshalJSON for json.Marshal.
MarshalJSON 实现 json 的接口 MarshalJSON。元帅。
(*Uint) Set
| |
Set atomically stores value into t.value and returns the previous value of t.value.
设置以原子方式存储 value 到 t.value 中,并返回 t.value 的上一个值。
(*Uint) String
| |
String implements String interface for string printing.
String 实现用于字符串打印的 String 接口。
(*Uint) UnmarshalJSON
| |
UnmarshalJSON implements the interface UnmarshalJSON for json.Unmarshal.
UnmarshalJSON 实现 json 的接口 UnmarshalJSON。元帅。
(*Uint) UnmarshalValue
| |
UnmarshalValue is an interface implement which sets any type of value for v.
UnmarshalValue 是一个接口实现,它为 v .
(*Uint) Val
| |
Val atomically loads and returns t.value.
Val 以原子方式加载并返回 t.value。
type Uint32
| |
Uint32 is a struct for concurrent-safe operation for type uint32.
Uint32 是用于 uint32 类型的并发安全操作的结构。
func NewUint32
| |
NewUint32 creates and returns a concurrent-safe object for uint32 type, with given initial value value.
NewUint32 为 uint32 类型创建并返回一个并发安全对象,该对象具有给定的初始值 value 。
(*Uint32) Add
| |
Add atomically adds delta to t.value and returns the new value.
以原子方式添加 delta to t.value 并返回新值。
(*Uint32) Cas
| |
Cas executes the compare-and-swap operation for value.
Cas 执行值的比较和交换操作。
(*Uint32) Clone
| |
Clone clones and returns a new concurrent-safe object for uint32 type.
克隆克隆并返回 uint32 类型的新并发安全对象。
(*Uint32) DeepCopy
| |
DeepCopy implements interface for deep copy of current type.
DeepCopy实现了当前类型的深度拷贝接口。
(Uint32) MarshalJSON
| |
MarshalJSON implements the interface MarshalJSON for json.Marshal.
MarshalJSON 实现 json 的接口 MarshalJSON。元帅。
(*Uint32) Set
| |
Set atomically stores value into t.value and returns the previous value of t.value.
设置以原子方式存储 value 到 t.value 中,并返回 t.value 的上一个值。
(*Uint32) String
| |
String implements String interface for string printing.
String 实现用于字符串打印的 String 接口。
(*Uint32) UnmarshalJSON
| |
UnmarshalJSON implements the interface UnmarshalJSON for json.Unmarshal.
UnmarshalJSON 实现 json 的接口 UnmarshalJSON。元帅。
(*Uint32) UnmarshalValue
| |
UnmarshalValue is an interface implement which sets any type of value for v.
UnmarshalValue 是一个接口实现,它为 v .
(*Uint32) Val
| |
Val atomically loads and returns t.value.
Val 以原子方式加载并返回 t.value。
type Uint64
| |
Uint64 is a struct for concurrent-safe operation for type uint64.
Uint64 是用于 uint64 类型的并发安全操作的结构。
func NewUint64
| |
NewUint64 creates and returns a concurrent-safe object for uint64 type, with given initial value value.
NewUint64 为 uint64 类型创建并返回一个并发安全对象,该对象具有给定的初始值 value 。
(*Uint64) Add
| |
Add atomically adds delta to t.value and returns the new value.
以原子方式添加 delta to t.value 并返回新值。
(*Uint64) Cas
| |
Cas executes the compare-and-swap operation for value.
Cas 执行值的比较和交换操作。
(*Uint64) Clone
| |
Clone clones and returns a new concurrent-safe object for uint64 type.
克隆克隆并返回 uint64 类型的新并发安全对象。
(*Uint64) DeepCopy
| |
DeepCopy implements interface for deep copy of current type.
DeepCopy实现了当前类型的深度拷贝接口。
(Uint64) MarshalJSON
| |
MarshalJSON implements the interface MarshalJSON for json.Marshal.
MarshalJSON 实现 json 的接口 MarshalJSON。元帅。
(*Uint64) Set
| |
Set atomically stores value into t.value and returns the previous value of t.value.
设置以原子方式存储 value 到 t.value 中,并返回 t.value 的上一个值。
(*Uint64) String
| |
String implements String interface for string printing.
String 实现用于字符串打印的 String 接口。
(*Uint64) UnmarshalJSON
| |
UnmarshalJSON implements the interface UnmarshalJSON for json.Unmarshal.
UnmarshalJSON 实现 json 的接口 UnmarshalJSON。元帅。
(*Uint64) UnmarshalValue
| |
UnmarshalValue is an interface implement which sets any type of value for v.
UnmarshalValue 是一个接口实现,它为 v .
(*Uint64) Val
| |
Val atomically loads and returns t.value.
Val 以原子方式加载并返回 t.value。