UInt16

extension UInt16: Identifier

Extends UInt16 to comply to the Identifier protocol.

Usage Example:

 // The Identifier used in the Id field could be an `UInt16`.
 public typealias IdentifierCodableClosure<Id: Identifier, I: Codable, O: Codable> = (Id, I, @escaping CodableResultClosure<O>) -> Void
  • Creates an unsigned integer identifier from a given string representation.

    Throws

    An IdentifierError.invalidValue if the given string cannot be converted to an unsigned integer.

    Declaration

    Swift

    public init(value: String) throws
  • The string representation of the identifier.

    Declaration

    Swift

    public var value: String { get }