Weight
@available(swift 3.1)
@available(iOS 10.0, tvOS 10.0, watchOS 3.0, macOS 10.12, *)
public struct Weight
extension Weight: Equatable
extension Weight: FitFieldCodeable
FIT Weight
-
Weight is being Calculated
Declaration
Swift
private(set) public var calculating: Bool { get }
-
Weight
Declaration
Swift
private(set) public var weight: Measurement<UnitMass>? { get }
-
Undocumented
Declaration
Swift
public init(weight: Measurement<UnitMass>?, calculating: Bool)
-
Returns a Boolean value indicating whether two values are equal.
Equality is the inverse of inequality. For any values
a
andb
,a == b
implies thata != b
isfalse
.Declaration
Swift
public static func == (lhs: Weight, rhs: Weight) -> Bool
Parameters
lhs
A value to compare.
rhs
Another value to compare.
-
Encode Into Data
Declaration
Swift
public func encode(base: BaseTypeData) -> Data?
Parameters
base
BaseTypeData
-
Decode FIT Field
Declaration
Swift
public static func decode<T>(type: T.Type, data: Data, base: BaseTypeData, arch: Endian) -> T?
Parameters
type
Type of Field
data
Data to Decode
base
BaseTypeData
arch
Endian
Return Value
Decoded Value