Update java bindings with new generator and new upstream code
[ldk-java] / src / main / java / org / ldk / structs / NodeFeatures.java
index a32f9680c0fdb4dd970c27fefc335321df1c19de..b4d09e7188bf6b9382710e485b7a5ede11aaf068 100644 (file)
@@ -5,6 +5,10 @@ import org.ldk.enums.*;
 import org.ldk.util.*;
 import java.util.Arrays;
 
+
+/**
+ * Features used within a `node_announcement` message.
+ */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class NodeFeatures extends CommonBase {
        NodeFeatures(Object _dummy, long ptr) { super(ptr); }
@@ -14,6 +18,9 @@ public class NodeFeatures extends CommonBase {
                if (ptr != 0) { bindings.NodeFeatures_free(ptr); }
        }
 
+       /**
+        * Creates a copy of the NodeFeatures
+        */
        public NodeFeatures clone() {
                long ret = bindings.NodeFeatures_clone(this.ptr);
                NodeFeatures ret_hu_conv = new NodeFeatures(null, ret);
@@ -21,6 +28,9 @@ public class NodeFeatures extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Create a blank Features with no features set
+        */
        public static NodeFeatures constructor_empty() {
                long ret = bindings.NodeFeatures_empty();
                NodeFeatures ret_hu_conv = new NodeFeatures(null, ret);
@@ -28,6 +38,11 @@ public class NodeFeatures extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Creates features known by the implementation as defined by [`T::KNOWN_FEATURE_FLAGS`].
+        * 
+        * [`T::KNOWN_FEATURE_FLAGS`]: sealed/trait.Context.html#associatedconstant.KNOWN_FEATURE_FLAGS
+        */
        public static NodeFeatures constructor_known() {
                long ret = bindings.NodeFeatures_known();
                NodeFeatures ret_hu_conv = new NodeFeatures(null, ret);
@@ -35,11 +50,17 @@ public class NodeFeatures extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Serialize the NodeFeatures object into a byte array which can be read by NodeFeatures_read
+        */
        public byte[] write() {
                byte[] ret = bindings.NodeFeatures_write(this.ptr);
                return ret;
        }
 
+       /**
+        * Read a NodeFeatures from a byte array, created by NodeFeatures_write
+        */
        public static Result_NodeFeaturesDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.NodeFeatures_read(ser);
                Result_NodeFeaturesDecodeErrorZ ret_hu_conv = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret);