6 namespace org { namespace ldk { namespace structs {
8 public class Result_ThirtyTwoBytesRetryableSendFailureZ : CommonBase {
9 Result_ThirtyTwoBytesRetryableSendFailureZ(object _dummy, long ptr) : base(ptr) { }
10 ~Result_ThirtyTwoBytesRetryableSendFailureZ() {
11 if (ptr != 0) { bindings.CResult_ThirtyTwoBytesRetryableSendFailureZ_free(ptr); }
14 internal static Result_ThirtyTwoBytesRetryableSendFailureZ constr_from_ptr(long ptr) {
15 if (bindings.CResult_ThirtyTwoBytesRetryableSendFailureZ_is_ok(ptr)) {
16 return new Result_ThirtyTwoBytesRetryableSendFailureZ_OK(null, ptr);
18 return new Result_ThirtyTwoBytesRetryableSendFailureZ_Err(null, ptr);
21 public class Result_ThirtyTwoBytesRetryableSendFailureZ_OK : Result_ThirtyTwoBytesRetryableSendFailureZ {
22 public readonly byte[] res;
23 internal Result_ThirtyTwoBytesRetryableSendFailureZ_OK(object _dummy, long ptr) : base(_dummy, ptr) {
24 long res = bindings.CResult_ThirtyTwoBytesRetryableSendFailureZ_get_ok(ptr);
25 byte[] res_conv = InternalUtils.decodeUint8Array(res);
30 public class Result_ThirtyTwoBytesRetryableSendFailureZ_Err : Result_ThirtyTwoBytesRetryableSendFailureZ {
31 public readonly RetryableSendFailure err;
32 internal Result_ThirtyTwoBytesRetryableSendFailureZ_Err(object _dummy, long ptr) : base(_dummy, ptr) {
33 this.err = bindings.CResult_ThirtyTwoBytesRetryableSendFailureZ_get_err(ptr);
38 * Creates a new CResult_ThirtyTwoBytesRetryableSendFailureZ in the success state.
40 public static Result_ThirtyTwoBytesRetryableSendFailureZ ok(byte[] o) {
41 long ret = bindings.CResult_ThirtyTwoBytesRetryableSendFailureZ_ok(InternalUtils.encodeUint8Array(InternalUtils.check_arr_len(o, 32)));
43 if (ret >= 0 && ret <= 4096) { return null; }
44 Result_ThirtyTwoBytesRetryableSendFailureZ ret_hu_conv = Result_ThirtyTwoBytesRetryableSendFailureZ.constr_from_ptr(ret);
49 * Creates a new CResult_ThirtyTwoBytesRetryableSendFailureZ in the error state.
51 public static Result_ThirtyTwoBytesRetryableSendFailureZ err(RetryableSendFailure e) {
52 long ret = bindings.CResult_ThirtyTwoBytesRetryableSendFailureZ_err(e);
54 if (ret >= 0 && ret <= 4096) { return null; }
55 Result_ThirtyTwoBytesRetryableSendFailureZ ret_hu_conv = Result_ThirtyTwoBytesRetryableSendFailureZ.constr_from_ptr(ret);
60 * Checks if the given object is currently in the success state
63 bool ret = bindings.CResult_ThirtyTwoBytesRetryableSendFailureZ_is_ok(this.ptr);
68 internal long clone_ptr() {
69 long ret = bindings.CResult_ThirtyTwoBytesRetryableSendFailureZ_clone_ptr(this.ptr);
75 * Creates a new CResult_ThirtyTwoBytesRetryableSendFailureZ which has the same data as `orig`
76 * but with all dynamically-allocated buffers duplicated in new buffers.
78 public Result_ThirtyTwoBytesRetryableSendFailureZ clone() {
79 long ret = bindings.CResult_ThirtyTwoBytesRetryableSendFailureZ_clone(this.ptr);
81 if (ret >= 0 && ret <= 4096) { return null; }
82 Result_ThirtyTwoBytesRetryableSendFailureZ ret_hu_conv = Result_ThirtyTwoBytesRetryableSendFailureZ.constr_from_ptr(ret);