3 public class ChannelFeatures {
5 public internal(set) var cOpaqueStruct: LDKChannelFeatures?;
7 /* DEFAULT_CONSTRUCTOR_START */
10 self.cOpaqueStruct = ChannelFeatures_known()
12 /* DEFAULT_CONSTRUCTOR_END */
14 public init(pointer: LDKChannelFeatures){
15 self.cOpaqueStruct = pointer
18 /* STRUCT_METHODS_START */
20 public func eq(a: ChannelFeatures, b: ChannelFeatures) -> Bool {
22 return withUnsafePointer(to: a.cOpaqueStruct!) { (aPointer: UnsafePointer<LDKChannelFeatures>) in
23 withUnsafePointer(to: b.cOpaqueStruct!) { (bPointer: UnsafePointer<LDKChannelFeatures>) in
24 ChannelFeatures_eq(aPointer, bPointer)
29 public func clone(orig: ChannelFeatures) -> ChannelFeatures {
31 return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer<LDKChannelFeatures>) in
32 ChannelFeatures(pointer: ChannelFeatures_clone(origPointer))
36 public func write(obj: ChannelFeatures) -> [UInt8] {
38 return Bindings.LDKCVec_u8Z_to_array(nativeType: withUnsafePointer(to: obj.cOpaqueStruct!) { (objPointer: UnsafePointer<LDKChannelFeatures>) in
39 ChannelFeatures_write(objPointer)
43 public func read(ser: [UInt8]) -> Result_ChannelFeaturesDecodeErrorZ {
45 return Result_ChannelFeaturesDecodeErrorZ(pointer: ChannelFeatures_read(Bindings.new_LDKu8slice(array: ser)));
50 if self.cOpaqueStruct?.is_owned == false {
54 ChannelFeatures_free(self.cOpaqueStruct!)
60 /* STRUCT_METHODS_END */