use rbx_dom_weak::{RbxId, RbxTree}; use crate::{ snapshot::InstanceSnapshot, vfs::{Vfs, VfsEntry, VfsFetcher, VfsSnapshot}, }; use super::{context::InstanceSnapshotContext, error::SnapshotError}; pub type SnapshotInstanceResult = Result, SnapshotError>; pub type SnapshotFileResult = Option<(String, VfsSnapshot)>; pub trait SnapshotMiddleware { fn from_vfs( context: &mut InstanceSnapshotContext, vfs: &Vfs, entry: &VfsEntry, ) -> SnapshotInstanceResult; fn from_instance(_tree: &RbxTree, _id: RbxId) -> SnapshotFileResult { None } }