Add some useful standard trait implementations
This commit is contained in:
parent
6c82001ead
commit
356d13e465
|
@ -49,7 +49,7 @@ pub const USER_AGENT: &'static str = "bitcoin-rust v0.1";
|
|||
|
||||
user_enum! {
|
||||
/// The cryptocurrency to act on
|
||||
#[derive(Copy, PartialEq, Eq, Clone, Hash)]
|
||||
#[derive(Copy, PartialEq, Eq, PartialOrd, Ord, Clone, Hash)]
|
||||
pub enum Network {
|
||||
/// Classic Bitcoin
|
||||
Bitcoin <-> "bitcoin",
|
||||
|
|
|
@ -30,7 +30,7 @@ use util::base58;
|
|||
use util::Error;
|
||||
|
||||
/// The method used to produce an address
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub enum Payload {
|
||||
/// pay-to-pubkey
|
||||
Pubkey(PublicKey),
|
||||
|
@ -42,7 +42,7 @@ pub enum Payload {
|
|||
WitnessProgram(WitnessProgram),
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq)]
|
||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
/// A Bitcoin address
|
||||
pub struct Address {
|
||||
/// The type of the address
|
||||
|
|
Loading…
Reference in New Issue