Regenerate auto-generated bindings with license info and new upstream
[ldk-c-bindings] / lightning-c-bindings / src / util / logger.rs
index 8a1fbb15d54340e37dccf5b0f6592a6020659681..e6b98de5b09a7688dda308cdcc2e5141e996025c 100644 (file)
@@ -1,3 +1,11 @@
+// This file is Copyright its original authors, visible in version control
+// history and in the source files from which this was generated.
+//
+// This file is licensed under the license available in the LICENSE or LICENSE.md
+// file in the root of this repository or, if no such file exists, the same
+// license as that which applies to the original source files from which this
+// source was automatically generated.
+
 //! Log traits live here, which are called throughout the library to provide useful information for
 //! debugging purposes.
 //!
@@ -74,6 +82,7 @@ impl Level {
                }
        }
 }
+/// Creates a copy of the Level
 #[no_mangle]
 pub extern "C" fn Level_clone(orig: &Level) -> Level {
        orig.clone()
@@ -89,9 +98,13 @@ pub extern "C" fn Level_max() -> crate::util::logger::Level {
 /// A trait encapsulating the operations required of a logger
 #[repr(C)]
 pub struct Logger {
+       /// An opaque pointer which is passed to your function implementations as an argument.
+       /// This has no meaning in the LDK, and can be NULL or any other value.
        pub this_arg: *mut c_void,
        /// Logs the `Record`
        pub log: extern "C" fn (this_arg: *const c_void, record: *const std::os::raw::c_char),
+       /// Frees any resources associated with this object given its this_arg pointer.
+       /// Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
        pub free: Option<extern "C" fn(this_arg: *mut c_void)>,
 }
 unsafe impl Sync for Logger {}