new and getter

This commit is contained in:
2024-09-07 15:30:22 -04:00
parent 0c36b899da
commit 5b5b749738
2 changed files with 13 additions and 5 deletions

View File

@@ -1,4 +1,14 @@
pub struct StateOwner {
pub state: String,
state: String,
}
impl StateOwner {
pub fn new(state: String) -> StateOwner {
StateOwner { state }
}
pub fn get_state(&self) -> &str {
&self.state
}
}