pub struct AppState {
pub db: PgPool,
pub config: Arc<Config>,
pub templates: Arc<Environment<'static>>,
pub vault: Vault,
pub oidc: Option<Arc<OidcClient>>,
pub previews: Arc<Previews>,
pub assistant: Option<Arc<Assistant>>,
pub webhooks: Dispatcher,
pub sign_in: Arc<SignInThrottle>,
pub metrics: Arc<Metrics>,
}Expand description
Shared state of the HTTP server.
Fields§
§db: PgPool§config: Arc<Config>§templates: Arc<Environment<'static>>§vault: Vault§oidc: Option<Arc<OidcClient>>§previews: Arc<Previews>Cached 3D preview meshes (see preview).
assistant: Option<Arc<Assistant>>The built-in assistant; None without TEAMCRAFT_ANTHROPIC_API_KEY.
webhooks: DispatcherSends outgoing event webhooks (“Send test”, “Retry”; the background task has its own).
sign_in: Arc<SignInThrottle>Failed password sign-ins per username and client address.
metrics: Arc<Metrics>Request counters for GET /metrics.
Implementations§
Trait Implementations§
Source§impl FromRequestParts<AppState> for AccessCtx
Channel and client address of a request, for the read log of restricted
groups (services::access_log). Never rejects: a bearer token means the
API channel, otherwise the browser session.
impl FromRequestParts<AppState> for AccessCtx
Channel and client address of a request, for the read log of restricted
groups (services::access_log). Never rejects: a bearer token means the
API channel, otherwise the browser session.
Auto Trait Implementations§
impl !RefUnwindSafe for AppState
impl !UnwindSafe for AppState
impl Freeze for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnsafeUnpin for AppState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 moreimpl<T> Parallelizable for T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.