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