From 27c05fdd7f7ac8c485dbeb64a65215ce9deae0df Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 30 May 2021 17:04:21 +0000 Subject: [PATCH] Add new `(C-not implementable)` tag on `EventsProvider` This makes it so that users cannot usefully implement their own `EventsProvider`, which would require substantial new logic in the bindings generator (for generic methods). In the case of `EventsProvider`, because there are no Rust methods which accept an `EventsProvider` as an argument, this is perfectly OK as the generated code would be entirely unused anyway. --- lightning/src/util/events.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lightning/src/util/events.rs b/lightning/src/util/events.rs index 650df285f..7ce738898 100644 --- a/lightning/src/util/events.rs +++ b/lightning/src/util/events.rs @@ -395,6 +395,9 @@ pub trait MessageSendEventsProvider { /// may safely use the provider (e.g., see [`ChannelManager::process_pending_events`] and /// [`ChainMonitor::process_pending_events`]). /// +/// (C-not implementable) As there is likely no reason for a user to implement this trait on their +/// own type(s). +/// /// [`process_pending_events`]: Self::process_pending_events /// [`handle_event`]: EventHandler::handle_event /// [`ChannelManager::process_pending_events`]: crate::ln::channelmanager::ChannelManager#method.process_pending_events -- 2.39.5