Add more docs for section
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
d4e067a947
commit
d400834f54
@ -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 crate::section_interface::SecId;
|
||||||
use rusqlite::{Error as SqlError, Row as SqlRow, ToSql};
|
use rusqlite::{Error as SqlError, Row as SqlRow, ToSql};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
/// Identifying integer type for a Section
|
||||||
pub type SectionId = u32;
|
pub type SectionId = u32;
|
||||||
|
|
||||||
|
/// A single logical section
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct Section {
|
pub struct Section {
|
||||||
pub id: SectionId,
|
pub id: SectionId,
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
/// ID number of the corresponding physical section
|
||||||
pub interface_id: SecId,
|
pub interface_id: SecId,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user