Major Subsystem Rewrite (Reconciler Mk5) (#217)

This commit is contained in:
Lucien Greathouse 2019-08-27 15:00:37 -07:00 • committed by GitHub
parent 8e8291a0bd
commit fea303ac8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
80 changed files with 3843 additions and 5609 deletions

View file

@ -0,0 +1,39 @@
use std::{
path::{PathBuf, Path},
};
use rbx_dom_weak::{RbxTree, RbxId};
use crate::{
imfs::{
FsResult,
new::{
Imfs,
ImfsEntry,
ImfsFetcher,
ImfsSnapshot,
},
},
snapshot::InstanceSnapshot,
};
pub type SnapshotInstanceResult<'a> = FsResult<Option<InstanceSnapshot<'a>>>;
pub type SnapshotFileResult = Option<(String, ImfsSnapshot)>;
pub trait SnapshotMiddleware {
fn from_imfs<F: ImfsFetcher>(
imfs: &mut Imfs<F>,
entry: &ImfsEntry,
) -> SnapshotInstanceResult<'static>;
fn from_instance(
tree: &RbxTree,
id: RbxId,
) -> SnapshotFileResult;
fn change_affects_paths(
path: &Path
) -> Vec<PathBuf> {
vec![path.to_path_buf()]
}
}