3 public class HTLCUpdate {
5 public internal(set) var cOpaqueStruct: LDKHTLCUpdate?;
9 public init(pointer: LDKHTLCUpdate){
10 self.cOpaqueStruct = pointer
13 /* STRUCT_METHODS_START */
15 public func clone(orig: HTLCUpdate) -> HTLCUpdate {
17 return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer<LDKHTLCUpdate>) in
18 HTLCUpdate(pointer: HTLCUpdate_clone(origPointer))
22 public func write(obj: HTLCUpdate) -> [UInt8] {
24 return Bindings.LDKCVec_u8Z_to_array(nativeType: withUnsafePointer(to: obj.cOpaqueStruct!) { (objPointer: UnsafePointer<LDKHTLCUpdate>) in
25 HTLCUpdate_write(objPointer)
29 public func read(ser: [UInt8]) -> Result_HTLCUpdateDecodeErrorZ {
31 return Result_HTLCUpdateDecodeErrorZ(pointer: HTLCUpdate_read(Bindings.new_LDKu8slice(array: ser)));
36 if self.cOpaqueStruct?.is_owned == false {
40 HTLCUpdate_free(self.cOpaqueStruct!)
46 /* STRUCT_METHODS_END */