---
source: boltffi_bindgen/src/render/swift/templates.rs
assertion_line: 740
expression: "render_enum(&e, \"\")"
---
public enum Status: Int32, Hashable, Sendable, CaseIterable {
    case active = 0
    case inactive = 1
    case pending = 2

    @usableFromInline init(fromC c: Int32) { self = Status(rawValue: c)! }
    @usableFromInline var cValue: Int32 { rawValue }
    @usableFromInline init(wireTag: Int32) {
        switch wireTag {
        case 0: self = .active
        case 1: self = .inactive
        case 2: self = .pending
        default: fatalError("Invalid Status wire tag: \(wireTag)")
        }
    }
    @usableFromInline var wireTag: Int32 {
        switch rawValue {
        case 0: return 0
        case 1: return 1
        case 2: return 2
        default: fatalError("Invalid Status raw value: \(rawValue)")
        }
    }

}

extension Status: WireCodable {
    @inlinable static func decode(from reader: inout WireReader) -> Status { Status(wireTag: reader.readI32()) }
    @inlinable func encode(to writer: inout WireWriter) { writer.writeI32(wireTag) }
}
