AnyEncodable

public struct AnyEncodable : Encodable
extension AnyEncodable: CustomStringConvertible
extension AnyEncodable: CustomDebugStringConvertible
extension AnyEncodable: ExpressibleByNilLiteral
extension AnyEncodable: ExpressibleByBooleanLiteral
extension AnyEncodable: ExpressibleByIntegerLiteral
extension AnyEncodable: ExpressibleByFloatLiteral
extension AnyEncodable: ExpressibleByArrayLiteral
extension AnyEncodable: ExpressibleByDictionaryLiteral

A type-erased encodable value that forwards encoding responsibilities to an underlying value.

  • The wrapped value of any type.

    Declaration

    Swift

    public let value: Any
  • Creates a type-erased encodable value.

    Declaration

    Swift

    public init<T>(_ value: T?)

    Parameters

    value

    The value to wrap, or nil which becomes an empty tuple.

Encodable

  • Declaration

    Swift

    public var description: String { get }
  • Declaration

    Swift

    public var debugDescription: String { get }