6 namespace org { namespace ldk { namespace structs {
8 public class Result_TxOutUtxoLookupErrorZ : CommonBase {
9 Result_TxOutUtxoLookupErrorZ(object _dummy, long ptr) : base(ptr) { }
10 ~Result_TxOutUtxoLookupErrorZ() {
11 if (ptr != 0) { bindings.CResult_TxOutUtxoLookupErrorZ_free(ptr); }
14 internal static Result_TxOutUtxoLookupErrorZ constr_from_ptr(long ptr) {
15 if (bindings.CResult_TxOutUtxoLookupErrorZ_is_ok(ptr)) {
16 return new Result_TxOutUtxoLookupErrorZ_OK(null, ptr);
18 return new Result_TxOutUtxoLookupErrorZ_Err(null, ptr);
21 public class Result_TxOutUtxoLookupErrorZ_OK : Result_TxOutUtxoLookupErrorZ {
22 public readonly TxOut res;
23 internal Result_TxOutUtxoLookupErrorZ_OK(object _dummy, long ptr) : base(_dummy, ptr) {
24 long res = bindings.CResult_TxOutUtxoLookupErrorZ_get_ok(ptr);
25 TxOut res_conv = new TxOut(null, res);
30 public class Result_TxOutUtxoLookupErrorZ_Err : Result_TxOutUtxoLookupErrorZ {
31 public readonly UtxoLookupError err;
32 internal Result_TxOutUtxoLookupErrorZ_Err(object _dummy, long ptr) : base(_dummy, ptr) {
33 this.err = bindings.CResult_TxOutUtxoLookupErrorZ_get_err(ptr);
38 * Creates a new CResult_TxOutUtxoLookupErrorZ in the success state.
40 public static Result_TxOutUtxoLookupErrorZ ok(org.ldk.structs.TxOut o) {
41 long ret = bindings.CResult_TxOutUtxoLookupErrorZ_ok(o.ptr);
43 if (ret >= 0 && ret <= 4096) { return null; }
44 Result_TxOutUtxoLookupErrorZ ret_hu_conv = Result_TxOutUtxoLookupErrorZ.constr_from_ptr(ret);
49 * Creates a new CResult_TxOutUtxoLookupErrorZ in the error state.
51 public static Result_TxOutUtxoLookupErrorZ err(UtxoLookupError e) {
52 long ret = bindings.CResult_TxOutUtxoLookupErrorZ_err(e);
54 if (ret >= 0 && ret <= 4096) { return null; }
55 Result_TxOutUtxoLookupErrorZ ret_hu_conv = Result_TxOutUtxoLookupErrorZ.constr_from_ptr(ret);
60 * Checks if the given object is currently in the success state
63 bool ret = bindings.CResult_TxOutUtxoLookupErrorZ_is_ok(this.ptr);
68 internal long clone_ptr() {
69 long ret = bindings.CResult_TxOutUtxoLookupErrorZ_clone_ptr(this.ptr);
75 * Creates a new CResult_TxOutUtxoLookupErrorZ which has the same data as `orig`
76 * but with all dynamically-allocated buffers duplicated in new buffers.
78 public Result_TxOutUtxoLookupErrorZ clone() {
79 long ret = bindings.CResult_TxOutUtxoLookupErrorZ_clone(this.ptr);
81 if (ret >= 0 && ret <= 4096) { return null; }
82 Result_TxOutUtxoLookupErrorZ ret_hu_conv = Result_TxOutUtxoLookupErrorZ.constr_from_ptr(ret);