Protocols
The following protocols are available globally.
-
A type serving as a witness to another type’s conformance to
See moreEquatable.Declaration
Swift
public protocol EquatableWitness<Element> -
Classes whose initializers actually create derived classes
See moreDeclaration
Swift
public protocol FactoryInitializable : Sendable -
A type serving as a witness to another type’s conformance to
See moreHashable.Declaration
Swift
public protocol HashableWitness<Element> : EquatableWitness -
An object that flattens values into—or reconstitutes values from—a serialized
Encoding, maintaining state across the (de)serialization of individual parts.See moreNote
this protocol matches Foundation’sXXXEncoder/XXXDecodertypes, which—confusingly—do not themselves conform to theEncoder/Decoderprotocols.Declaration
Swift
public protocol StatefulCoder -
An object that flattens values into a serialized
Encoding, maintaining state across the serialization of individual parts.See moreNote
this protocol matches Foundation’sXXXEncodertypes, which—confusingly—do not themselves conform to theEncoderprotocol.Declaration
Swift
public protocol StatefulEncoder : StatefulCoder -
An object that reconstitutes values from a serialized
Encoding, maintaining state across the deserialization of individual parts.See moreNote
this protocol matches Foundation’sXXXEncodertypes, which—confusingly—do not themselves conform to theEncoderprotocol.Declaration
Swift
public protocol StatefulDecoder : StatefulCoder
View on GitHub
Protocols Reference