mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Add Imfs to ServeSession, threading through generic ImfsFetcher
This commit is contained in:
parent
651e63a0fb
commit
8481caa67c
5 changed files with 37 additions and 29 deletions
|
|
@ -1,19 +1,24 @@
|
|||
use std::collections::HashSet;
|
||||
|
||||
use crate::{
|
||||
message_queue::MessageQueue, project::Project, session_id::SessionId, snapshot::RojoTree,
|
||||
imfs::new::{Imfs, ImfsFetcher},
|
||||
message_queue::MessageQueue,
|
||||
project::Project,
|
||||
session_id::SessionId,
|
||||
snapshot::RojoTree,
|
||||
};
|
||||
|
||||
/// Contains all of the state for a Rojo serve session.
|
||||
pub struct ServeSession {
|
||||
pub struct ServeSession<F> {
|
||||
root_project: Option<Project>,
|
||||
session_id: SessionId,
|
||||
tree: RojoTree,
|
||||
message_queue: MessageQueue<()>, // TODO: Real message type
|
||||
imfs: Imfs<F>,
|
||||
}
|
||||
|
||||
impl ServeSession {
|
||||
pub fn new(tree: RojoTree, root_project: Option<Project>) -> ServeSession {
|
||||
impl<F: ImfsFetcher> ServeSession<F> {
|
||||
pub fn new(imfs: Imfs<F>, tree: RojoTree, root_project: Option<Project>) -> Self {
|
||||
let session_id = SessionId::new();
|
||||
let message_queue = MessageQueue::new();
|
||||
|
||||
|
|
@ -22,6 +27,7 @@ impl ServeSession {
|
|||
root_project,
|
||||
tree,
|
||||
message_queue,
|
||||
imfs,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue