struct EventId
cangjie
public struct EventId <: Equatable<EventId> & Hashable功能:表示日志事件标识。
父类型:
- Equatable<EventId>
Hashable
成员概览
| 成员 | 功能 |
|---|---|
| init(Int64) | 使用事件编号创建事件标识。 |
| init(Int64, ?String) | 使用事件编号和名称创建事件标识。 |
| prop id | 获取事件编号。 |
| prop name | 获取事件名称。 |
| func hashCode() | 返回事件标识的哈希值。 |
| func ==(EventId) | 比较两个事件标识是否相等。 |
init(Int64)
cangjie
public init(id: Int64)功能:使用事件编号创建事件标识。
参数:
- id:
Int64- 事件编号。
init(Int64, ?String)
cangjie
public init(id: Int64, name: ?String)功能:使用事件编号和名称创建事件标识。
参数:
- id:
Int64- 事件编号。 - name:
?String- 事件名称。
prop id
cangjie
public prop id: Int64功能:获取事件编号。
类型:Int64
prop name
cangjie
public prop name: ?String功能:获取事件名称。
类型:?String
func hashCode()
cangjie
public func hashCode()功能:返回事件标识的哈希值。
返回值:
Unit- 返回基于事件编号计算得到的哈希值。
func ==(EventId)
cangjie
public operator func ==(that: EventId)功能:比较两个事件标识是否相等。
参数:
- that: EventId - 要比较的另一个事件标识。
返回值:
Unit- 当两个事件编号相同时返回true,否则返回false。