pub struct ReplicaStore { /* private fields */ }Expand description
Persistent replica state.
Implementations§
Source§impl ReplicaStore
impl ReplicaStore
pub fn open(path: &Path, root: &str) -> Result<Self>
Sourcepub fn open_with_id(
path: &Path,
root: &str,
id: Option<ReplicaId>,
) -> Result<Self>
pub fn open_with_id( path: &Path, root: &str, id: Option<ReplicaId>, ) -> Result<Self>
Open or create the store. id is used only when the store is created.
Sourcepub fn relocate(path: &Path, root: &str) -> Result<()>
pub fn relocate(path: &Path, root: &str) -> Result<()>
Record that the workspace this store belongs to now lives at root: its folder
was moved. Every state is kept — the store holds workspace-relative paths only —
so the replica carries on as the same replica rather than starting over.
pub fn meta(&self) -> Result<Meta>
pub fn get(&self, path: &str) -> Result<Option<PathState>>
pub fn all(&self) -> Result<Vec<(String, PathState)>>
pub fn any_materialized(&self) -> Result<bool>
Auto Trait Implementations§
impl !RefUnwindSafe for ReplicaStore
impl !UnwindSafe for ReplicaStore
impl Forget for ReplicaStore
impl Freeze for ReplicaStore
impl Move for ReplicaStore
impl Send for ReplicaStore
impl Sync for ReplicaStore
impl Unpin for ReplicaStore
impl UnsafeUnpin for ReplicaStore
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