2 import CommonBase from './CommonBase';
3 import * as bindings from '../bindings' // TODO: figure out location
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();
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);
15 return new Result_NoneErrorZ_Err(null, ptr);
18 public static final class Result_NoneErrorZ_OK extends Result_NoneErrorZ {
19 private Result_NoneErrorZ_OK(Object _dummy, long ptr) {
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) {
28 this.err = bindings.LDKCResult_NoneErrorZ_get_err(ptr);
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);
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);