No longer need to derive Clone on message types
This commit is contained in:
parent
9362d26890
commit
8ab6256c3b
3 changed files with 4 additions and 4 deletions
|
@ -54,7 +54,7 @@ pub struct OrderTagStream(u64);
|
||||||
|
|
||||||
impl OrderTag {
|
impl OrderTag {
|
||||||
/// Create a new stream from which to generate order tags. Example:
|
/// Create a new stream from which to generate order tags. Example:
|
||||||
/// ```
|
/// ```ignore
|
||||||
/// let stream = OrderTag.stream();
|
/// let stream = OrderTag.stream();
|
||||||
/// let tag_1 = stream.order(1);
|
/// let tag_1 = stream.order(1);
|
||||||
/// let tag_2 = stream.order(2);
|
/// let tag_2 = stream.order(2);
|
||||||
|
|
|
@ -38,7 +38,7 @@ pub(crate) type VersionTag = [u8; 16];
|
||||||
/// Value of the Netapp version used in the version tag
|
/// Value of the Netapp version used in the version tag
|
||||||
pub(crate) const NETAPP_VERSION_TAG: u64 = 0x6e65746170700005; // netapp 0x0005
|
pub(crate) const NETAPP_VERSION_TAG: u64 = 0x6e65746170700005; // netapp 0x0005
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug, Clone)]
|
#[derive(Serialize, Deserialize, Debug)]
|
||||||
pub(crate) struct HelloMessage {
|
pub(crate) struct HelloMessage {
|
||||||
pub server_addr: Option<IpAddr>,
|
pub server_addr: Option<IpAddr>,
|
||||||
pub server_port: u16,
|
pub server_port: u16,
|
||||||
|
|
|
@ -30,7 +30,7 @@ const FAILED_PING_THRESHOLD: usize = 4;
|
||||||
|
|
||||||
// -- Protocol messages --
|
// -- Protocol messages --
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Clone)]
|
#[derive(Serialize, Deserialize)]
|
||||||
struct PingMessage {
|
struct PingMessage {
|
||||||
pub id: u64,
|
pub id: u64,
|
||||||
pub peer_list_hash: hash::Digest,
|
pub peer_list_hash: hash::Digest,
|
||||||
|
@ -40,7 +40,7 @@ impl Message for PingMessage {
|
||||||
type Response = PingMessage;
|
type Response = PingMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Clone)]
|
#[derive(Serialize, Deserialize)]
|
||||||
struct PeerListMessage {
|
struct PeerListMessage {
|
||||||
pub list: Vec<(NodeID, SocketAddr)>,
|
pub list: Vec<(NodeID, SocketAddr)>,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue