3 public class ChannelMonitorUpdate {
5 public internal(set) var cOpaqueStruct: LDKChannelMonitorUpdate?;
9 public init(pointer: LDKChannelMonitorUpdate){
10 self.cOpaqueStruct = pointer
13 /* STRUCT_METHODS_START */
15 public func get_update_id() -> UInt64 {
17 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKChannelMonitorUpdate>) in
18 ChannelMonitorUpdate_get_update_id(this_ptrPointer)
22 public func set_update_id(val: UInt64) -> Void {
24 let this_ptrPointer = UnsafeMutablePointer<LDKChannelMonitorUpdate>.allocate(capacity: 1)
25 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
27 return ChannelMonitorUpdate_set_update_id(this_ptrPointer, val);
30 public func clone(orig: ChannelMonitorUpdate) -> ChannelMonitorUpdate {
32 return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer<LDKChannelMonitorUpdate>) in
33 ChannelMonitorUpdate(pointer: ChannelMonitorUpdate_clone(origPointer))
37 public func write(obj: ChannelMonitorUpdate) -> [UInt8] {
39 return Bindings.LDKCVec_u8Z_to_array(nativeType: withUnsafePointer(to: obj.cOpaqueStruct!) { (objPointer: UnsafePointer<LDKChannelMonitorUpdate>) in
40 ChannelMonitorUpdate_write(objPointer)
44 public func read(ser: [UInt8]) -> Result_ChannelMonitorUpdateDecodeErrorZ {
46 return Result_ChannelMonitorUpdateDecodeErrorZ(pointer: ChannelMonitorUpdate_read(Bindings.new_LDKu8slice(array: ser)));
51 if self.cOpaqueStruct?.is_owned == false {
55 ChannelMonitorUpdate_free(self.cOpaqueStruct!)
61 /* STRUCT_METHODS_END */