From: Matt Corallo Date: Sun, 30 May 2021 16:17:25 +0000 (+0000) Subject: Add an export tag to indicate users cannot implement a given trait X-Git-Tag: v0.0.98~5^2~6 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=abc2e0d8b1b385b820387da354bfe3694d433bb2;hp=abc2e0d8b1b385b820387da354bfe3694d433bb2;p=ldk-c-bindings Add an export tag to indicate users cannot implement a given trait Specifically, for the LDK `EventsProvider` trait, we can't (trivially) implement the `process_pending_events` function, defined as: `fn process_pending_events(&self, handler: H) where H::Target: EventHandler;` We currently do not support implementing generic methods, as we'd need to wrap them in a generic Rust-trait-to-C-trait conversion utility, which we do not currently have. Thus, because users almost certainly have no reason to implement the `EventsProvider` themselves, its simpler to simply prevent the use of the C trait struct as the Rust trait. Concretely, this means just skipping the `impl rustEventsProvider for CEventsProvider` block, which works fine as no Rust functions take an `EventsProvider` as an argument. ---