+ Reference.reachabilityFence(this);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new DisconnectPeer-variant ErrorAction
+ */
+ public static ErrorAction disconnect_peer(ErrorMessage msg) {
+ long ret = bindings.ErrorAction_disconnect_peer(msg == null ? 0 : msg.ptr);
+ Reference.reachabilityFence(msg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(msg); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new IgnoreError-variant ErrorAction
+ */
+ public static ErrorAction ignore_error() {
+ long ret = bindings.ErrorAction_ignore_error();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new IgnoreAndLog-variant ErrorAction
+ */
+ public static ErrorAction ignore_and_log(org.ldk.enums.Level a) {
+ long ret = bindings.ErrorAction_ignore_and_log(a);
+ Reference.reachabilityFence(a);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new IgnoreDuplicateGossip-variant ErrorAction
+ */
+ public static ErrorAction ignore_duplicate_gossip() {
+ long ret = bindings.ErrorAction_ignore_duplicate_gossip();
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new SendErrorMessage-variant ErrorAction
+ */
+ public static ErrorAction send_error_message(ErrorMessage msg) {
+ long ret = bindings.ErrorAction_send_error_message(msg == null ? 0 : msg.ptr);
+ Reference.reachabilityFence(msg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(msg); };
+ return ret_hu_conv;
+ }
+
+ /**
+ * Utility method to constructs a new SendWarningMessage-variant ErrorAction
+ */
+ public static ErrorAction send_warning_message(WarningMessage msg, org.ldk.enums.Level log_level) {
+ long ret = bindings.ErrorAction_send_warning_message(msg == null ? 0 : msg.ptr, log_level);
+ Reference.reachabilityFence(msg);
+ Reference.reachabilityFence(log_level);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(msg); };