|
15 | 15 | public class APIError: NativeTypeWrapper {
|
16 | 16 |
|
17 | 17 |
|
| 18 | + /// Set to false to suppress an individual type's deinit log statements. |
| 19 | + /// Only applicable when log threshold is set to `.Debug`. |
18 | 20 | public static var enableDeinitLogging = true
|
| 21 | + |
| 22 | + /// Set to true to suspend the freeing of this type's associated Rust memory. |
| 23 | + /// Should only ever be used for debugging purposes, and will likely be |
| 24 | + /// deprecated soon. |
19 | 25 | public static var suspendFreedom = false
|
| 26 | + |
20 | 27 | private static var instanceCounter: UInt = 0
|
21 | 28 | internal let instanceNumber: UInt
|
22 | 29 |
|
|
39 | 46 | self.dangling = true
|
40 | 47 | try! self.addAnchor(anchor: anchor)
|
41 | 48 | }
|
| 49 | + |
| 50 | + internal init(cType: LDKAPIError, instantiationContext: String, anchor: NativeTypeWrapper, dangle: Bool = false) { |
| 51 | + Self.instanceCounter += 1 |
| 52 | + self.instanceNumber = Self.instanceCounter |
| 53 | + self.cType = cType |
| 54 | + |
| 55 | + super.init(conflictAvoidingVariableName: 0, instantiationContext: instantiationContext) |
| 56 | + self.dangling = dangle |
| 57 | + try! self.addAnchor(anchor: anchor) |
| 58 | + } |
42 | 59 |
|
43 | 60 |
|
44 | 61 | public enum APIErrorType {
|
|
446 | 463 |
|
447 | 464 |
|
448 | 465 |
|
| 466 | + /// Set to false to suppress an individual type's deinit log statements. |
| 467 | + /// Only applicable when log threshold is set to `.Debug`. |
449 | 468 | public static var enableDeinitLogging = true
|
| 469 | + |
| 470 | + /// Set to true to suspend the freeing of this type's associated Rust memory. |
| 471 | + /// Should only ever be used for debugging purposes, and will likely be |
| 472 | + /// deprecated soon. |
450 | 473 | public static var suspendFreedom = false
|
| 474 | + |
451 | 475 | private static var instanceCounter: UInt = 0
|
452 | 476 | internal let instanceNumber: UInt
|
453 | 477 |
|
|
470 | 494 | self.dangling = true
|
471 | 495 | try! self.addAnchor(anchor: anchor)
|
472 | 496 | }
|
| 497 | + |
| 498 | + internal init(cType: LDKAPIError_LDKAPIMisuseError_Body, instantiationContext: String, anchor: NativeTypeWrapper, dangle: Bool = false) { |
| 499 | + Self.instanceCounter += 1 |
| 500 | + self.instanceNumber = Self.instanceCounter |
| 501 | + self.cType = cType |
| 502 | + |
| 503 | + super.init(conflictAvoidingVariableName: 0, instantiationContext: instantiationContext) |
| 504 | + self.dangling = dangle |
| 505 | + try! self.addAnchor(anchor: anchor) |
| 506 | + } |
473 | 507 |
|
474 | 508 |
|
475 | 509 |
|
|
506 | 540 |
|
507 | 541 |
|
508 | 542 |
|
| 543 | + /// Set to false to suppress an individual type's deinit log statements. |
| 544 | + /// Only applicable when log threshold is set to `.Debug`. |
509 | 545 | public static var enableDeinitLogging = true
|
| 546 | + |
| 547 | + /// Set to true to suspend the freeing of this type's associated Rust memory. |
| 548 | + /// Should only ever be used for debugging purposes, and will likely be |
| 549 | + /// deprecated soon. |
510 | 550 | public static var suspendFreedom = false
|
| 551 | + |
511 | 552 | private static var instanceCounter: UInt = 0
|
512 | 553 | internal let instanceNumber: UInt
|
513 | 554 |
|
|
530 | 571 | self.dangling = true
|
531 | 572 | try! self.addAnchor(anchor: anchor)
|
532 | 573 | }
|
| 574 | + |
| 575 | + internal init(cType: LDKAPIError_LDKFeeRateTooHigh_Body, instantiationContext: String, anchor: NativeTypeWrapper, dangle: Bool = false) { |
| 576 | + Self.instanceCounter += 1 |
| 577 | + self.instanceNumber = Self.instanceCounter |
| 578 | + self.cType = cType |
| 579 | + |
| 580 | + super.init(conflictAvoidingVariableName: 0, instantiationContext: instantiationContext) |
| 581 | + self.dangling = dangle |
| 582 | + try! self.addAnchor(anchor: anchor) |
| 583 | + } |
533 | 584 |
|
534 | 585 |
|
535 | 586 |
|
|
574 | 625 |
|
575 | 626 |
|
576 | 627 |
|
| 628 | + /// Set to false to suppress an individual type's deinit log statements. |
| 629 | + /// Only applicable when log threshold is set to `.Debug`. |
577 | 630 | public static var enableDeinitLogging = true
|
| 631 | + |
| 632 | + /// Set to true to suspend the freeing of this type's associated Rust memory. |
| 633 | + /// Should only ever be used for debugging purposes, and will likely be |
| 634 | + /// deprecated soon. |
578 | 635 | public static var suspendFreedom = false
|
| 636 | + |
579 | 637 | private static var instanceCounter: UInt = 0
|
580 | 638 | internal let instanceNumber: UInt
|
581 | 639 |
|
|
598 | 656 | self.dangling = true
|
599 | 657 | try! self.addAnchor(anchor: anchor)
|
600 | 658 | }
|
| 659 | + |
| 660 | + internal init(cType: LDKAPIError_LDKInvalidRoute_Body, instantiationContext: String, anchor: NativeTypeWrapper, dangle: Bool = false) { |
| 661 | + Self.instanceCounter += 1 |
| 662 | + self.instanceNumber = Self.instanceCounter |
| 663 | + self.cType = cType |
| 664 | + |
| 665 | + super.init(conflictAvoidingVariableName: 0, instantiationContext: instantiationContext) |
| 666 | + self.dangling = dangle |
| 667 | + try! self.addAnchor(anchor: anchor) |
| 668 | + } |
601 | 669 |
|
602 | 670 |
|
603 | 671 |
|
|
634 | 702 |
|
635 | 703 |
|
636 | 704 |
|
| 705 | + /// Set to false to suppress an individual type's deinit log statements. |
| 706 | + /// Only applicable when log threshold is set to `.Debug`. |
637 | 707 | public static var enableDeinitLogging = true
|
| 708 | + |
| 709 | + /// Set to true to suspend the freeing of this type's associated Rust memory. |
| 710 | + /// Should only ever be used for debugging purposes, and will likely be |
| 711 | + /// deprecated soon. |
638 | 712 | public static var suspendFreedom = false
|
| 713 | + |
639 | 714 | private static var instanceCounter: UInt = 0
|
640 | 715 | internal let instanceNumber: UInt
|
641 | 716 |
|
|
658 | 733 | self.dangling = true
|
659 | 734 | try! self.addAnchor(anchor: anchor)
|
660 | 735 | }
|
| 736 | + |
| 737 | + internal init(cType: LDKAPIError_LDKChannelUnavailable_Body, instantiationContext: String, anchor: NativeTypeWrapper, dangle: Bool = false) { |
| 738 | + Self.instanceCounter += 1 |
| 739 | + self.instanceNumber = Self.instanceCounter |
| 740 | + self.cType = cType |
| 741 | + |
| 742 | + super.init(conflictAvoidingVariableName: 0, instantiationContext: instantiationContext) |
| 743 | + self.dangling = dangle |
| 744 | + try! self.addAnchor(anchor: anchor) |
| 745 | + } |
661 | 746 |
|
662 | 747 |
|
663 | 748 |
|
|
694 | 779 |
|
695 | 780 |
|
696 | 781 |
|
| 782 | + /// Set to false to suppress an individual type's deinit log statements. |
| 783 | + /// Only applicable when log threshold is set to `.Debug`. |
697 | 784 | public static var enableDeinitLogging = true
|
| 785 | + |
| 786 | + /// Set to true to suspend the freeing of this type's associated Rust memory. |
| 787 | + /// Should only ever be used for debugging purposes, and will likely be |
| 788 | + /// deprecated soon. |
698 | 789 | public static var suspendFreedom = false
|
| 790 | + |
699 | 791 | private static var instanceCounter: UInt = 0
|
700 | 792 | internal let instanceNumber: UInt
|
701 | 793 |
|
|
718 | 810 | self.dangling = true
|
719 | 811 | try! self.addAnchor(anchor: anchor)
|
720 | 812 | }
|
| 813 | + |
| 814 | + internal init(cType: LDKAPIError_LDKIncompatibleShutdownScript_Body, instantiationContext: String, anchor: NativeTypeWrapper, dangle: Bool = false) { |
| 815 | + Self.instanceCounter += 1 |
| 816 | + self.instanceNumber = Self.instanceCounter |
| 817 | + self.cType = cType |
| 818 | + |
| 819 | + super.init(conflictAvoidingVariableName: 0, instantiationContext: instantiationContext) |
| 820 | + self.dangling = dangle |
| 821 | + try! self.addAnchor(anchor: anchor) |
| 822 | + } |
721 | 823 |
|
722 | 824 |
|
723 | 825 |
|
|
0 commit comments