Add new `(C-not implementable)` tag on `EventsProvider` 2021-05-new-tag
authorMatt Corallo <git@bluematt.me>
Sun, 30 May 2021 17:04:21 +0000 (17:04 +0000)
committerMatt Corallo <git@bluematt.me>
Sun, 30 May 2021 17:04:21 +0000 (17:04 +0000)
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

index 650df285f1d7dbd37131f6d0ca0364cf4327a1b9..7ce738898759752f11bf96779d1648bf4446dad0 100644 (file)
@@ -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