diff --git a/crates/loro-ffi/src/doc.rs b/crates/loro-ffi/src/doc.rs index 57c8fea7..a550454f 100644 --- a/crates/loro-ffi/src/doc.rs +++ b/crates/loro-ffi/src/doc.rs @@ -305,6 +305,12 @@ impl LoroDoc { self.doc.export(loro::ExportMode::Snapshot) } + pub fn export_snapshot_at(&self, frontiers: &Frontiers) -> Result, LoroEncodeError> { + self.doc.export(loro::ExportMode::SnapshotAt { + version: Cow::Owned(frontiers.into()), + }) + } + pub fn frontiers_to_vv(&self, frontiers: &Frontiers) -> Option> { self.doc .frontiers_to_vv(&frontiers.into())