pub struct DBEnv {
    pub historian: Historian,
    /* private fields */
}

Fields§

§historian: Historian

Implementations§

Examples found in repository?
src/script_repo/mod.rs (line 337)
336
337
338
    pub async fn close(self) {
        self.db_env.close().await;
    }
More examples
Hide additional examples
src/util/holder.rs (line 19)
14
15
16
17
18
19
20
21
    pub async fn close(self) {
        match self {
            Self::None => (),
            Self::Repo(repo) => repo.close().await,
            Self::Historian(historian) => historian.close().await,
            Self::Env(env) => env.close().await,
        }
    }
Examples found in repository?
src/util/init_repo.rs (line 19)
12
13
14
15
16
17
18
19
20
pub async fn init_env(mut need_journal: bool) -> Result<(DBEnv, bool)> {
    async fn init_historian() -> Result<Historian> {
        let h = Historian::new(path::get_home().to_owned()).await?;
        Ok(h)
    }
    let ((pool, init), historian) =
        try_join!(crate::db::get_pool(&mut need_journal), init_historian())?;
    Ok((DBEnv::new(pool, historian, need_journal), init))
}

Trait Implementations§

Formats the value using the given formatter. Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.