pub struct Data {
pub db: Box<dyn MCDatabase>,
pub creds: Config,
pub captcha: SystemGroup,
pub mailer: Option<AsyncSmtpTransport<Tokio1Executor>>,
pub settings: Settings,
pub stats: Box<dyn Stats>,
}
Expand description
App data
Fields§
§db: Box<dyn MCDatabase>
database ops defined by db crates
creds: Config
credential management configuration
captcha: SystemGroup
mCaptcha system: Redis cache, etc.
mailer: Option<AsyncSmtpTransport<Tokio1Executor>>
email client
settings: Settings
app settings
stats: Box<dyn Stats>
stats recorder
Implementations§
source§impl Data
impl Data
pub fn get_creds() -> Config
fn get_mailer(s: &Settings) -> Option<AsyncSmtpTransport<Tokio1Executor>>
Auto Trait Implementations§
impl !RefUnwindSafe for Data
impl Send for Data
impl Sync for Data
impl Unpin for Data
impl !UnwindSafe for Data
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more