Type Method
decode(from:)
iOS 15.0+
iPadOS 15.0+
Mac Catalyst 15.0+
macOS 12.0+
tvOS 15.0+
watchOS 8.0+
Decodes a value from the provided decoder.
static func decode(from decoder: any Decoder) throws -> Self.Value
Parameters
decoderThe decoder to read data from.
Return Value
The decoded value.
Discussion
This method throws an error if reading from the decoder fails, or if the data read is corrupted or otherwise invalid.
Default Implementations
DecodableAttributedStringKey Implementations
static func decode(from: any Decoder) throws -> Self.ValueDecodes a Swift value from the provided decoder, using a default implementation.