Unit
enum Unitenum Unitimport Foundationclass MassFormattercase gramcase kilogramcase ouncecase poundcase stoneoverride init() required init?(coder: NSCoder) var isForPersonMassUse: Boolvar numberFormatter: NumberFormatter!var unitStyle: Formatter.UnitStylefunc string(fromKilograms numberInKilograms: Double) -> String func string(fromValue value: Double, unit: MassFormatter.Unit) -> String func unitString(fromKilograms numberInKilograms: Double, usedUnit unitp: UnsafeMutablePointer<MassFormatter.Unit>?) -> String func unitString(fromValue value: Double, unit: MassFormatter.Unit) -> String func unitStringDisplayedAdjacent(toValue value: Double, unit: MassFormatter.Unit) -> String Return the locale-appropriate unit to be shown adjacent to the given value. In most cases this will match unitStringDisplayedAdjacent(toValue:, unit:) however there are a few special cases: - Imperial pounds with a short representation use “lb” in the abstract and “#” only when shown with a numeral. - Stones are are singular in the abstract and only plural when shown with a numeral.
protocol EquatableA type that can be compared for value equality.
protocol Hashable : EquatableA type that can be hashed into a Hasher to produce an integer hash value.
protocol RawRepresentable<RawValue>A type that can be converted to and from an associated raw value.
protocol SendableA thread-safe type whose values can be shared across arbitrary concurrent contexts without introducing a risk of data races. Values of the type may have no shared mutable state, or they may protect that state with a lock or by forcing it to only be accessed from a specific actor.
init?(rawValue: Int) var hashValue: Int { get }static func != (lhs: Self, rhs: Self) -> Bool Returns a Boolean value indicating whether two values are not equal.
func hash(into hasher: inout Hasher)