2020-10-15 16:52:08 +00:00
|
|
|
use crate::db::Database;
|
2020-11-22 20:52:44 +00:00
|
|
|
use matrix_sdk::Client;
|
2020-11-29 21:03:45 +00:00
|
|
|
use matrix_sdk::Room;
|
2020-10-15 16:52:08 +00:00
|
|
|
|
|
|
|
/// A context carried through the system providing access to things
|
|
|
|
/// like the database.
|
|
|
|
#[derive(Clone)]
|
2020-11-03 20:14:15 +00:00
|
|
|
pub struct Context<'a> {
|
2020-10-17 15:18:51 +00:00
|
|
|
pub db: Database,
|
2020-11-22 20:52:44 +00:00
|
|
|
pub matrix_client: &'a Client,
|
2020-11-29 21:03:45 +00:00
|
|
|
pub room: &'a Room,
|
2020-11-03 20:14:15 +00:00
|
|
|
pub username: &'a str,
|
|
|
|
pub message_body: &'a str,
|
2020-10-15 16:52:08 +00:00
|
|
|
}
|