-pub mod scorer;
-/// An interface used to score payment channels for path finding.
-///
-///\tScoring is in terms of fees willing to be paid in order to avoid routing through a channel.
-#[repr(C)]
-pub struct Score {
- /// 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,
- /// Returns the fee in msats willing to be paid to avoid routing through the given channel.
- #[must_use]
- pub channel_penalty_msat: extern "C" fn (this_arg: *const c_void, short_channel_id: u64) -> u64,
- /// 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 Send for Score {}
-unsafe impl Sync for Score {}
-#[no_mangle]
-pub(crate) extern "C" fn Score_clone_fields(orig: &Score) -> Score {
- Score {
- this_arg: orig.this_arg,
- channel_penalty_msat: Clone::clone(&orig.channel_penalty_msat),
- free: Clone::clone(&orig.free),
- }
-}