diff --git a/backend/common/src/internal_messages.rs b/backend/common/src/internal_messages.rs index b6a2330..c5f3d23 100644 --- a/backend/common/src/internal_messages.rs +++ b/backend/common/src/internal_messages.rs @@ -1,3 +1,5 @@ +//! Internal messages passed between the shard and telemetry core. + use std::net::IpAddr; use crate::id_type; diff --git a/backend/common/src/log_level.rs b/backend/common/src/log_level.rs index 73e2103..dc4c43b 100644 --- a/backend/common/src/log_level.rs +++ b/backend/common/src/log_level.rs @@ -1,5 +1,6 @@ -/// A log level that can be used as an expected argument, -/// decoded from a string, and converted into a [`log::LevelFilter`] +/// A log level that can be decoded from a string (and so can be used +/// as a CLI argument by things like StructOpt). It can be converted into +/// a [`log::LevelFilter`] for passing into logging systems. #[derive(Debug, PartialEq)] pub enum LogLevel { Error, diff --git a/backend/common/src/node_message.rs b/backend/common/src/node_message.rs index 25c7cd9..b8a87fe 100644 --- a/backend/common/src/node_message.rs +++ b/backend/common/src/node_message.rs @@ -1,3 +1,8 @@ +//! This is the internal represenation of telemetry messages sent from nodes. +//! There is a separate JSON representation of these types, because internally we want to be +//! able to serialize these messages to bincode, and various serde attribtues aren't compatible +//! with this, hence this separate internal representation. + use crate::node_types::{Block, BlockHash, BlockNumber, NodeDetails}; use serde::{Deserialize, Serialize}; diff --git a/backend/common/src/node_types.rs b/backend/common/src/node_types.rs index 7e8805a..d4eecfd 100644 --- a/backend/common/src/node_types.rs +++ b/backend/common/src/node_types.rs @@ -1,3 +1,6 @@ +//! These types are partly used in [`crate::node_message`], but also stored and used +//! more generally through the application. + use serde::ser::{SerializeTuple, Serializer}; use serde::{Deserialize, Serialize};