2 import CommonBase from './CommonBase';
3 import * as bindings from '../bindings' // TODO: figure out location
5 public class Result_SignedRawInvoiceNoneZ extends CommonBase {
6 private Result_SignedRawInvoiceNoneZ(Object _dummy, long ptr) { super(ptr); }
7 protected void finalize() throws Throwable {
8 if (ptr != 0) { bindings.CResult_SignedRawInvoiceNoneZ_free(ptr); } super.finalize();
11 static Result_SignedRawInvoiceNoneZ constr_from_ptr(long ptr) {
12 if (bindings.LDKCResult_SignedRawInvoiceNoneZ_result_ok(ptr)) {
13 return new Result_SignedRawInvoiceNoneZ_OK(null, ptr);
15 return new Result_SignedRawInvoiceNoneZ_Err(null, ptr);
18 public static final class Result_SignedRawInvoiceNoneZ_OK extends Result_SignedRawInvoiceNoneZ {
19 public final SignedRawInvoice res;
20 private Result_SignedRawInvoiceNoneZ_OK(Object _dummy, long ptr) {
22 number res = bindings.LDKCResult_SignedRawInvoiceNoneZ_get_ok(ptr);
23 const res_hu_conv: SignedRawInvoice = new SignedRawInvoice(null, res);
24 res_hu_conv.ptrs_to.add(this);
25 this.res = res_hu_conv;
29 public static final class Result_SignedRawInvoiceNoneZ_Err extends Result_SignedRawInvoiceNoneZ {
30 private Result_SignedRawInvoiceNoneZ_Err(Object _dummy, long ptr) {
35 public static Result_SignedRawInvoiceNoneZ constructor_ok(SignedRawInvoice o) {
36 number ret = bindings.CResult_SignedRawInvoiceNoneZ_ok(o == null ? 0 : o.ptr & ~1);
37 Result_SignedRawInvoiceNoneZ ret_hu_conv = Result_SignedRawInvoiceNoneZ.constr_from_ptr(ret);
38 ret_hu_conv.ptrs_to.add(o);
42 public static Result_SignedRawInvoiceNoneZ constructor_err() {
43 number ret = bindings.CResult_SignedRawInvoiceNoneZ_err();
44 Result_SignedRawInvoiceNoneZ ret_hu_conv = Result_SignedRawInvoiceNoneZ.constr_from_ptr(ret);
48 public Result_SignedRawInvoiceNoneZ clone() {
49 number ret = bindings.CResult_SignedRawInvoiceNoneZ_clone(this.ptr);
50 Result_SignedRawInvoiceNoneZ ret_hu_conv = Result_SignedRawInvoiceNoneZ.constr_from_ptr(ret);