From 73cd06b4dc236577623de3c36aa3a3af87fc1f4e Mon Sep 17 00:00:00 2001 From: Henry de Valence Date: Sat, 14 Sep 2019 08:15:22 -0700 Subject: [PATCH] Add derived impls to newtypes --- zebra-network/src/types.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zebra-network/src/types.rs b/zebra-network/src/types.rs index 996f16bd6..105a9c486 100644 --- a/zebra-network/src/types.rs +++ b/zebra-network/src/types.rs @@ -1,15 +1,19 @@ //! Newtype wrappers assigning semantic meaning to primitive types. /// A magic number identifying the network. +#[derive(Copy, Clone, Debug, Eq, PartialEq)] pub struct Magic(pub u32); /// A protocol version number. +#[derive(Copy, Clone, Debug, Eq, PartialEq)] pub struct Version(pub u32); /// Bitfield of features to be enabled for this connection. // Tower provides utilities for service discovery, so this might go // away in the future in favor of that. +#[derive(Copy, Clone, Debug, Eq, PartialEq)] pub struct Services(pub u64); /// A nonce used in the networking layer to identify messages. +#[derive(Copy, Clone, Debug, Eq, PartialEq)] pub struct Nonce(pub u64); \ No newline at end of file