Trait lightning::routing::scoring::LockableScore
source · pub trait LockableScore<'a> {
type Locked: 'a + Score;
// Required method
fn lock(&'a self) -> Self::Locked;
}
Expand description
A scorer that is accessed under a lock.
Needed so that calls to Score::channel_penalty_msat
in find_route
can be made while
having shared ownership of a scorer but without requiring internal locking in Score
implementations. Internal locking would be detrimental to route finding performance and could
result in Score::channel_penalty_msat
returning a different value for the same channel.
Required Associated Types§
Required Methods§
Implementations on Foreign Types§
source§impl<'a, T: 'a + Score> LockableScore<'a> for Mutex<T>
impl<'a, T: 'a + Score> LockableScore<'a> for Mutex<T>
This is not exported to bindings users