Skip to content

EntityIdentifier

ctreffs edited this page Oct 7, 2020 · 5 revisions

EntityIdentifier

EntityIdentifier

public struct EntityIdentifier

An entity identifier represents the unique identity of an entity.

Inheritance

ExpressibleByIntegerLiteral, RawRepresentable

Nested Type Aliases

Identifier

Entity identifier type.

public typealias Identifier = UInt32

Provides 4294967295 unique identifiers.

Initializers

init(_:)

@inlinable public init(_ id: Identifier)

init(rawValue:)

@inlinable public init(rawValue: Identifier)

init(integerLiteral:)

public init(integerLiteral value: Identifier)

Properties

id

The entity identifier.

let id: Identifier

rawValue

The entity identifier represented as a raw value.

var rawValue: Identifier

invalid

Invalid entity identifier

let invalid

Used to represent an invalid entity identifier.

index

Provides the entity identifier as an index

var index: Int

This is a convenience property for collection indexing and does not represent the raw identifier.

Use id or rawValue instead.

Clone this wiki locally