#[cfg(feature = "no-std")]
type ConfiguredTime = time_utils::Eternity;
-/// Sealed trait with a blanket implementation to allow both sync and async implementations of event
-/// handling to exist within the InvoicePayer.
-mod sealed {
- pub trait BaseEventHandler {}
- impl<T> BaseEventHandler for T {}
-}
-
/// (C-not exported) generally all users should use the [`InvoicePayer`] type alias.
pub struct InvoicePayerUsingTime<
P: Deref,
R: Router,
L: Deref,
- E: sealed::BaseEventHandler,
+ E: EventHandler,
T: Time
> where
P::Target: Payer,
Sending(PaymentSendFailure),
}
-impl<P: Deref, R: Router, L: Deref, E: sealed::BaseEventHandler, T: Time>
+impl<P: Deref, R: Router, L: Deref, E: EventHandler, T: Time>
InvoicePayerUsingTime<P, R, L, E, T>
where
P::Target: Payer,
} else { false }
}
-impl<P: Deref, R: Router, L: Deref, E: sealed::BaseEventHandler, T: Time>
+impl<P: Deref, R: Router, L: Deref, E: EventHandler, T: Time>
InvoicePayerUsingTime<P, R, L, E, T>
where
P::Target: Payer,
}
}
+#[cfg(not(c_bindings))]
impl<P: Deref, R: Router, L: Deref, T: Time, F: Future, H: Fn(Event) -> F>
InvoicePayerUsingTime<P, R, L, H, T>
where