Add more docs for section
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Alex Mikhalev 2020-09-18 12:20:59 -06:00
parent d4e067a947
commit d400834f54

View File

@ -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,
}