Contents

encodeIfPresent(_:forKey:)

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

Declaration

mutating func encodeIfPresent(_ value: UInt?, forKey key: Self.Key) throws

Parameters

  • value:

    The value to encode.

  • key:

    The key to associate the value with.

Discussion