]> git.bitcoin.ninja Git - ldk-java/blob - ts/structs/Result_NoneErrorZ.ts
Use explicit return type var names instead of guessing
[ldk-java] / ts / structs / Result_NoneErrorZ.ts
1
2 import CommonBase from './CommonBase';
3 import * as bindings from '../bindings' // TODO: figure out location
4
5 public class Result_NoneErrorZ extends CommonBase {
6         private Result_NoneErrorZ(Object _dummy, long ptr) { super(ptr); }
7         protected void finalize() throws Throwable {
8                 if (ptr != 0) { bindings.CResult_NoneErrorZ_free(ptr); } super.finalize();
9         }
10
11         static Result_NoneErrorZ constr_from_ptr(long ptr) {
12                 if (bindings.LDKCResult_NoneErrorZ_result_ok(ptr)) {
13                         return new Result_NoneErrorZ_OK(null, ptr);
14                 } else {
15                         return new Result_NoneErrorZ_Err(null, ptr);
16                 }
17         }
18         public static final class Result_NoneErrorZ_OK extends Result_NoneErrorZ {
19                 private Result_NoneErrorZ_OK(Object _dummy, long ptr) {
20                         super(_dummy, ptr);
21                 }
22         }
23
24         public static final class Result_NoneErrorZ_Err extends Result_NoneErrorZ {
25                 public final LDKIOError err;
26                 private Result_NoneErrorZ_Err(Object _dummy, long ptr) {
27                         super(_dummy, ptr);
28                         this.err = bindings.LDKCResult_NoneErrorZ_get_err(ptr);
29                 }
30         }
31
32         public static Result_NoneErrorZ constructor__ok() {
33                 number ret = bindings.CResult_NoneErrorZ_ok();
34                 Result_NoneErrorZ ret_hu_conv = Result_NoneErrorZ.constr_from_ptr(ret);
35                 return ret_hu_conv;
36         }
37
38         public static Result_NoneErrorZ constructor__err(LDKIOError e) {
39                 number ret = bindings.CResult_NoneErrorZ_err(e);
40                 Result_NoneErrorZ ret_hu_conv = Result_NoneErrorZ.constr_from_ptr(ret);
41                 return ret_hu_conv;
42         }
43
44 }