6 namespace org { namespace ldk { namespace structs {
8 public class Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ : CommonBase {
9 Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ(object _dummy, long ptr) : base(ptr) { }
10 ~Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ() {
11 if (ptr != 0) { bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_free(ptr); }
14 internal static Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ constr_from_ptr(long ptr) {
15 if (bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_is_ok(ptr)) {
16 return new Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_OK(null, ptr);
18 return new Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_Err(null, ptr);
21 public class Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_OK : Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ {
22 public readonly TwoTuple_ThirtyTwoBytesChannelMonitorZ res;
23 internal Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) {
24 long res = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_get_ok(ptr);
25 TwoTuple_ThirtyTwoBytesChannelMonitorZ res_hu_conv = new TwoTuple_ThirtyTwoBytesChannelMonitorZ(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_ThirtyTwoBytesChannelMonitorZIOErrorZ_Err : Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ {
32 public readonly IOError err;
33 internal Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) {
34 this.err = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_get_err(ptr);
39 * Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ in the success state.
41 public static Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ ok(org.ldk.structs.TwoTuple_ThirtyTwoBytesChannelMonitorZ o) {
42 long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_ok(o.ptr);
44 if (ret >= 0 && ret <= 4096) { return null; }
45 Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.constr_from_ptr(ret);
50 * Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ in the error state.
52 public static Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ err(IOError e) {
53 long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_err(e);
55 if (ret >= 0 && ret <= 4096) { return null; }
56 Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.constr_from_ptr(ret);
61 * Checks if the given object is currently in the success state
64 bool ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_is_ok(this.ptr);
69 internal long clone_ptr() {
70 long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone_ptr(this.ptr);
76 * Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ which has the same data as `orig`
77 * but with all dynamically-allocated buffers duplicated in new buffers.
79 public Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ clone() {
80 long ret = bindings.CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone(this.ptr);
82 if (ret >= 0 && ret <= 4096) { return null; }
83 Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ ret_hu_conv = Result_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.constr_from_ptr(ret);