UnitGender

@available(swift 3.1)
@available(iOS 10.0, tvOS 10.0, watchOS 3.0, OSX 10.12, *)
open class UnitGender : Unit

Gender Unit

Gender unit doesn’t make much sense to use with Measurements. However it helps in Forumlas where Gener is needed.

  • Female Gender type

    Declaration

    Swift

    public class var female: UnitGender { get }
  • Male Gender type

    Declaration

    Swift

    public class var male: UnitGender { get }
  • Unspecified Gender type

    Declaration

    Swift

    public class var unspecificed: UnitGender { get }
  • Encodes this value into the given encoder.

    If the value fails to encode anything, encoder will encode an empty keyed container in its place.

    This function throws an error if any values are invalid for the given encoder’s format.

    Declaration

    Swift

    public func encode(to encoder: Encoder) throws

    Parameters

    encoder

    The encoder to write data to.