Encoder
でなく T: Encoder
であるべきでは? public protocol Encodable { /// Encodes `self` into the given encoder. /// /// If `self` fails to encode anything, `encoder` will encode an empty keyed container in its place. /// /// - parameter encoder: The encoder to write data to. /// - throws: An error if any values are invalid for `encoder`'s format. func encode(to encoder: Encoder) throws }
public protocol Encodable { func encode<T: Encoder>(to encoder: T) throws }