codemp/src/server/workspace.rs
alemidev 7272879180 feat: state manager with message passing
Co-authored-by: f-tlm <f-tlm@users.noreply.github.com>
2022-07-13 01:58:01 +02:00

18 lines
428 B
Rust

// Must be clonable, containing references to the actual state maybe? Or maybe give everyone an Arc, idk
#[derive(Debug)]
pub struct Workspace {
pub name: String,
pub content: String,
}
impl Workspace {
pub fn new(name: String, content: String) -> Self {
Workspace { name , content }
}
}
impl Default for Workspace {
fn default() -> Self {
Workspace { name: "fuck you".to_string() , content: "too".to_string() }
}
}