pub struct PeekMut<'a, T> { /* private fields */ }
๐ฌThis is a nightly-only experimental API. (
vec_peek_mut
)Expand description
Implementationsยง
Trait Implementationsยง
Auto Trait Implementationsยง
impl<'a, T> Freeze for PeekMut<'a, T>
impl<'a, T> RefUnwindSafe for PeekMut<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for PeekMut<'a, T>where
T: Send,
impl<'a, T> Sync for PeekMut<'a, T>where
T: Sync,
impl<'a, T> Unpin for PeekMut<'a, T>
impl<'a, T> !UnwindSafe for PeekMut<'a, T>
Blanket Implementationsยง
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
Sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Sourceยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSourceยงimpl<S, T> ScoreLookUp for Twhere
S: ScoreLookUp,
T: Deref<Target = S>,
impl<S, T> ScoreLookUp for Twhere
S: ScoreLookUp,
T: Deref<Target = S>,
Sourceยงtype ScoreParams = <S as ScoreLookUp>::ScoreParams
type ScoreParams = <S as ScoreLookUp>::ScoreParams
A configurable type which should contain various passed-in parameters for configuring the scorer,
on a per-routefinding-call basis through to the scorer methods,
which are used to determine the parameters for the suitability of channels for use.
Sourceยงfn channel_penalty_msat(
&self,
candidate: &CandidateRouteHop<'_>,
usage: ChannelUsage,
score_params: &<T as ScoreLookUp>::ScoreParams,
) -> u64
fn channel_penalty_msat( &self, candidate: &CandidateRouteHop<'_>, usage: ChannelUsage, score_params: &<T as ScoreLookUp>::ScoreParams, ) -> 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 moreSourceยงimpl<S, T> ScoreUpdate for Twhere
S: ScoreUpdate,
T: DerefMut<Target = S>,
impl<S, T> ScoreUpdate for Twhere
S: ScoreUpdate,
T: DerefMut<Target = S>,
Sourceยงfn payment_path_failed(
&mut self,
path: &Path,
short_channel_id: u64,
duration_since_epoch: Duration,
)
fn payment_path_failed( &mut self, path: &Path, short_channel_id: u64, duration_since_epoch: Duration, )
Handles updating channel penalties after failing to route through a channel.
Sourceยงfn payment_path_successful(
&mut self,
path: &Path,
duration_since_epoch: Duration,
)
fn payment_path_successful( &mut self, path: &Path, duration_since_epoch: Duration, )
Handles updating channel penalties after successfully routing along a path.
Sourceยงfn probe_failed(
&mut self,
path: &Path,
short_channel_id: u64,
duration_since_epoch: Duration,
)
fn probe_failed( &mut self, path: &Path, short_channel_id: u64, duration_since_epoch: Duration, )
Handles updating channel penalties after a probe over the given path failed.
Sourceยงfn probe_successful(&mut self, path: &Path, duration_since_epoch: Duration)
fn probe_successful(&mut self, path: &Path, duration_since_epoch: Duration)
Handles updating channel penalties after a probe over the given path succeeded.
Sourceยงfn time_passed(&mut self, duration_since_epoch: Duration)
fn time_passed(&mut self, duration_since_epoch: Duration)
Scorers may wish to reduce their certainty of channel liquidity information over time.
Thus, this method is provided to allow scorers to observe the passage of time - the holder
of this object should call this method regularly (generally via the
lightning-background-processor
crate).