Offer and Refund derive Debug, Clone, and PartialEq. For consistency,
derive these traits for InvoiceRequest and Invoice as well.
/// [`Offer`]: crate::offers::offer::Offer
/// [`Refund`]: crate::offers::refund::Refund
/// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
/// [`Offer`]: crate::offers::offer::Offer
/// [`Refund`]: crate::offers::refund::Refund
/// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
+#[derive(Clone, Debug, PartialEq)]
pub struct Invoice {
bytes: Vec<u8>,
contents: InvoiceContents,
pub struct Invoice {
bytes: Vec<u8>,
contents: InvoiceContents,
///
/// [`Offer`]: crate::offers::offer::Offer
/// [`Refund`]: crate::offers::refund::Refund
///
/// [`Offer`]: crate::offers::offer::Offer
/// [`Refund`]: crate::offers::refund::Refund
+#[derive(Clone, Debug, PartialEq)]
enum InvoiceContents {
/// Contents for an [`Invoice`] corresponding to an [`Offer`].
///
enum InvoiceContents {
/// Contents for an [`Invoice`] corresponding to an [`Offer`].
///
}
/// Invoice-specific fields for an `invoice` message.
}
/// Invoice-specific fields for an `invoice` message.
+#[derive(Clone, Debug, PartialEq)]
struct InvoiceFields {
payment_paths: Vec<(BlindedPath, BlindedPayInfo)>,
created_at: Duration,
struct InvoiceFields {
payment_paths: Vec<(BlindedPath, BlindedPayInfo)>,
created_at: Duration,
///
/// [`Invoice`]: crate::offers::invoice::Invoice
/// [`Offer`]: crate::offers::offer::Offer
///
/// [`Invoice`]: crate::offers::invoice::Invoice
/// [`Offer`]: crate::offers::offer::Offer
+#[derive(Clone, Debug, PartialEq)]
pub struct InvoiceRequest {
pub(super) bytes: Vec<u8>,
pub(super) contents: InvoiceRequestContents,
pub struct InvoiceRequest {
pub(super) bytes: Vec<u8>,
pub(super) contents: InvoiceRequestContents,
/// The contents of an [`InvoiceRequest`], which may be shared with an [`Invoice`].
///
/// [`Invoice`]: crate::offers::invoice::Invoice
/// The contents of an [`InvoiceRequest`], which may be shared with an [`Invoice`].
///
/// [`Invoice`]: crate::offers::invoice::Invoice
+#[derive(Clone, Debug, PartialEq)]
pub(super) struct InvoiceRequestContents {
payer: PayerContents,
pub(super) offer: OfferContents,
pub(super) struct InvoiceRequestContents {
payer: PayerContents,
pub(super) offer: OfferContents,