}
/// Returns the network for which the invoice was issued
+ ///
+ /// This is not exported to bindings users, see [`Self::currency`] instead.
pub fn network(&self) -> Network {
self.signed_invoice.currency().into()
}
fn deserialize<D>(deserializer: D) -> Result<Invoice, D::Error> where D: Deserializer<'de> {
let bolt11 = String::deserialize(deserializer)?
.parse::<Invoice>()
- .map_err(|e| D::Error::custom(format!("{:?}", e)))?;
+ .map_err(|e| D::Error::custom(alloc::format!("{:?}", e)))?;
Ok(bolt11)
}