Skip to content

Commit

Permalink
Add status report struct
Browse files Browse the repository at this point in the history
  • Loading branch information
devanlooches committed Aug 2, 2022
1 parent 0a6f259 commit 2f737d5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/fj-interop/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
pub mod debug;
pub mod mesh;
pub mod processed_shape;
pub mod status_report;
21 changes: 21 additions & 0 deletions crates/fj-interop/src/status_report.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//! Struct to store and update status messages
pub struct StatusReport {
status: String,
}

impl StatusReport {
pub fn new() -> Self {
StatusReport {
status: String::new(),
}
}

pub fn update_status(&mut self, status: &str) {
self.status = status.to_string();
}

pub fn status(&self) -> &str {
self.status.as_str()
}
}

0 comments on commit 2f737d5

Please sign in to comment.