pub struct SimpleOpStore { /* private fields */ }
Implementations§
Source§impl SimpleOpStore
impl SimpleOpStore
pub fn name() -> &'static str
Sourcepub fn init(
store_path: &Path,
root_data: RootOperationData,
) -> Result<Self, SimpleOpStoreInitError>
pub fn init( store_path: &Path, root_data: RootOperationData, ) -> Result<Self, SimpleOpStoreInitError>
Creates an empty OpStore. Returns error if it already exists.
Sourcepub fn load(store_path: &Path, root_data: RootOperationData) -> Self
pub fn load(store_path: &Path, root_data: RootOperationData) -> Self
Load an existing OpStore
Trait Implementations§
Source§impl Debug for SimpleOpStore
impl Debug for SimpleOpStore
Source§impl OpStore for SimpleOpStore
impl OpStore for SimpleOpStore
fn as_any(&self) -> &dyn Any
fn name(&self) -> &str
fn root_operation_id(&self) -> &OperationId
fn read_view(&self, id: &ViewId) -> OpStoreResult<View>
fn write_view(&self, view: &View) -> OpStoreResult<ViewId>
fn read_operation(&self, id: &OperationId) -> OpStoreResult<Operation>
fn write_operation(&self, operation: &Operation) -> OpStoreResult<OperationId>
Source§fn resolve_operation_id_prefix(
&self,
prefix: &HexPrefix,
) -> OpStoreResult<PrefixResolution<OperationId>>
fn resolve_operation_id_prefix( &self, prefix: &HexPrefix, ) -> OpStoreResult<PrefixResolution<OperationId>>
Resolves an unambiguous operation ID prefix.
Source§fn gc(
&self,
head_ids: &[OperationId],
keep_newer: SystemTime,
) -> OpStoreResult<()>
fn gc( &self, head_ids: &[OperationId], keep_newer: SystemTime, ) -> OpStoreResult<()>
Prunes unreachable operations and views. Read more
Auto Trait Implementations§
impl Freeze for SimpleOpStore
impl RefUnwindSafe for SimpleOpStore
impl Send for SimpleOpStore
impl Sync for SimpleOpStore
impl Unpin for SimpleOpStore
impl UnwindSafe for SimpleOpStore
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more