mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-24 15:01:38 +00:00
Rewrite progress
This commit is contained in:
parent
4df3f7f1ff
commit
2b808b12fe
6 changed files with 172 additions and 119 deletions
37
server/src/serve_session.rs
Normal file
37
server/src/serve_session.rs
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
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
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue