pub struct AppStateData {Show 16 fields
pub db: Arc<dyn DbProvider>,
pub signing_key: Key,
pub settings: Arc<Settings>,
pub settings_prov: Arc<SettingsProv>,
pub crate_storage: Arc<KellnrCrateStorage>,
pub cratesio_storage: Arc<CratesIoCrateStorage>,
pub docs_storage: Arc<DocsStorage>,
pub cratesio_prefetch_sender: Sender<CratesioPrefetchMsg>,
pub token_cache: Arc<TokenCacheManager>,
pub login_throttle: Arc<LoginThrottle>,
pub toolchain_storage: Option<Arc<ToolchainStorage>>,
pub download_counter: Arc<DownloadCounter>,
pub proxy_client: Client,
pub cratesio_sync: CratesioSync,
pub download_filters: Arc<DownloadFilters>,
pub background_tasks: BackgroundTasks,
}Fields§
§db: Arc<dyn DbProvider>§signing_key: Key§settings: Arc<Settings>§settings_prov: Arc<SettingsProv>Per-leaf provenance for the merged settings. Only the /settings
web-ui handler reads this; everything else uses the plain Settings.
crate_storage: Arc<KellnrCrateStorage>§cratesio_storage: Arc<CratesIoCrateStorage>§docs_storage: Arc<DocsStorage>Always present, unlike toolchain_storage: /docs/* serving and
manual doc publishing are mounted regardless of settings.docs.enabled
(that flag only gates the automatic generation queue).
cratesio_prefetch_sender: Sender<CratesioPrefetchMsg>§token_cache: Arc<TokenCacheManager>§login_throttle: Arc<LoginThrottle>Per-username throttle for password authentication attempts.
toolchain_storage: Option<Arc<ToolchainStorage>>§download_counter: Arc<DownloadCounter>§proxy_client: Client§cratesio_sync: CratesioSync§download_filters: Arc<DownloadFilters>§background_tasks: BackgroundTasksWork that outlives a request, e.g. processing an upload, runs here so shutdown waits for it.
Trait Implementations§
Source§impl Clone for AppStateData
impl Clone for AppStateData
Source§impl FromRef<AppStateData> for Arc<dyn DbProvider>
impl FromRef<AppStateData> for Arc<dyn DbProvider>
Source§fn from_ref(state: &AppStateData) -> Self
fn from_ref(state: &AppStateData) -> Self
Converts to this type from a reference to the input type.
Source§impl FromRef<AppStateData> for Key
impl FromRef<AppStateData> for Key
Source§fn from_ref(state: &AppStateData) -> Self
fn from_ref(state: &AppStateData) -> Self
Converts to this type from a reference to the input type.
Source§impl FromRef<AppStateData> for Arc<Settings>
impl FromRef<AppStateData> for Arc<Settings>
Source§fn from_ref(state: &AppStateData) -> Self
fn from_ref(state: &AppStateData) -> Self
Converts to this type from a reference to the input type.
Source§impl FromRef<AppStateData> for Arc<SettingsProv>
impl FromRef<AppStateData> for Arc<SettingsProv>
Source§fn from_ref(state: &AppStateData) -> Self
fn from_ref(state: &AppStateData) -> Self
Converts to this type from a reference to the input type.
Source§impl FromRef<AppStateData> for Arc<KellnrCrateStorage>
impl FromRef<AppStateData> for Arc<KellnrCrateStorage>
Source§fn from_ref(state: &AppStateData) -> Self
fn from_ref(state: &AppStateData) -> Self
Converts to this type from a reference to the input type.
Source§impl FromRef<AppStateData> for Arc<CratesIoCrateStorage>
impl FromRef<AppStateData> for Arc<CratesIoCrateStorage>
Source§fn from_ref(state: &AppStateData) -> Self
fn from_ref(state: &AppStateData) -> Self
Converts to this type from a reference to the input type.
Source§impl FromRef<AppStateData> for Arc<DocsStorage>
impl FromRef<AppStateData> for Arc<DocsStorage>
Source§fn from_ref(state: &AppStateData) -> Self
fn from_ref(state: &AppStateData) -> Self
Converts to this type from a reference to the input type.
Source§impl FromRef<AppStateData> for Sender<CratesioPrefetchMsg>
impl FromRef<AppStateData> for Sender<CratesioPrefetchMsg>
Source§fn from_ref(state: &AppStateData) -> Self
fn from_ref(state: &AppStateData) -> Self
Converts to this type from a reference to the input type.
Source§impl FromRef<AppStateData> for Arc<TokenCacheManager>
impl FromRef<AppStateData> for Arc<TokenCacheManager>
Source§fn from_ref(state: &AppStateData) -> Self
fn from_ref(state: &AppStateData) -> Self
Converts to this type from a reference to the input type.
Source§impl FromRef<AppStateData> for Arc<LoginThrottle>
impl FromRef<AppStateData> for Arc<LoginThrottle>
Source§fn from_ref(state: &AppStateData) -> Self
fn from_ref(state: &AppStateData) -> Self
Converts to this type from a reference to the input type.
Source§impl FromRef<AppStateData> for Option<Arc<ToolchainStorage>>
impl FromRef<AppStateData> for Option<Arc<ToolchainStorage>>
Source§fn from_ref(state: &AppStateData) -> Self
fn from_ref(state: &AppStateData) -> Self
Converts to this type from a reference to the input type.
Source§impl FromRef<AppStateData> for Arc<DownloadCounter>
impl FromRef<AppStateData> for Arc<DownloadCounter>
Source§fn from_ref(state: &AppStateData) -> Self
fn from_ref(state: &AppStateData) -> Self
Converts to this type from a reference to the input type.
Source§impl FromRef<AppStateData> for Client
impl FromRef<AppStateData> for Client
Source§fn from_ref(state: &AppStateData) -> Self
fn from_ref(state: &AppStateData) -> Self
Converts to this type from a reference to the input type.
Source§impl FromRef<AppStateData> for CratesioSync
impl FromRef<AppStateData> for CratesioSync
Source§fn from_ref(state: &AppStateData) -> Self
fn from_ref(state: &AppStateData) -> Self
Converts to this type from a reference to the input type.
Source§impl FromRef<AppStateData> for Arc<DownloadFilters>
impl FromRef<AppStateData> for Arc<DownloadFilters>
Source§fn from_ref(state: &AppStateData) -> Self
fn from_ref(state: &AppStateData) -> Self
Converts to this type from a reference to the input type.
Source§impl FromRef<AppStateData> for BackgroundTasks
impl FromRef<AppStateData> for BackgroundTasks
Source§fn from_ref(state: &AppStateData) -> Self
fn from_ref(state: &AppStateData) -> Self
Converts to this type from a reference to the input type.
Source§impl FromRequestParts<AppStateData> for TokenUser
impl FromRequestParts<AppStateData> for TokenUser
Source§impl FromRequestParts<AppStateData> for SessionUser
impl FromRequestParts<AppStateData> for SessionUser
Source§impl FromRequestParts<AppStateData> for AnyUser
impl FromRequestParts<AppStateData> for AnyUser
Source§impl FromRequestParts<AppStateData> for AdminUser
impl FromRequestParts<AppStateData> for AdminUser
Auto Trait Implementations§
impl !RefUnwindSafe for AppStateData
impl !UnwindSafe for AppStateData
impl Freeze for AppStateData
impl Send for AppStateData
impl Sync for AppStateData
impl Unpin for AppStateData
impl UnsafeUnpin for AppStateData
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