doc: add db_init()

This commit is contained in:
realaltffour 2020-08-02 10:27:28 +03:00
parent 9e5a48ff37
commit 011af7d9cb
No known key found for this signature in database
GPG Key ID: C1265D839D44DCB1

View File

@ -30,6 +30,14 @@ pub fn db_connect(state: &mut GlobalState, user: &'static str,
}
}
/// Generic Initialization of the database cache in GlobalState.
///
/// Currently only loads all of the companies in memory.
///
/// Arguments:
/// state - The global state used to cache.
///
/// Returns: ```std::Result```, nothing on success, a string containing reason of failure on error.
pub fn db_init(state: &mut GlobalState) -> Result<(), String> {
/*
* Load companies from database