Required Instance Methodswift 6.0.1Swift

    encodeIfPresent(_:forKey:)

    Encodes the given value for the given key if it is not nil.

    iOS
    18.0+
    macOS
    15.0+
    tvOS
    18.0+
    visionOS
    2.0+
    watchOS
    11.0+
    mutating func encodeIfPresent(_ value: Int128?, forKey key: Self.Key) throws

    Parameters

    value

    The value to encode.

    key

    The key to associate the value with.

    Throws

    EncodingError.invalidValue if the given value is invalid in the current context for this format.

    Other requirements

    View members

    Hide members

    This section is hidden by default because it contains too many (41) members.

    Type members

    Instance members

    Citizens in Swift

    Default implementations