void ChannelMonitor_free(struct LDKChannelMonitor this_ptr);
+struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
+
struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
/**
unsafe { Box::from_raw(std::slice::from_raw_parts_mut(self.data, self.datalen)) };
}
}
+impl Clone for CVec_ChannelMonitorZ {
+ fn clone(&self) -> Self {
+ let mut res = Vec::new();
+ if self.datalen == 0 { return Self::from(res); }
+ res.extend_from_slice(unsafe { std::slice::from_raw_parts_mut(self.data, self.datalen) });
+ Self::from(res)
+ }
+}
#[repr(C)]
pub struct C2Tuple_BlockHashChannelManagerZ {
pub a: crate::c_types::ThirtyTwoBytes,
ret
}
}
+impl Clone for ChannelMonitor {
+ fn clone(&self) -> Self {
+ Self {
+ inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
+ is_owned: true,
+ }
+ }
+}
+#[allow(unused)]
+/// Used only if an object of this type is returned as a trait impl by a method
+pub(crate) extern "C" fn ChannelMonitor_clone_void(this_ptr: *const c_void) -> *mut c_void {
+ Box::into_raw(Box::new(unsafe { (*(this_ptr as *mut nativeChannelMonitor)).clone() })) as *mut c_void
+}
+#[no_mangle]
+pub extern "C" fn ChannelMonitor_clone(orig: &ChannelMonitor) -> ChannelMonitor {
+ orig.clone()
+}
#[no_mangle]
pub extern "C" fn ChannelMonitor_write(obj: &ChannelMonitor) -> crate::c_types::derived::CVec_u8Z {
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })