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.

Shut the database down.

This will terminate the writer thread making sure that no writes will happen after this operation.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

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

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

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

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.