pub struct AppContext { /* private fields */ }Implementations§
Source§impl AppContext
impl AppContext
pub async fn new() -> Result<Self>
pub fn builder() -> AppContextBuilder
pub fn config(&self) -> &Config
pub fn content_config(&self) -> Option<&ContentConfigRaw>
pub const fn db_pool(&self) -> &DbPool
pub const fn database(&self) -> &DbPool
pub fn api_registry(&self) -> &ModuleApiRegistry
pub fn extension_registry(&self) -> &ExtensionRegistry
pub fn server_address(&self) -> String
pub fn get_provided_audiences() -> Vec<String>
pub fn get_valid_audiences(_module_name: &str) -> Vec<String>
pub fn get_server_audiences(_server_name: &str, _port: u16) -> Vec<String>
pub const fn geoip_reader(&self) -> Option<&GeoIpReader>
pub const fn analytics_service(&self) -> &Arc<AnalyticsService>
pub const fn route_classifier(&self) -> &Arc<RouteClassifier>
Trait Implementations§
Source§impl AppContext for AppContext
impl AppContext for AppContext
fn config(&self) -> Arc<dyn ConfigProvider>
fn database_handle(&self) -> Arc<dyn DatabaseHandle>
fn analytics_provider(&self) -> Option<Arc<dyn AnalyticsProvider>>
fn fingerprint_provider(&self) -> Option<Arc<dyn FingerprintProvider>>
fn user_provider(&self) -> Option<Arc<dyn UserProvider>>
Source§impl Clone for AppContext
impl Clone for AppContext
Source§fn clone(&self) -> AppContext
fn clone(&self) -> AppContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AppContext
impl Debug for AppContext
Source§impl ExtensionContext for AppContext
impl ExtensionContext for AppContext
Auto Trait Implementations§
impl Freeze for AppContext
impl !RefUnwindSafe for AppContext
impl Send for AppContext
impl Sync for AppContext
impl Unpin for AppContext
impl !UnwindSafe for AppContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more