From d400834f54e74b54941dde8f42bb3c975304ed20 Mon Sep 17 00:00:00 2001 From: Alex Mikhalev Date: Fri, 18 Sep 2020 12:20:59 -0600 Subject: [PATCH] Add more docs for section --- src/model/section.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/model/section.rs b/src/model/section.rs index 4e5dd4b..f847718 100644 --- a/src/model/section.rs +++ b/src/model/section.rs @@ -1,13 +1,23 @@ +//! Data models for sprinklers sections +//! +//! A section represents a group of sprinkler heads actuated by a single +//! valve. Physically controllable (or virtual) valves are handled by implementations of +//! [SectionInterface](../../section_interface/trait.SectionInterface.html), but the model +//! describes a logical section and how it maps to a physical one. + use crate::section_interface::SecId; use rusqlite::{Error as SqlError, Row as SqlRow, ToSql}; use std::sync::Arc; +/// Identifying integer type for a Section pub type SectionId = u32; +/// A single logical section #[derive(Debug, Clone)] pub struct Section { pub id: SectionId, pub name: String, + /// ID number of the corresponding physical section pub interface_id: SecId, }