TriggeringDistances
public struct TriggeringDistances : Hashable, Equatable
Holds one or more triggering distances.
By default, the distance specified in defaultDistance
is the triggering distance.
In case custom triggering distances are to be used in the US and/or UK, corresponding values can be specified in
customDistanceUS
and customDistanceUK
respectively.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Creates an instance with one or more triggering distances.
Note
The parameters
customDistanceUS
and/orcustomDistanceUK
need to be specified only if custom triggering distances are needed in the US and/or UK.Declaration
Swift
public init( defaultDistance: Measurement<UnitLength>, customDistanceUS: Measurement<UnitLength>? = nil, customDistanceUK: Measurement<UnitLength>? = nil )
Parameters
defaultDistance
The default triggering distance to be used for any country.
customDistanceUS
Triggering distance for US customary units. If not specified,
defaultDistance
value is used in the US.customDistanceUK
Triggering distance for Imperial units. If not specified,
defaultDistance
value is used in the UK.
-
The default triggering distance to be used for any country.
Declaration
Swift
public let defaultDistance: Measurement<UnitLength>
-
Triggering distance for US customary units. If not specified,
defaultDistance
value is used in the US.Declaration
Swift
public let customDistanceUS: Measurement<UnitLength>?
-
Triggering distance for Imperial units. If not specified,
defaultDistance
value is used in the UK.Declaration
Swift
public let customDistanceUK: Measurement<UnitLength>?
-
Comparison function.
Declaration
Swift
public static func == (lhs: TriggeringDistances, rhs: TriggeringDistances) -> Bool
-
Hashing functions.
Declaration
Swift
public func hash(into hasher: inout Hasher)