6 namespace org { namespace ldk { namespace structs {
8 public class Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ : CommonBase {
9 Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ(object _dummy, long ptr) : base(ptr) { }
10 ~Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ() {
11 if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_free(ptr); }
14 internal static Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ constr_from_ptr(long ptr) {
15 if (bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_is_ok(ptr)) {
16 return new Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_OK(null, ptr);
18 return new Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_Err(null, ptr);
21 public class Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_OK : Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ {
22 public readonly TwoTuple_ThirtyTwoBytesChannelManagerZ res;
23 internal Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) {
24 long res = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_get_ok(ptr);
25 TwoTuple_ThirtyTwoBytesChannelManagerZ res_hu_conv = new TwoTuple_ThirtyTwoBytesChannelManagerZ(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_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_Err : Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ {
32 public readonly DecodeError err;
33 internal Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) {
34 long err = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_get_err(ptr);
35 org.ldk.structs.DecodeError err_hu_conv = org.ldk.structs.DecodeError.constr_from_ptr(err);
36 if (err_hu_conv != null) { err_hu_conv.ptrs_to.AddLast(this); };
37 this.err = err_hu_conv;
42 * Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ in the success state.
44 public static Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ ok(org.ldk.structs.TwoTuple_ThirtyTwoBytesChannelManagerZ o) {
45 long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_ok(o.ptr);
47 if (ret >= 0 && ret <= 4096) { return null; }
48 Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
49 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(o); };
54 * Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ in the error state.
56 public static Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ err(org.ldk.structs.DecodeError e) {
57 long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_err(e.ptr);
59 if (ret >= 0 && ret <= 4096) { return null; }
60 Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
65 * Checks if the given object is currently in the success state
68 bool ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_is_ok(this.ptr);