Protocols

The following protocols are available globally.

  • A Deque is a data structure comprised of two queues. This implementation has a front queue, which is reversed, and a back queue, which is not. Operations at either end of the Deque have the same complexity as operations on the end of either queue.

    Three structs conform to the DequeType protocol: Deque, DequeSlice, and ContiguousDeque. These correspond to the standard library array types.

    See more

    Declaration

    Swift

    public protocol DequeType :
      MutableSliceable,
      RangeReplaceableCollectionType,
      CustomDebugStringConvertible,
      ArrayLiteralConvertible
  • Conforming types should have efficient remove, insert, and contains methods. Conforming types get set-like methods - union, etc.

    See more

    Declaration

    Swift

    public protocol SetType : SequenceType