---
source: boltffi_bindgen/src/render/swift/templates.rs
expression: render_record(&record, "")
---
public struct UserProfile: Hashable, Equatable, Sendable {
    public var name: String
    public var bio: String?

    public init(name: String, bio: String?) {
        self.name = name
        self.bio = bio
    }

}

extension UserProfile: WireCodable {
    @inlinable static func decode(from reader: inout WireReader) -> UserProfile {
        UserProfile(name: reader.readString(), bio: reader.readOptional { reader in reader.readString() })
    }
    @inlinable func encode(to writer: inout WireWriter) {
        writer.writeString(name)
        writer.writeOptional(bio) { writer, v in writer.writeString(v) }
    }
}
