DeviceId

open class DeviceId : DeviceIdProtocol, @unchecked Sendable
extension DeviceId: Equatable
extension DeviceId: Hashable

A Device ID.

  • New device id from an unsigned 64-bit integer.

    Declaration

    Swift

    public convenience init(id: UInt64)
  • Construct a DeviceId from 8 bytes encoded as a hex string.

    Declaration

    Swift

    public static func fromHexString(hexString: String) throws -> DeviceId
  • Encode the DeviceId as a 16-character lowercase hex string, with leading 0s.

    Declaration

    Swift

    open func toHexString() -> String
  • Get the number corresponding to this DeviceId.

    Declaration

    Swift

    open func toU64() -> UInt64
  • Declaration

    Swift

    public static func == (self: DeviceId, other: DeviceId) -> Bool
  • Declaration

    Swift

    open func hash(into hasher: inout Hasher)