Merge pull request #1346 from TheBlueMatt/2022-03-clones
[rust-lightning] / lightning / src / routing / scoring.rs
index b02b61fa9f6c0381fe9fd7ffcad4eedd23656be5..537d75012abc88b9233d403c03aac469b2cf77e4 100644 (file)
@@ -189,6 +189,7 @@ impl<'a, S: Writeable> Writeable for MutexGuard<'a, S> {
        }
 }
 
+#[derive(Clone)]
 /// [`Score`] implementation that uses a fixed penalty.
 pub struct FixedPenaltyScorer {
        penalty_msat: u64,
@@ -246,13 +247,13 @@ type ConfiguredTime = time::Eternity;
 /// [`Score`] implementation.
 ///
 /// (C-not exported) generally all users should use the [`Scorer`] type alias.
-#[doc(hidden)]
 pub struct ScorerUsingTime<T: Time> {
        params: ScoringParameters,
        // TODO: Remove entries of closed channels.
        channel_failures: HashMap<u64, ChannelFailure<T>>,
 }
 
+#[derive(Clone)]
 /// Parameters for configuring [`Scorer`].
 pub struct ScoringParameters {
        /// A fixed penalty in msats to apply to each channel.
@@ -493,7 +494,6 @@ pub type ProbabilisticScorer<G> = ProbabilisticScorerUsingTime::<G, ConfiguredTi
 /// Probabilistic [`Score`] implementation.
 ///
 /// (C-not exported) generally all users should use the [`ProbabilisticScorer`] type alias.
-#[doc(hidden)]
 pub struct ProbabilisticScorerUsingTime<G: Deref<Target = NetworkGraph>, T: Time> {
        params: ProbabilisticScoringParameters,
        network_graph: G,