Encodable
A type that can encode itself to an external representation.
protocol Encodable
A type that can encode itself to an external representation.
protocol Encodable
func encode(to: Encoder) throws
Encodes this value into the given encoder.
Array
When Element
conforms to Encodable
Bool
ClosedRange
When Bound
conforms to Comparable
and Bound
conforms to Encodable
CollectionDifference
When ChangeElement
conforms to Decodable
and ChangeElement
conforms to Encodable
CollectionDifference.Change
When ChangeElement
conforms to Decodable
and ChangeElement
conforms to Encodable
ContiguousArray
When Element
conforms to Encodable
Dictionary
When Key
conforms to Encodable
, Key
conforms to Hashable
, and Value
conforms to Encodable
Double
Duration
Float
Float16
Int
Int16
Int32
Int64
Int8
Optional
When Wrapped
conforms to Encodable
PartialRangeFrom
When Bound
conforms to Comparable
and Bound
conforms to Encodable
PartialRangeThrough
When Bound
conforms to Comparable
and Bound
conforms to Encodable
PartialRangeUpTo
When Bound
conforms to Comparable
and Bound
conforms to Encodable
Range
When Bound
conforms to Comparable
and Bound
conforms to Encodable
SIMD16
SIMD2
SIMD3
SIMD32
SIMD4
SIMD64
SIMD8
SIMDMask
Set
When Element
conforms to Encodable
and Element
conforms to Hashable
String
UInt
UInt16
UInt32
UInt64
UInt8
AffineTransform
AttributeScopes.FoundationAttributes.ByteCountAttribute.Component
AttributeScopes.FoundationAttributes.ByteCountAttribute.Unit
AttributeScopes.FoundationAttributes.DateFieldAttribute.Field
AttributeScopes.FoundationAttributes.MeasurementAttribute.Component
AttributeScopes.FoundationAttributes.NumberFormatAttributes.NumberPartAttribute.NumberPart
AttributeScopes.FoundationAttributes.NumberFormatAttributes.SymbolAttribute.Symbol
AttributeScopes.FoundationAttributes.PersonNameComponentAttribute.Component
AttributedString
CGFloat
CGPoint
CGRect
CGSize
Calendar
CharacterSet
CodableConfiguration
Data
Date
DateComponents
DateInterval
Decimal
IndexPath
IndexSet
InflectionRule
Locale
Measurement
When UnitType
inherits from Unit
Morphology
Morphology.CustomPronoun
Morphology.GrammaticalGender
Morphology.GrammaticalNumber
Morphology.PartOfSpeech
PersonNameComponents
TimeZone
URL
URLComponents
UUID
OrderedDictionary
When Key
conforms to Encodable
, Key
conforms to Hashable
, and Value
conforms to Encodable
OrderedSet
When Element
conforms to Encodable
and Element
conforms to Hashable
AnyPrimitive
Binary
Decimal128
Document
EitherPrimitive
JavaScriptCode
JavaScriptCodeWithScope
MaxKey
MinKey
Null
ObjectId
RegularExpression
Timestamp
Field
Reference
When M
conforms to ReadableModel
ReferenceField
MongoAuthenticationError.Reason
MongoClientDetails
MongoClientDetails.ApplicationDetails
MongoClientDetails.DriverDetails
MongoClientDetails.OSDetails
MongoCursorResponse.Cursor
MongoGenericErrorReply
Collation
Collation.Alternate
Collation.CaseFirstOptions
Collation.MaxVariable
Collation.Strength
MongoError.Kind
MongoError.Reason
MongoInvalidUriError
MongoInvalidUriError.Reason
MongoNamespace
MongoProtocolParsingError
MongoProtocolParsingError.Reason
MongoProtocolSerializationError
MongoProtocolSerializationError.Reason
MongoWriteError
ReadConcern
ReadConcern.Level
ServerHandshake
SessionIdentifier
WireVersion
WriteConcern
WriteConcern.Acknowledgement
WriteConcernError
ChangeStreamNotification.ChangeStreamNamespace
ChangeStreamNotification.OperationType
ChangeStreamNotification.UpdateDescription
ChangeStreamOptions
ChangeStreamOptions.FullDocument
GridFSFile
AggregateCommand
CollectionDescription
CountCommand
CreateIndexes
CreateIndexes.Index
CursorReply
CursorSettings
DatabaseDescription
DeleteCommand
DeleteCommand.Limit
DeleteCommand.Removal
DistinctCommand
DropCollectionCommand
DropDatabaseCommand
FindAndModifyCommand
FindAndModifyReply
FindAndModifyReturnValue
FindCommand
InsertCommand
ListCollections
ListDatabases
Projection
Sorting
Sorting.Order
UpdateCommand
UpdateCommand.UpdateRequest
Errno
FileDescriptor
FileDescriptor.AccessMode
FileDescriptor.OpenOptions
FileDescriptor.SeekOrigin
FilePath
FilePath.Component
FilePath.ComponentView
FilePath.Root
FilePermissions