pub struct Store {
connection: Connection,
}Fields§
§connection: ConnectionImplementations§
Source§impl Store
impl Store
Sourcepub fn open(path: &Path) -> Result<Self>
pub fn open(path: &Path) -> Result<Self>
§Errors
The file cannot be opened or the schema cannot be applied. A missing file is created, not an error: that is an empty document.
Sourcepub fn append(&self, rev: Rev, commit: &Commit) -> Result<()>
pub fn append(&self, rev: Rev, commit: &Commit) -> Result<()>
§Errors
The insert fails. The caller must not publish the commit if so — a commit the server has broadcast must survive a restart.
Sourcepub fn replay(&self) -> Result<Vec<(u64, Commit)>>
pub fn replay(&self) -> Result<Vec<(u64, Commit)>>
Every commit in rev order, with the rev the row claims.
The rev comes back as a plain integer rather than a [Rev]: revs
are minted by the fold and nothing outside it may forge one, so the
caller’s job is to check that replaying reproduces this number,
not to trust it.
§Errors
A row that will not decode. Never skipped — half-loading a log written by a newer build forks the document silently.
Auto Trait Implementations§
impl !Freeze for Store
impl !RefUnwindSafe for Store
impl Send for Store
impl !Sync for Store
impl Unpin for Store
impl UnsafeUnpin for Store
impl !UnwindSafe for Store
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more