@@ -409,95 +409,6 @@ fileprivate struct FfiConverterString: FfiConverter {
409409 }
410410}
411411
412- // Note that we don't yet support `indirect` for enums.
413- // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
414-
415- public enum CryptoQrCodeDecodeError {
416-
417- case notEnoughData
418- case notUtf8
419- case urlParse
420- case invalidMode
421- case invalidVersion
422- case base64
423- case invalidPrefix
424- }
425-
426-
427- public struct FfiConverterTypeCryptoQrCodeDecodeError : FfiConverterRustBuffer {
428- typealias SwiftType = CryptoQrCodeDecodeError
429-
430- public static func read( from buf: inout ( data: Data , offset: Data . Index ) ) throws -> CryptoQrCodeDecodeError {
431- let variant : Int32 = try readInt ( & buf)
432- switch variant {
433-
434- case 1 : return . notEnoughData
435-
436- case 2 : return . notUtf8
437-
438- case 3 : return . urlParse
439-
440- case 4 : return . invalidMode
441-
442- case 5 : return . invalidVersion
443-
444- case 6 : return . base64
445-
446- case 7 : return . invalidPrefix
447-
448- default : throw UniffiInternalError . unexpectedEnumCase
449- }
450- }
451-
452- public static func write( _ value: CryptoQrCodeDecodeError , into buf: inout [ UInt8 ] ) {
453- switch value {
454-
455-
456- case . notEnoughData:
457- writeInt ( & buf, Int32 ( 1 ) )
458-
459-
460- case . notUtf8:
461- writeInt ( & buf, Int32 ( 2 ) )
462-
463-
464- case . urlParse:
465- writeInt ( & buf, Int32 ( 3 ) )
466-
467-
468- case . invalidMode:
469- writeInt ( & buf, Int32 ( 4 ) )
470-
471-
472- case . invalidVersion:
473- writeInt ( & buf, Int32 ( 5 ) )
474-
475-
476- case . base64:
477- writeInt ( & buf, Int32 ( 6 ) )
478-
479-
480- case . invalidPrefix:
481- writeInt ( & buf, Int32 ( 7 ) )
482-
483- }
484- }
485- }
486-
487-
488- public func FfiConverterTypeCryptoQrCodeDecodeError_lift( _ buf: RustBuffer ) throws -> CryptoQrCodeDecodeError {
489- return try FfiConverterTypeCryptoQrCodeDecodeError . lift ( buf)
490- }
491-
492- public func FfiConverterTypeCryptoQrCodeDecodeError_lower( _ value: CryptoQrCodeDecodeError ) -> RustBuffer {
493- return FfiConverterTypeCryptoQrCodeDecodeError . lower ( value)
494- }
495-
496-
497- extension CryptoQrCodeDecodeError : Equatable , Hashable { }
498-
499-
500-
501412// Note that we don't yet support `indirect` for enums.
502413// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
503414/**
0 commit comments