TypeErasedAttribute

public struct TypeErasedAttribute : TypeErasedValue

[Internal] Used to wrap availability constrained attributes, since enum cases used ubternally to represent method/variable/subscript invocation/stub cannot have availability clauses.

  • [internal] Returned value

    Declaration

    Swift

    public let value: Any
  • [internal] Used to describe attribute generocity (0 is general, 1 is specific)

    Declaration

    Swift

    public var intValue: Int
  • [internal] Used to compare with other attribute

    Declaration

    Swift

    public let compare: (Any, Any, Matcher) -> Bool
  • [internal] Used for formatting messages.

    Declaration

    Swift

    public let shortDescription: String
  • [internal] Creates new TypeErasedAttribute instance, with specified return value and compare closure

    Declaration

    Swift

    public init(
        value: Any,
        intValue: Int,
        shortDescription: String,
        compare: @escaping (Any,Any,Matcher) -> Bool
    )

    Parameters

    value

    Returned value

    compare

    Used to compare with other attribute