@@ -239,7 +239,7 @@ pub struct InvoiceBuilder<D: tb::Bool, H: tb::Bool, T: tb::Bool, C: tb::Bool, S:
239
239
/// 1. using `InvoiceBuilder`
240
240
/// 2. using `Invoice::from_signed(SignedRawInvoice)`
241
241
/// 3. using `str::parse::<Invoice>(&str)`
242
- #[ derive( Eq , PartialEq , Debug , Clone ) ]
242
+ #[ derive( Eq , PartialEq , Debug , Clone , Hash ) ]
243
243
pub struct Invoice {
244
244
signed_invoice : SignedRawInvoice ,
245
245
}
@@ -263,7 +263,7 @@ pub enum InvoiceDescription<'f> {
263
263
///
264
264
/// # Invariants
265
265
/// The hash has to be either from the deserialized invoice or from the serialized `raw_invoice`.
266
- #[ derive( Eq , PartialEq , Debug , Clone ) ]
266
+ #[ derive( Eq , PartialEq , Debug , Clone , Hash ) ]
267
267
pub struct SignedRawInvoice {
268
268
/// The rawInvoice that the signature belongs to
269
269
raw_invoice : RawInvoice ,
@@ -286,7 +286,7 @@ pub struct SignedRawInvoice {
286
286
/// De- and encoding should not lead to information loss but may lead to different hashes.
287
287
///
288
288
/// For methods without docs see the corresponding methods in `Invoice`.
289
- #[ derive( Eq , PartialEq , Debug , Clone ) ]
289
+ #[ derive( Eq , PartialEq , Debug , Clone , Hash ) ]
290
290
pub struct RawInvoice {
291
291
/// human readable part
292
292
pub hrp : RawHrp ,
@@ -298,7 +298,7 @@ pub struct RawInvoice {
298
298
/// Data of the `RawInvoice` that is encoded in the human readable part
299
299
///
300
300
/// (C-not exported) As we don't yet support Option<Enum>
301
- #[ derive( Eq , PartialEq , Debug , Clone ) ]
301
+ #[ derive( Eq , PartialEq , Debug , Clone , Hash ) ]
302
302
pub struct RawHrp {
303
303
/// The currency deferred from the 3rd and 4th character of the bech32 transaction
304
304
pub currency : Currency ,
@@ -311,7 +311,7 @@ pub struct RawHrp {
311
311
}
312
312
313
313
/// Data of the `RawInvoice` that is encoded in the data part
314
- #[ derive( Eq , PartialEq , Debug , Clone ) ]
314
+ #[ derive( Eq , PartialEq , Debug , Clone , Hash ) ]
315
315
pub struct RawDataPart {
316
316
/// generation time of the invoice
317
317
pub timestamp : PositiveTimestamp ,
@@ -326,11 +326,11 @@ pub struct RawDataPart {
326
326
///
327
327
/// The Unix timestamp representing the stored time has to be positive and no greater than
328
328
/// [`MAX_TIMESTAMP`].
329
- #[ derive( Eq , PartialEq , Debug , Clone ) ]
329
+ #[ derive( Eq , PartialEq , Debug , Clone , Hash ) ]
330
330
pub struct PositiveTimestamp ( Duration ) ;
331
331
332
332
/// SI prefixes for the human readable part
333
- #[ derive( Eq , PartialEq , Debug , Clone , Copy ) ]
333
+ #[ derive( Eq , PartialEq , Debug , Clone , Copy , Hash ) ]
334
334
pub enum SiPrefix {
335
335
/// 10^-3
336
336
Milli ,
@@ -456,7 +456,7 @@ pub enum Fallback {
456
456
}
457
457
458
458
/// Recoverable signature
459
- #[ derive( Clone , Debug , Eq , PartialEq ) ]
459
+ #[ derive( Clone , Debug , Hash , Eq , PartialEq ) ]
460
460
pub struct InvoiceSignature ( pub RecoverableSignature ) ;
461
461
462
462
/// Private routing information
0 commit comments