DatabaseOperations

Trait DatabaseOperations 

Source
pub trait DatabaseOperations {
    // Required methods
    fn connect(&mut self) -> Result<(), Error>;
    fn close(&mut self) -> Result<(), Error>;
    fn replicate(&mut self) -> Result<(), Error>;
}
Expand description

Trait defining basic operations for interacting with a database.

Types implementing this trait can be used with the DBOperations struct for managing database logic.

Required Methods§

Source

fn connect(&mut self) -> Result<(), Error>

Establishes a connection to the database.

Source

fn close(&mut self) -> Result<(), Error>

Closes the database connection.

Source

fn replicate(&mut self) -> Result<(), Error>

Replicates the database state.

Implementors§