-/// Constructs a new ChannelInfo given each field
-#[must_use]
-#[no_mangle]
-pub extern "C" fn ChannelInfo_new(mut features_arg: crate::lightning::ln::features::ChannelFeatures, mut node_one_arg: crate::lightning::routing::network_graph::NodeId, mut one_to_two_arg: crate::lightning::routing::network_graph::DirectionalChannelInfo, mut node_two_arg: crate::lightning::routing::network_graph::NodeId, mut two_to_one_arg: crate::lightning::routing::network_graph::DirectionalChannelInfo, mut capacity_sats_arg: crate::c_types::derived::COption_u64Z, mut announcement_message_arg: crate::lightning::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: ObjOps::heap_alloc(nativeChannelInfo {
- features: *unsafe { Box::from_raw(features_arg.take_inner()) },
- node_one: *unsafe { Box::from_raw(node_one_arg.take_inner()) },
- one_to_two: local_one_to_two_arg,
- node_two: *unsafe { Box::from_raw(node_two_arg.take_inner()) },
- two_to_one: local_two_to_one_arg,
- capacity_sats: local_capacity_sats_arg,
- announcement_message: local_announcement_message_arg,
- }), is_owned: true }
-}