swift-combine.toData.mustache Maven / Gradle / Ivy
{{#isBinary}}{{#mapFileBinaryToData}}{{{paramName}}}{{/mapFileBinaryToData}}{{^mapFileBinaryToData}}try Data(contentsOf: {{{paramName}}}){{/mapFileBinaryToData}}{{/isBinary}}{{#isModel}}try self.encoder.encode({{paramName}}){{/isModel}}{{#isByteArray}}{{paramName}}.base64EncodedData(){{/isByteArray}}{{#isString}}{{paramName}}{{#isEnum}}.rawValue{{/isEnum}}.data(using: .utf8) ?? Data(){{/isString}}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy