3 public class UpdateFailHTLC {
5 public internal(set) var cOpaqueStruct: LDKUpdateFailHTLC?;
9 public init(pointer: LDKUpdateFailHTLC){
10 self.cOpaqueStruct = pointer
13 /* STRUCT_METHODS_START */
15 public func get_channel_id() -> [UInt8] {
17 return Bindings.tuple32_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKUpdateFailHTLC>) in
18 UpdateFailHTLC_get_channel_id(this_ptrPointer)
22 public func set_channel_id(val: [UInt8]) -> Void {
24 let this_ptrPointer = UnsafeMutablePointer<LDKUpdateFailHTLC>.allocate(capacity: 1)
25 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
27 return UpdateFailHTLC_set_channel_id(this_ptrPointer, Bindings.new_LDKThirtyTwoBytes(array: val));
30 public func get_htlc_id() -> UInt64 {
32 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKUpdateFailHTLC>) in
33 UpdateFailHTLC_get_htlc_id(this_ptrPointer)
37 public func set_htlc_id(val: UInt64) -> Void {
39 let this_ptrPointer = UnsafeMutablePointer<LDKUpdateFailHTLC>.allocate(capacity: 1)
40 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
42 return UpdateFailHTLC_set_htlc_id(this_ptrPointer, val);
45 public func clone(orig: UpdateFailHTLC) -> UpdateFailHTLC {
47 return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer<LDKUpdateFailHTLC>) in
48 UpdateFailHTLC(pointer: UpdateFailHTLC_clone(origPointer))
52 public func write(obj: UpdateFailHTLC) -> [UInt8] {
54 return Bindings.LDKCVec_u8Z_to_array(nativeType: withUnsafePointer(to: obj.cOpaqueStruct!) { (objPointer: UnsafePointer<LDKUpdateFailHTLC>) in
55 UpdateFailHTLC_write(objPointer)
59 public func read(ser: [UInt8]) -> Result_UpdateFailHTLCDecodeErrorZ {
61 return Result_UpdateFailHTLCDecodeErrorZ(pointer: UpdateFailHTLC_read(Bindings.new_LDKu8slice(array: ser)));
66 if self.cOpaqueStruct?.is_owned == false {
70 UpdateFailHTLC_free(self.cOpaqueStruct!)
76 /* STRUCT_METHODS_END */