EquatableWrapper

@propertyWrapper
public struct EquatableWrapper<T> : Equatable

Wrapper to provide equatable conformance to Apple objects inside of the SDK.

  • Create an EquatableWrapper given a specified wrapped value.

    Declaration

    Swift

    public init(wrappedValue: T)
  • Generic wrapped value.

    Declaration

    Swift

    public var wrappedValue: T
  • Declaration

    Swift

    public var projectedValue: `Self` { get }

    Return Value

    the projected value, which is the instance of the wrapper.

  • Prevents comparison of all types. The purpose is to only let specific types implement the comparison in a way that make sense.

    Declaration

    Swift

    public static func == (lhs: EquatableWrapper<T>, rhs: EquatableWrapper<T>) -> Bool

    Return Value

    false

  • Prevents comparison of all types. The purpose is to only let specific types implement the comparison in a way that make sense.

    Declaration

    Swift

    public static func != (lhs: EquatableWrapper<T>, rhs: EquatableWrapper<T>) -> Bool

    Return Value

    true

  • Declaration

    Swift

    public static func == (lhs: EquatableWrapper<CLLocationCoordinate2D>, rhs: EquatableWrapper<CLLocationCoordinate2D>) -> Bool

    Return Value

    a Boolean value indicating the equality of two coordinates. The comparison is based on equality of latitude and longitude in both coordinates.

  • Declaration

    Swift

    public static func != (lhs: EquatableWrapper<CLLocationCoordinate2D>, rhs: EquatableWrapper<CLLocationCoordinate2D>) -> Bool

    Return Value

    a Boolean value indicating the inequality of two coordinates. The comparison is based on inequality of latitude and longitude in both coordinates.

  • Declaration

    Swift

    static public func == (
        lhs: EquatableWrapper<[CLLocationCoordinate2D]>,
        rhs: EquatableWrapper<[CLLocationCoordinate2D]>
    )
        -> Bool

    Return Value

    a Boolean value indicating the equality of two arrays of coordinates. The comparison is based on equality of latitude and longitude in both arrays’ coordinates.

  • Declaration

    Swift

    static public func != (
        lhs: EquatableWrapper<[CLLocationCoordinate2D]>,
        rhs: EquatableWrapper<[CLLocationCoordinate2D]>
    )
        -> Bool

    Return Value

    a Boolean value indicating the inequality of two arrays of coordinates. The comparison is based on inequality of latitude and longitude in both arrays’ coordinates.

  • Declaration

    Swift

    static public func == (
        lhs: EquatableWrapper<CLLocationCoordinate2D?>,
        rhs: EquatableWrapper<CLLocationCoordinate2D?>
    )
        -> Bool

    Return Value

    a Boolean value indicating the equality of two optional coordinates. The comparison is based on equality of latitude and longitude in both optional coordinates.

  • Declaration

    Swift

    static public func != (
        lhs: EquatableWrapper<CLLocationCoordinate2D?>,
        rhs: EquatableWrapper<CLLocationCoordinate2D?>
    )
        -> Bool

    Return Value

    a Boolean value indicating the inequality of two optional coordinates. The comparison is based on inequality of latitude and longitude in both optional coordinates.

  • The comparison is based on equality of latitude and longitude in both optional arrays’ coordinates.

    Declaration

    Swift

    static public func == (
        lhs: EquatableWrapper<[CLLocationCoordinate2D]?>,
        rhs: EquatableWrapper<[CLLocationCoordinate2D]?>
    )
        -> Bool
  • The comparison is based on inequality of latitude and longitude in both optional arrays’ coordinates.

    Declaration

    Swift

    static public func != (
        lhs: EquatableWrapper<[CLLocationCoordinate2D]?>,
        rhs: EquatableWrapper<[CLLocationCoordinate2D]?>
    )
        -> Bool
  • Compares two EquatableWrapper instances containing dictionaries of type [String: Encodable] for equality. The equality check is based on the equality of both the dictionary keys and the corresponding values.

    Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    static public func == (
        lhs: EquatableWrapper<T>,
        rhs: EquatableWrapper<T>
    )
        -> Bool

    Parameters

    lhs

    The left-hand side value of the comparison, an EquatableWrapper instance wrapping a dictionary with String keys and Encodable values.

    rhs

    The right-hand side value of the comparison, an EquatableWrapper instance wrapping a dictionary with String keys and Encodable values.

    Return Value

    A Boolean value indicating whether the two EquatableWrapper instances contain dictionaries that are equal in terms of both keys and the equality of corresponding values.

  • Compares two EquatableWrapper instances containing dictionaries of type [String: Encodable]? for equality. The equality check is based on the equality of both the dictionary keys and the corresponding values.

    Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    static public func == (
        lhs: EquatableWrapper<T?>,
        rhs: EquatableWrapper<T?>
    )
        -> Bool

    Parameters

    lhs

    The left-hand side value of the comparison, an EquatableWrapper instance wrapping a dictionary with String keys and Encodable values.

    rhs

    The right-hand side value of the comparison, an EquatableWrapper instance wrapping a dictionary with String keys and Encodable values.

    Return Value

    A Boolean value indicating whether the two EquatableWrapper instances contain dictionaries that are equal in terms of both keys and the equality of corresponding values.

  • Compares two EquatableWrapper instances containing dictionaries of type [String: Encodable] for inequality.

    Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    static public func != (
        lhs: EquatableWrapper<T>,
        rhs: EquatableWrapper<T>
    )
        -> Bool

    Parameters

    lhs

    The left-hand side value of the comparison, an EquatableWrapper instance wrapping a dictionary with String keys and Encodable values.

    rhs

    The right-hand side value of the comparison, an EquatableWrapper instance wrapping a dictionary with String keys and Encodable values.

    Return Value

    A Boolean value indicating whether the two EquatableWrapper instances contain dictionaries that are not equal.

  • Compares two EquatableWrapper instances containing dictionaries of type [String: Encodable]? for inequality.

    Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    static public func != (
        lhs: EquatableWrapper<T?>,
        rhs: EquatableWrapper<T?>
    )
        -> Bool

    Parameters

    lhs

    The left-hand side value of the comparison, an EquatableWrapper instance wrapping a dictionary with String keys and Encodable values.

    rhs

    The right-hand side value of the comparison, an EquatableWrapper instance wrapping a dictionary with String keys and Encodable values.

    Return Value

    A Boolean value indicating whether the two EquatableWrapper instances contain dictionaries that are not equal.