Optional

enum Optional<Wrapped> : ExpressibleByNilLiteral
  • The content value is the unwrapped value or the empty value if none

    Declaration

    Swift

    var content: Wrapped
  • A Boolean value indicating whether the collection is empty.

    Declaration

    Swift

    public var isEmpty: Bool
  • The number of elements in the collection

    Declaration

    Swift

    public var count: Int
  • The first element of the collection

    Declaration

    Swift

    public var first: Wrapped.Element?