rojo/server/src/serve_session.rs
Lucien Greathouse 2b808b12fe Rewrite progress
2018-08-19 20:10:57 -07:00

37 lines
No EOL
682 B
Rust

use std::{
sync::Arc,
};
use ::{
message_session::MessageSession,
rbx::RbxTree,
project::Project,
};
pub struct ServeSession {
project: Project,
messages: Arc<MessageSession>,
tree: Arc<RbxTree>,
}
impl ServeSession {
pub fn new(project: Project) -> ServeSession {
ServeSession {
project,
messages: Arc::new(MessageSession::new()),
tree: Arc::new(RbxTree::new()),
}
}
pub fn get_project(&self) -> &Project {
&self.project
}
pub fn get_messages(&self) -> &MessageSession {
&self.messages
}
pub fn get_tree(&self) -> &RbxTree {
&self.tree
}
}