From 2a8ab6fc28ea34ee8db0859e48f2fdf8516f16db Mon Sep 17 00:00:00 2001 From: Max Fang Date: Tue, 23 Jul 2024 17:11:10 -0700 Subject: [PATCH] lightning-invoice: Add `Description::as_inner` --- lightning-invoice/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lightning-invoice/src/lib.rs b/lightning-invoice/src/lib.rs index 9030596ec..2df015d1a 100644 --- a/lightning-invoice/src/lib.rs +++ b/lightning-invoice/src/lib.rs @@ -1526,6 +1526,11 @@ impl Description { pub fn into_inner(self) -> UntrustedString { self.0 } + + /// Get a reference to the underlying description [`UntrustedString`] + pub fn as_inner(&self) -> &UntrustedString { + &self.0 + } } impl Display for Description { -- 2.39.5