3 public class NodeFeatures {
5 public internal(set) var cOpaqueStruct: LDKNodeFeatures?;
7 /* DEFAULT_CONSTRUCTOR_START */
10 self.cOpaqueStruct = NodeFeatures_known()
12 /* DEFAULT_CONSTRUCTOR_END */
14 public init(pointer: LDKNodeFeatures){
15 self.cOpaqueStruct = pointer
18 /* STRUCT_METHODS_START */
20 public func eq(a: NodeFeatures, b: NodeFeatures) -> Bool {
22 return withUnsafePointer(to: a.cOpaqueStruct!) { (aPointer: UnsafePointer<LDKNodeFeatures>) in
23 withUnsafePointer(to: b.cOpaqueStruct!) { (bPointer: UnsafePointer<LDKNodeFeatures>) in
24 NodeFeatures_eq(aPointer, bPointer)
29 public func clone(orig: NodeFeatures) -> NodeFeatures {
31 return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer<LDKNodeFeatures>) in
32 NodeFeatures(pointer: NodeFeatures_clone(origPointer))
36 public func supports_payment_secret() -> Bool {
38 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_argPointer: UnsafePointer<LDKNodeFeatures>) in
39 NodeFeatures_supports_payment_secret(this_argPointer)
43 public func write(obj: NodeFeatures) -> [UInt8] {
45 return Bindings.LDKCVec_u8Z_to_array(nativeType: withUnsafePointer(to: obj.cOpaqueStruct!) { (objPointer: UnsafePointer<LDKNodeFeatures>) in
46 NodeFeatures_write(objPointer)
50 public func read(ser: [UInt8]) -> Result_NodeFeaturesDecodeErrorZ {
52 return Result_NodeFeaturesDecodeErrorZ(pointer: NodeFeatures_read(Bindings.new_LDKu8slice(array: ser)));
57 if self.cOpaqueStruct?.is_owned == false {
61 NodeFeatures_free(self.cOpaqueStruct!)
67 /* STRUCT_METHODS_END */