+/// Constructs a new ChannelInfo given each field
+#[must_use]
+#[no_mangle]
+pub extern "C" fn ChannelInfo_new(mut features_arg: crate::ln::features::ChannelFeatures, mut node_one_arg: crate::c_types::PublicKey, mut one_to_two_arg: crate::routing::network_graph::DirectionalChannelInfo, mut node_two_arg: crate::c_types::PublicKey, mut two_to_one_arg: crate::routing::network_graph::DirectionalChannelInfo, mut capacity_sats_arg: crate::c_types::derived::COption_u64Z, mut announcement_message_arg: crate::ln::msgs::ChannelAnnouncement) -> ChannelInfo {
+ let mut local_one_to_two_arg = if one_to_two_arg.inner.is_null() { None } else { Some( { *unsafe { Box::from_raw(one_to_two_arg.take_inner()) } }) };
+ let mut local_two_to_one_arg = if two_to_one_arg.inner.is_null() { None } else { Some( { *unsafe { Box::from_raw(two_to_one_arg.take_inner()) } }) };
+ let mut local_capacity_sats_arg = if capacity_sats_arg.is_some() { Some( { capacity_sats_arg.take() }) } else { None };
+ let mut local_announcement_message_arg = if announcement_message_arg.inner.is_null() { None } else { Some( { *unsafe { Box::from_raw(announcement_message_arg.take_inner()) } }) };
+ ChannelInfo { inner: Box::into_raw(Box::new(nativeChannelInfo {
+ features: *unsafe { Box::from_raw(features_arg.take_inner()) },
+ node_one: node_one_arg.into_rust(),
+ one_to_two: local_one_to_two_arg,
+ node_two: node_two_arg.into_rust(),
+ two_to_one: local_two_to_one_arg,
+ capacity_sats: local_capacity_sats_arg,
+ announcement_message: local_announcement_message_arg,
+ })), is_owned: true }
+}