Struct seshat::RecoveryDatabase [−][src]
pub struct RecoveryDatabase { /* fields omitted */ }
Expand description
Database that can be used to reindex the events.
Reindexing the database may be needed if the index schema changes. This may happen occasionally on upgrades or if language settings for the database change.
Implementations
Open a read-only Seshat database.
Arguments
path
- The directory where the database will be stored in. This should be an empty directory if a new database should be created.
Open a recovery Seshat database with the provided config.
Arguments
-
path
- The directory where the database will be stored in. This should be an empty directory if a new database should be created. -
config
- Configuration that changes the behaviour of the database.
Delete the Seshat index, leaving only the events database.
After this operation is done, the index can be rebuilt.
Load deserialized events from the database.
limit
- The number of events to load.from_event
- The event where to continue loading from.
Events that fail to be deserialized will be filtered out.
Load serialized events from the database.
limit
- The number of events to load.from_event
- The event where to continue loading from.
Create and open a new index.
Returns ReindexError
if the index wasn’t deleted first.
Get the recovery info for the database.
Get a database connection.
Note that this connection should only be used for reading.
Re-index a batch of events.
Arguments
events
- The events that should be reindexed.
Returns ReindexError
if the index wasn’t previously deleted and
opened.
Commit to the index.
Returns true if the commit was forwarded, false if not enough events are queued up.
Returns ReindexError
if the index wasn’t previously deleted and
opened.
Commit the remaining added events and mark the reindex as done.
Returns ReindexError
if the index wasn’t previously deleted and
opened.
Auto Trait Implementations
impl !RefUnwindSafe for RecoveryDatabase
impl Send for RecoveryDatabase
impl !Sync for RecoveryDatabase
impl Unpin for RecoveryDatabase
impl !UnwindSafe for RecoveryDatabase
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V