automerge/rust/automerge/src/storage.rs
Alex Good dd3c6d1303
Move rust workspace into ./rust
After some discussion with PVH I realise that the repo structure in the
last reorg was very rust-centric. In an attempt to put each language on
a level footing move the rust code and project files into ./rust
2022-10-16 19:55:51 +01:00

23 lines
642 B
Rust

use std::ops::Range;
pub(crate) mod change;
mod chunk;
mod columns;
pub(crate) mod convert;
mod document;
pub(crate) mod load;
pub(crate) mod parse;
pub(crate) mod save;
pub(crate) use {
change::{AsChangeOp, Change, ChangeOp, Compressed, ReadChangeOpError},
chunk::{CheckSum, Chunk, ChunkType, Header},
columns::{Columns, MismatchingColumn, RawColumn, RawColumns},
document::{AsChangeMeta, AsDocOp, ChangeMetadata, CompressConfig, DocOp, Document},
};
fn shift_range(range: Range<usize>, by: usize) -> Range<usize> {
range.start + by..range.end + by
}
pub(crate) const MAGIC_BYTES: [u8; 4] = [0x85, 0x6f, 0x4a, 0x83];