From: Matt Corallo Date: Thu, 28 Sep 2023 03:03:38 +0000 (+0000) Subject: `crate`-only several BOLT12 methods that require unbounded generics X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=77aafd0b13639fee0c9ba3b0d1047ae68c18d505;p=rust-lightning `crate`-only several BOLT12 methods that require unbounded generics These are not expressible in C/most languages, and thus must be hidden. --- diff --git a/lightning/src/offers/invoice.rs b/lightning/src/offers/invoice.rs index 48dcfd9f5..c462e1ff7 100644 --- a/lightning/src/offers/invoice.rs +++ b/lightning/src/offers/invoice.rs @@ -424,7 +424,7 @@ impl UnsignedBolt12Invoice { /// Note: The hash computation may have included unknown, odd TLV records. /// /// This is not exported to bindings users as functions aren't currently mapped. - pub fn sign(mut self, sign: F) -> Result> + pub(crate) fn sign(mut self, sign: F) -> Result> where F: FnOnce(&Self) -> Result { diff --git a/lightning/src/offers/invoice_request.rs b/lightning/src/offers/invoice_request.rs index 4dd85b352..80770ccf2 100644 --- a/lightning/src/offers/invoice_request.rs +++ b/lightning/src/offers/invoice_request.rs @@ -395,7 +395,7 @@ impl UnsignedInvoiceRequest { /// Note: The hash computation may have included unknown, odd TLV records. /// /// This is not exported to bindings users as functions are not yet mapped. - pub fn sign(mut self, sign: F) -> Result> + pub(crate) fn sign(mut self, sign: F) -> Result> where F: FnOnce(&Self) -> Result { diff --git a/lightning/src/offers/merkle.rs b/lightning/src/offers/merkle.rs index ced3b08b7..0c5441cf5 100644 --- a/lightning/src/offers/merkle.rs +++ b/lightning/src/offers/merkle.rs @@ -76,7 +76,7 @@ impl AsRef for TaggedHash { /// Error when signing messages. #[derive(Debug, PartialEq)] -pub enum SignError { +pub(crate) enum SignError { /// User-defined error when signing the message. Signing(E), /// Error when verifying the produced signature using the given pubkey.