Skip to main content

connect_db

Function connect_db 

Source
pub async fn connect_db(dsn: &str, opts: ConnectOpts) -> Result<Db>
Expand description

Connect and return a secure Db (no DbHandle exposure).

This is the public constructor intended for module code and tests.

ยงErrors

Returns DbError if the connection fails or the DSN/options are invalid.