Required Instance Methodswift 6.0.1Swift
encode(_:)
Encodes a single value of the given type.
mutating func encode(_ value: UInt) throws
Parameters
- value
The value to encode.
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 (18) members.
Instance members
var codingPath: [any CodingKey]
The path of coding keys taken to get to this point in encoding.
func encode(String
) throws Encodes a single value of the given type.
func encode(Bool
) throws Encodes a single value of the given type.
func encode(Double
) throws Encodes a single value of the given type.
func encode(Float
) throws Encodes a single value of the given type.
func encode(Int
) throws Encodes a single value of the given type.
func encode<T>(T
) throws Encodes a single value of the given type.
func encode(Int8
) throws Encodes a single value of the given type.
func encode(Int16
) throws Encodes a single value of the given type.
func encode(Int32
) throws Encodes a single value of the given type.
func encode(Int64
) throws Encodes a single value of the given type.
func encode(UInt8
) throws Encodes a single value of the given type.
func encode(Int128
) throws Encodes a single value of the given type.
func encode(UInt16
) throws Encodes a single value of the given type.
func encode(UInt32
) throws Encodes a single value of the given type.
func encode(UInt64
) throws Encodes a single value of the given type.
func encode(UInt128
) throws Encodes a single value of the given type.
func encodeNil(
) throws Encodes a null value.