]> git.bitcoin.ninja Git - rust-lightning/commitdiff
lightning-invoice: Add `Description::as_inner`
authorMax Fang <protonmail.com@maxfa.ng>
Wed, 24 Jul 2024 00:11:10 +0000 (17:11 -0700)
committerMax Fang <protonmail.com@maxfa.ng>
Wed, 24 Jul 2024 00:16:12 +0000 (17:16 -0700)
lightning-invoice/src/lib.rs

index 9030596ecdf0fdbf1ca8d96c60e2863e65883db7..2df015d1a08f59cb97b26825821385ffc08f2e1a 100644 (file)
@@ -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 {