pub struct DefaultIndexStore { /* private fields */ }
Implementations§
Source§impl DefaultIndexStore
impl DefaultIndexStore
pub fn name() -> &'static str
pub fn init(dir: &Path) -> Result<Self, DefaultIndexStoreInitError>
pub fn load(dir: &Path) -> DefaultIndexStore
pub fn reinit(&self) -> Result<(), DefaultIndexStoreInitError>
Sourcepub fn build_index_at_operation(
&self,
operation: &Operation,
store: &Arc<Store>,
) -> Result<DefaultReadonlyIndex, DefaultIndexStoreError>
pub fn build_index_at_operation( &self, operation: &Operation, store: &Arc<Store>, ) -> Result<DefaultReadonlyIndex, DefaultIndexStoreError>
Rebuilds index for the given operation
.
The index to be built will be calculated from one of the ancestor
operations if exists. Use reinit()
to rebuild index from scratch.
Trait Implementations§
Source§impl Debug for DefaultIndexStore
impl Debug for DefaultIndexStore
Source§impl IndexStore for DefaultIndexStore
impl IndexStore for DefaultIndexStore
fn as_any(&self) -> &dyn Any
Source§fn name(&self) -> &str
fn name(&self) -> &str
Returns a name representing the type of index that the
IndexStore
is
compatible with. For example, the IndexStore
for the default index
returns “default”.Source§fn get_index_at_op(
&self,
op: &Operation,
store: &Arc<Store>,
) -> Result<Box<dyn ReadonlyIndex>, IndexReadError>
fn get_index_at_op( &self, op: &Operation, store: &Arc<Store>, ) -> Result<Box<dyn ReadonlyIndex>, IndexReadError>
Returns the index at the specified operation.
Source§fn write_index(
&self,
index: Box<dyn MutableIndex>,
op: &Operation,
) -> Result<Box<dyn ReadonlyIndex>, IndexWriteError>
fn write_index( &self, index: Box<dyn MutableIndex>, op: &Operation, ) -> Result<Box<dyn ReadonlyIndex>, IndexWriteError>
Writes
index
to the index store and returns a read-only version of the
index.Auto Trait Implementations§
impl Freeze for DefaultIndexStore
impl RefUnwindSafe for DefaultIndexStore
impl Send for DefaultIndexStore
impl Sync for DefaultIndexStore
impl Unpin for DefaultIndexStore
impl UnwindSafe for DefaultIndexStore
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