6 namespace org { namespace ldk { namespace structs {
8 public class Result_TransactionU16LenLimitedNoneZ : CommonBase {
9 Result_TransactionU16LenLimitedNoneZ(object _dummy, long ptr) : base(ptr) { }
10 ~Result_TransactionU16LenLimitedNoneZ() {
11 if (ptr != 0) { bindings.CResult_TransactionU16LenLimitedNoneZ_free(ptr); }
14 internal static Result_TransactionU16LenLimitedNoneZ constr_from_ptr(long ptr) {
15 if (bindings.CResult_TransactionU16LenLimitedNoneZ_is_ok(ptr)) {
16 return new Result_TransactionU16LenLimitedNoneZ_OK(null, ptr);
18 return new Result_TransactionU16LenLimitedNoneZ_Err(null, ptr);
21 public class Result_TransactionU16LenLimitedNoneZ_OK : Result_TransactionU16LenLimitedNoneZ {
22 public readonly TransactionU16LenLimited res;
23 internal Result_TransactionU16LenLimitedNoneZ_OK(object _dummy, long ptr) : base(_dummy, ptr) {
24 long res = bindings.CResult_TransactionU16LenLimitedNoneZ_get_ok(ptr);
25 org.ldk.structs.TransactionU16LenLimited res_hu_conv = null; if (res < 0 || res > 4096) { res_hu_conv = new org.ldk.structs.TransactionU16LenLimited(null, res); }
26 if (res_hu_conv != null) { res_hu_conv.ptrs_to.AddLast(this); };
27 this.res = res_hu_conv;
31 public class Result_TransactionU16LenLimitedNoneZ_Err : Result_TransactionU16LenLimitedNoneZ {
32 internal Result_TransactionU16LenLimitedNoneZ_Err(object _dummy, long ptr) : base(_dummy, ptr) {
37 * Creates a new CResult_TransactionU16LenLimitedNoneZ in the success state.
39 public static Result_TransactionU16LenLimitedNoneZ ok(org.ldk.structs.TransactionU16LenLimited o) {
40 long ret = bindings.CResult_TransactionU16LenLimitedNoneZ_ok(o == null ? 0 : o.ptr);
42 if (ret >= 0 && ret <= 4096) { return null; }
43 Result_TransactionU16LenLimitedNoneZ ret_hu_conv = Result_TransactionU16LenLimitedNoneZ.constr_from_ptr(ret);
44 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); };
49 * Creates a new CResult_TransactionU16LenLimitedNoneZ in the error state.
51 public static Result_TransactionU16LenLimitedNoneZ err() {
52 long ret = bindings.CResult_TransactionU16LenLimitedNoneZ_err();
53 if (ret >= 0 && ret <= 4096) { return null; }
54 Result_TransactionU16LenLimitedNoneZ ret_hu_conv = Result_TransactionU16LenLimitedNoneZ.constr_from_ptr(ret);
59 * Checks if the given object is currently in the success state
62 bool ret = bindings.CResult_TransactionU16LenLimitedNoneZ_is_ok(this.ptr);
67 internal long clone_ptr() {
68 long ret = bindings.CResult_TransactionU16LenLimitedNoneZ_clone_ptr(this.ptr);
74 * Creates a new CResult_TransactionU16LenLimitedNoneZ which has the same data as `orig`
75 * but with all dynamically-allocated buffers duplicated in new buffers.
77 public Result_TransactionU16LenLimitedNoneZ clone() {
78 long ret = bindings.CResult_TransactionU16LenLimitedNoneZ_clone(this.ptr);
80 if (ret >= 0 && ret <= 4096) { return null; }
81 Result_TransactionU16LenLimitedNoneZ ret_hu_conv = Result_TransactionU16LenLimitedNoneZ.constr_from_ptr(ret);