[][src]Struct seshat::Connection

pub struct Connection { /* fields omitted */ }

A Seshat database connection that can be used for reading.

Methods

impl Connection[src]

pub fn load_checkpoints(&self) -> Result<Vec<CrawlerCheckpoint>>[src]

Load all the previously stored crawler checkpoints from the database.

Arguments

pub fn is_empty(&self) -> Result<bool>[src]

Is the database empty. Returns true if the database is empty, false otherwise.

pub fn get_stats(&self) -> Result<DatabaseStats>[src]

Get statistical information of the database.

pub fn load_file_events(
    &self,
    load_config: &LoadConfig
) -> Result<Vec<(String, Profile)>>
[src]

Load events that contain an mxc URL to a file.

Arguments

  • load_config - Configuration deciding which events and how many of them should be loaded.

Examples

let config = LoadConfig::new("!testroom:localhost").limit(10);
let result = connection.load_file_events(&config);

Returns a list of tuples containing the serialized events and the profile of the sender at the time when the event was sent.

Methods from Deref<Target = PooledConnection<SqliteConnectionManager>>

Trait Implementations

impl Deref for Connection[src]

type Target = PooledConnection<SqliteConnectionManager>

The resulting type after dereferencing.

impl DerefMut for Connection[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T> Fruit for T where
    T: Send + Downcast, 
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,