func thriftEncode()

in Sources/TwitterApacheThrift/ThriftCodable.swift [23:43]


    func thriftEncode(to encoder: ThriftEncoder) throws

    /// Provides an override point to all the protocol implementer to provide
    /// a different ThriftType such as for wrapping
    ///
    /// - Note: This function is not required to be implemented, defaults to struct
    ///
    /// - returns: The thrift type of the implementer
    static func thriftType() throws -> ThriftType

    /// Provides a validation step before encoding to insure fields are set
    /// to appropriate values provided by the implementer.
    ///
    /// - Note: This function is not required to be implemented, default is no validation
    ///
    /// - throws: `ThriftEncoderError.validationFailure()` if field validation fails
    func validate() throws
}

/// A protocol for types which can be decoded from thrift.
public protocol ThriftDecodable: Decodable {