pub struct ScorerUsingTime<T: Time> { /* private fields */ }
Expand description
Implementations
sourceimpl<T: Time> ScorerUsingTime<T>
impl<T: Time> ScorerUsingTime<T>
sourcepub fn new(params: ScoringParameters) -> Self
pub fn new(params: ScoringParameters) -> Self
Creates a new scorer using the given scoring parameters.
Trait Implementations
sourceimpl<T: Time> Default for ScorerUsingTime<T>
impl<T: Time> Default for ScorerUsingTime<T>
sourceimpl<T: Time> Readable for ScorerUsingTime<T>
impl<T: Time> Readable for ScorerUsingTime<T>
sourceimpl<T: Time> Score for ScorerUsingTime<T>
impl<T: Time> Score for ScorerUsingTime<T>
sourcefn channel_penalty_msat(
&self,
short_channel_id: u64,
send_amt_msat: u64,
capacity_msat: u64,
_source: &NodeId,
_target: &NodeId
) -> u64
fn channel_penalty_msat(
&self,
short_channel_id: u64,
send_amt_msat: u64,
capacity_msat: u64,
_source: &NodeId,
_target: &NodeId
) -> u64
Returns the fee in msats willing to be paid to avoid routing send_amt_msat
through the
given channel in the direction from source
to target
. Read more
sourcefn payment_path_failed(&mut self, _path: &[&RouteHop], short_channel_id: u64)
fn payment_path_failed(&mut self, _path: &[&RouteHop], short_channel_id: u64)
Handles updating channel penalties after failing to route through a channel.
sourcefn payment_path_successful(&mut self, path: &[&RouteHop])
fn payment_path_successful(&mut self, path: &[&RouteHop])
Handles updating channel penalties after successfully routing along a path.
sourceimpl<T: Time> Writeable for ScorerUsingTime<T>
impl<T: Time> Writeable for ScorerUsingTime<T>
sourcefn encode(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn encode(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Writes self out to a Vec
sourcefn encode_with_len(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn encode_with_len(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Writes self out to a Vec
sourcefn serialized_length(&self) -> usize
fn serialized_length(&self) -> usize
Gets the length of this object after it has been serialized. This can be overridden to optimize cases where we prepend an object with its length. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for ScorerUsingTime<T> where
T: RefUnwindSafe,
impl<T> Send for ScorerUsingTime<T> where
T: Send,
impl<T> Sync for ScorerUsingTime<T> where
T: Sync,
impl<T> Unpin for ScorerUsingTime<T> where
T: Unpin,
impl<T> UnwindSafe for ScorerUsingTime<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more