[bindings] Mark `WithContext` log wrapper with no-export
authorMatt Corallo <git@bluematt.me>
Thu, 18 Jan 2024 00:42:55 +0000 (00:42 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 24 Jan 2024 23:19:11 +0000 (23:19 +0000)
There's not a lot of reason for downstream users to use the
`WithContext` wrapper, it mostly exists for our own downstream
crates anyway, and dealing with lifetimes in bindings isn't super
practical, so simply no-export it.

lightning/src/util/logger.rs

index d1c768dc7fe19ead4480d9743fef8a7d8fbd4fd2..e48cefaa0443ff9c0a1f731a35fdc73fba57d17b 100644 (file)
@@ -158,6 +158,9 @@ pub trait Logger {
 }
 
 /// Adds relevant context to a [`Record`] before passing it to the wrapped [`Logger`].
+///
+/// This is not exported to bindings users as lifetimes are problematic and there's little reason
+/// for this to be used downstream anyway.
 pub struct WithContext<'a, L: Deref> where L::Target: Logger {
        /// The logger to delegate to after adding context to the record.
        logger: &'a L,