2 import CommonBase from './CommonBase';
3 import * as bindings from '../bindings' // TODO: figure out location
5 public class Result_NoneSemanticErrorZ extends CommonBase {
6 private Result_NoneSemanticErrorZ(Object _dummy, long ptr) { super(ptr); }
7 protected void finalize() throws Throwable {
8 if (ptr != 0) { bindings.CResult_NoneSemanticErrorZ_free(ptr); } super.finalize();
11 static Result_NoneSemanticErrorZ constr_from_ptr(long ptr) {
12 if (bindings.LDKCResult_NoneSemanticErrorZ_result_ok(ptr)) {
13 return new Result_NoneSemanticErrorZ_OK(null, ptr);
15 return new Result_NoneSemanticErrorZ_Err(null, ptr);
18 public static final class Result_NoneSemanticErrorZ_OK extends Result_NoneSemanticErrorZ {
19 private Result_NoneSemanticErrorZ_OK(Object _dummy, long ptr) {
24 public static final class Result_NoneSemanticErrorZ_Err extends Result_NoneSemanticErrorZ {
25 public final SemanticError err;
26 private Result_NoneSemanticErrorZ_Err(Object _dummy, long ptr) {
28 this.err = bindings.LDKCResult_NoneSemanticErrorZ_get_err(ptr);
32 public static Result_NoneSemanticErrorZ constructor__ok() {
33 number ret = bindings.CResult_NoneSemanticErrorZ_ok();
34 Result_NoneSemanticErrorZ ret_hu_conv = Result_NoneSemanticErrorZ.constr_from_ptr(ret);
38 public static Result_NoneSemanticErrorZ constructor__err(SemanticError e) {
39 number ret = bindings.CResult_NoneSemanticErrorZ_err(e);
40 Result_NoneSemanticErrorZ ret_hu_conv = Result_NoneSemanticErrorZ.constr_from_ptr(ret);
44 public Result_NoneSemanticErrorZ _clone() {
45 number ret = bindings.CResult_NoneSemanticErrorZ_clone(this.ptr);
46 Result_NoneSemanticErrorZ ret_hu_conv = Result_NoneSemanticErrorZ.constr_from_ptr(ret);