RestfulPropertyKit Documentation Beta

Protocol Parent​Codable

public protocol ParentCodable: Codable, ParentCodableDynamicDispatch where ChildCodable: Codable 

A type that can wrap a child Codable value into a representation of itself.

Protocol ParentCodable can only be used as a generic constraint because it has Self or associated type requirements.

ParentCodable ParentCodable Codable Codable ParentCodable->Codable ParentCodableDynamicDispatch ParentCodableDynamicDispatch ParentCodable->ParentCodableDynamicDispatch

Conforms To

ParentCodableDynamicDispatch

ParentCodableDynamicDispatch is a weakly typed wrapper to dispatch wrap method calls to a ParentCodable object.

Codable

Requirements

Child​Codable

associatedtype ChildCodable

The associated child type implementing the Decodable and Encodable protocols.

wrap(child:​)

static func wrap(child: ChildCodable) -> Self

Wraps a value of type ChildCodable into a representation of itself.

Parameters

child Child​Codable

The value to be wrapped by the parent type.

Returns

An instance of the parent type wrapping the child value.