From b295976fa8b50c4931cf3d96b2833802538886ef Mon Sep 17 00:00:00 2001 From: Nathan Rashleigh Date: Fri, 9 Oct 2026 23:59:16 +1100 Subject: [PATCH] system.rs --- src/{03_lab.md => 03_facility.md} | 0 src/04_system.rs | 8 ++++++++ src/_path.md | 1 + src/main.rs | 5 ++++- src/system.rs | 29 +++++++++++++++++++++++++++++ 5 files changed, 42 insertions(+), 1 deletion(-) rename src/{03_lab.md => 03_facility.md} (100%) create mode 100644 src/04_system.rs create mode 100644 src/system.rs diff --git a/src/03_lab.md b/src/03_facility.md similarity index 100% rename from src/03_lab.md rename to src/03_facility.md diff --git a/src/04_system.rs b/src/04_system.rs new file mode 100644 index 0000000..1534929 --- /dev/null +++ b/src/04_system.rs @@ -0,0 +1,8 @@ +fn search() { + let facility = Faciltity::current(); + let safe = facility.systems.db.sweep(); + match safe { + false => freak_the_fuck_out(), + _ => (), + } +} diff --git a/src/_path.md b/src/_path.md index ff58ef8..17a3357 100644 --- a/src/_path.md +++ b/src/_path.md @@ -5,6 +5,7 @@ the encounter the commute into the system evading the competition + chapter.rs feierabend the film more people going south diff --git a/src/main.rs b/src/main.rs index e7a11a9..6121442 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,6 @@ +mod system; +use system::search; + fn main() { - println!("Hello, world!"); + search() } diff --git a/src/system.rs b/src/system.rs new file mode 100644 index 0000000..f8a6b9b --- /dev/null +++ b/src/system.rs @@ -0,0 +1,29 @@ +use std::{thread::AccessError}; + +#[derive(Default)] +struct Database {} +impl Database { + fn sweep(self) -> Result<(), AccessError>{ + Ok(()) + } +} + +#[derive(Default)] +struct Nodes {} + +#[derive(Default)] +struct Systems { + db: Database, + nodes: Nodes, +} + +#[derive(Default)] +struct Faciltity { + systems: Systems +} + +pub fn search() { + let facility = Faciltity::default(); + let safe = facility.systems.db.sweep(); + unimplemented!(); +}