Update auto-generated bindings to 0.0.106
[ldk-c-bindings] / lightning-c-bindings / src / lightning_persister.rs
index 0ab058294e0301cda3882a3e7a1ccdbb40693947..cd112e9c488cf3ad608750bcd897125d9a204eef 100644 (file)
@@ -116,6 +116,16 @@ pub extern "C" fn FilesystemPersister_persist_manager(mut data_dir: crate::c_typ
        local_ret
 }
 
+/// Write the provided `NetworkGraph` to the path provided at `FilesystemPersister`
+/// initialization, within a file called \"network_graph\"
+#[must_use]
+#[no_mangle]
+pub extern "C" fn FilesystemPersister_persist_network_graph(mut data_dir: crate::c_types::Str, network_graph: &crate::lightning::routing::network_graph::NetworkGraph) -> crate::c_types::derived::CResult_NoneErrorZ {
+       let mut ret = lightning_persister::FilesystemPersister::persist_network_graph(data_dir.into_string(), network_graph.get_native_ref());
+       let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::c_types::IOError::from_rust(e) }).into() };
+       local_ret
+}
+
 /// Read `ChannelMonitor`s from disk.
 #[must_use]
 #[no_mangle]