EntityId
public struct EntityId<R> : IdBase, Hashable where R : EntityInspectable, R : __EntityRelatable
extension EntityId: ExpressibleByIntegerLiteral
extension EntityId: CustomStringConvertible
Object identifier type.
Object identifiers are wrappers for Id values which are UInt64. These are used for persisted objects.
Identifiers are assigned by the framework automatically when you call Box.put.
A value of 0 indicates the object hasn’t been persisted, yet.
-
Numerical value of the ID.
Declaration
Swift
public let value: Id -
Initializer required by IdBase (but also a convenient short-hand).
Declaration
Swift
public init(_ identifier: Id) -
The hash value.
- Discussion: Hash values are not guaranteed to be equal across different executions of your program. Do not save hash values to use during a future execution.
Declaration
Swift
public func hash(into hasher: inout Hasher)
-
Initializer to use integer literals directly, as in:
var id: EntityId
= 123 Declaration
Swift
public init(integerLiteral value: Id)Parameters
valueThe integer value.
-
A textual representation of this instance.
Declaration
Swift
public var description: String { get }
View on GitHub
Install in Dash
EntityId Structure Reference