SpecificRestriction

public struct SpecificRestriction : Hashable

Represents a specific vehicle restriction. A SpecificRestriction defines what type of restriction applies (weight, height, etc.) and the range of allowed values. It is always used as part of a VehicleRestriction.

Note: This is a beta release of this feature. Related APIs may change for new releases without a deprecation process.

  • Type of restriction.

    Declaration

    Swift

    public var type: RestrictionType
  • Values for which the restriction applies. Examples:

    • (min, max) → Restriction applies for all values between min and max inclusive.
    • (n, n) → Restriction applies to an exact value.
    • (n, 0) or (n, null) → Restriction applies for values greater than or equal to min (unbounded upper limit).

    Declaration

    Swift

    public var value: IntegerRange
  • Creates a new instance.

    Declaration

    Swift

    public init(type: RestrictionType, value: IntegerRange)