Encoder

extension Encoder

Encoder|Decoder协议暂不开放FWWrapper包装,防止协议fw属性和类fw属性重复声明冲突

协议使用FWWrapper示例: extension Encoder { public var fw: FWWrapper { return FWWrapper(self) } } extension FWWrapper where Base == Encoder { }

  • Undocumented

    Declaration

    Swift

    public func encodeSingle<T>(_ value: T) throws where T : Encodable
  • Undocumented

    Declaration

    Swift

    public func encode<T>(_ value: T, for key: String) throws where T : Encodable
  • Undocumented

    Declaration

    Swift

    public func encode<T, K>(_ value: T, for key: K) throws where T : Encodable, K : CodingKey
  • Undocumented

    Declaration

    Swift

    public func encode<F>(_ date: Date, for key: String, using formatter: F) throws where F : FWAnyDateFormatter
  • Undocumented

    Declaration

    Swift

    public func encode<K, F>(_ date: Date, for key: K, using formatter: F) throws where K : CodingKey, F : FWAnyDateFormatter