EncodingRepresentation
public protocol EncodingRepresentation
A protocol for encoded data that will only be written.
Please refer to the documentation of Representation for more information about usage.
However, this protocol gives you also more control about the encoding process, because you will have to instantiate a new MetaEncoder, that you may pack with more information, than TranslatingCoder can handle. For example you may provide a userInfo dictionary or an initial codingPath.
-
init(encoding:)
Default implementationInits encoding the given value
Default Implementation
Declaration
Swift
init<E>(encoding value: E) throws where E : Encodable
-
returns a new MetaEncoder for self
Declaration
Swift
static func provideNewEncoder() -> MetaEncoder
-
construct an instance of this type from a meta tree, created by an encoder returned from provideNewEncoder.
Declaration
Swift
init(meta: Meta) throws