#[non_exhaustive]pub struct AppState { /* private fields */ }Expand description
Shared application state passed to all route handlers.
Holds framework-managed resources such as the database connection pool.
Axum requires handler state to be Clone, so internal resources use
Arc or are already cheaply cloneable (deadpool::Pool is Arc-wrapped
internally).
This struct is normally constructed by crate::app::AppBuilder::run and
should not need to be created manually. It is public so that custom
Axum extractors can access framework resources via
State<AppState>.
§Examples
use autumn_web::AppState;
// State without a database (e.g., for testing)
let state = AppState::for_test().with_profile("dev");Implementations§
Source§impl AppState
impl AppState
Sourcepub fn insert_extension<T>(&self, value: T)
pub fn insert_extension<T>(&self, value: T)
Install or replace a typed runtime extension.
Integrations use this to publish typed runtime resources, such as background-worker handles or dedicated storage pools, after startup.
§Panics
Panics if the internal extension map mutex is poisoned.
Sourcepub fn session_rotation_hooks(&self) -> SessionRotationHooks
pub fn session_rotation_hooks(&self) -> SessionRotationHooks
The shared SessionRotationHooks
registry, created on first use.
Hooks registered here run after each stored session-id rotation.
§Panics
Panics if the internal extension map mutex is poisoned.
Sourcepub fn tenant_cell_registry(&self) -> Option<Arc<TenantCellRegistry>>
pub fn tenant_cell_registry(&self) -> Option<Arc<TenantCellRegistry>>
Return the process-wide cooperative tenant-memory registry, if tenancy middleware has installed it. Request arenas resolved from this registry never use a second, implicit registry or accounting domain.
Sourcepub fn live_state<T>(&self) -> Option<LiveStateHandle<T>>where
T: LiveState,
pub fn live_state<T>(&self) -> Option<LiveStateHandle<T>>where
T: LiveState,
Borrow the app’s designated live-state block, if one was registered
with AppBuilder::with_live_state.
This is the block an in-place upgrade carries into the next build; see
upgrade.
§Examples
if let Some(stats) = state.live_state::<Stats>() {
let hits = stats.read(|s| s.hits);
let _ = hits;
}Sourcepub fn extension_or_insert_with<T>(&self, f: impl FnOnce() -> T) -> Arc<T> ⓘ
pub fn extension_or_insert_with<T>(&self, f: impl FnOnce() -> T) -> Arc<T> ⓘ
Fetch the extension of type T, inserting f()’s result if absent.
Atomic get-or-insert under the write lock: concurrent callers share one
value. Used to lazily register process-wide registries.
§Panics
Panics if the internal extension map mutex is poisoned.
Sourcepub const fn pool(&self) -> Option<&Pool<RuntimeConnection>>
pub const fn pool(&self) -> Option<&Pool<RuntimeConnection>>
Returns the database connection pool.
Sourcepub const fn replica_pool(&self) -> Option<&Pool<RuntimeConnection>>
pub const fn replica_pool(&self) -> Option<&Pool<RuntimeConnection>>
Returns the read-replica database connection pool, if configured.
Sourcepub const fn shards(&self) -> Option<&ShardSet>
pub const fn shards(&self) -> Option<&ShardSet>
Returns the configured shard set, when [[database.shards]]
entries exist.
The control roles (pool/replica_pool)
are unaffected by sharding; framework state lives there.
Sourcepub fn read_pool(&self) -> Option<&Pool<RuntimeConnection>>
pub fn read_pool(&self) -> Option<&Pool<RuntimeConnection>>
Returns the pool used for read-only work.
Sourcepub const fn metrics(&self) -> &MetricsCollector
pub const fn metrics(&self) -> &MetricsCollector
Returns the metrics collector.
Sourcepub const fn log_levels(&self) -> &LogLevels
pub const fn log_levels(&self) -> &LogLevels
Returns the log levels configuration.
Sourcepub const fn task_registry(&self) -> &TaskRegistry
pub const fn task_registry(&self) -> &TaskRegistry
Returns the task registry.
Sourcepub const fn job_registry(&self) -> &JobRegistry
pub const fn job_registry(&self) -> &JobRegistry
Returns the job registry.
Sourcepub const fn config_props(&self) -> &ConfigProperties
pub const fn config_props(&self) -> &ConfigProperties
Returns the config properties.
Sourcepub const fn metrics_source_registry(&self) -> &MetricsSourceRegistry
pub const fn metrics_source_registry(&self) -> &MetricsSourceRegistry
Returns the registry of plugin-contributed metrics sources.
Sourcepub const fn health_indicator_registry(&self) -> &HealthIndicatorRegistry
pub const fn health_indicator_registry(&self) -> &HealthIndicatorRegistry
Returns the registry of custom health indicators.
Sourcepub fn config(&self) -> AutumnConfig
pub fn config(&self) -> AutumnConfig
Returns the resolved crate::config::AutumnConfig from the extension map.
Falls back to a default config if no config has been installed (typically only in tests that don’t wire the full startup pipeline).
This hands back an owned, independently mutable snapshot, which costs a
deep clone of every config section; on request paths use
config_arc instead.
§Panics
Panics if the internal extension map mutex is poisoned, inherited from
extension.
Sourcepub fn config_arc(&self) -> Arc<AutumnConfig> ⓘ
pub fn config_arc(&self) -> Arc<AutumnConfig> ⓘ
Returns the resolved crate::config::AutumnConfig as a shared handle.
The cheap accessor: it clones only the Arc, never the
configuration behind it, so callers pay a refcount bump instead of a
deep copy of every config section. Prefer this over
config on request paths, and reach for config()
only when an owned, independently mutable snapshot is genuinely needed.
When no config extension has been installed (typically only in tests that don’t wire the full startup pipeline) this yields a handle to a shared default-valued config, so the fallback is free too. That fallback is never written back into the extension map, so a config installed afterwards is still observed.
§Panics
Panics if the internal extension map mutex is poisoned, inherited from
extension.
Sourcepub const fn probes(&self) -> &ProbeState
pub const fn probes(&self) -> &ProbeState
Returns the shared probe lifecycle state.
Sourcepub fn mark_startup_complete(&self)
pub fn mark_startup_complete(&self)
Mark startup as complete so readiness can become healthy.
Sourcepub fn begin_shutdown(&self)
pub fn begin_shutdown(&self)
Mark the application as draining so readiness flips unhealthy.
Sourcepub fn with_pool(self, pool: Pool<RuntimeConnection>) -> Self
pub fn with_pool(self, pool: Pool<RuntimeConnection>) -> Self
Sets the database pool.
Sourcepub fn with_replica_pool(self, pool: Pool<RuntimeConnection>) -> Self
pub fn with_replica_pool(self, pool: Pool<RuntimeConnection>) -> Self
Sets the read-replica database pool.
Sourcepub fn with_shards(self, shards: ShardSet) -> Self
pub fn with_shards(self, shards: ShardSet) -> Self
Sets the shard set.
Sourcepub fn with_extension<T>(self, value: T) -> Self
pub fn with_extension<T>(self, value: T) -> Self
Install a typed runtime extension while building test or ad-hoc state.
Sourcepub fn cache(&self) -> Option<Arc<dyn Cache>>
pub fn cache(&self) -> Option<Arc<dyn Cache>>
Returns the registered global cache backend, if any.
Checks the extension map first (populated at runtime by startup hooks
via Self::set_cache) so that a plugin replacing a build-time backend
is always visible. Falls back to shared_cache (set at build time via
Self::with_cache).
Sourcepub fn with_cache(self, cache: Arc<dyn Cache>) -> Self
pub fn with_cache(self, cache: Arc<dyn Cache>) -> Self
Register a global cache backend (builder / test helper, build-time).
Sourcepub fn clock(&self) -> &dyn ClockSource
pub fn clock(&self) -> &dyn ClockSource
Returns the active clock source wired into this state.
Handlers should prefer the crate::time::Clock extractor; this
accessor exists for framework internals (middleware, storage) that
need the time without going through Axum’s extractor machinery.
Sourcepub fn with_clock(self, clock: Arc<dyn ClockSource>) -> Self
pub fn with_clock(self, clock: Arc<dyn ClockSource>) -> Self
Replace the clock (builder / test helper).
Also re-stamps the app’s start instant from the new clock, so
uptime is measured on the timeline that is actually
installed. Without this, a state built with the default SystemClock
and then handed a virtual clock would compare a virtual now against a
real origin and report a nonsense uptime.
A construction-time builder: it also gives the state a fresh job registry
on clock, so a state’s clock and the queue gauges judged by it can
never belong to different timelines. A state cloned before this call
keeps its own clock and its own registry, equally consistent — the two
simply stop sharing queue gauges from here on.
§Call this before starting a job runtime
Once job::start_runtime has run, the runtime holds its
own clone of the registry and keeps recording into it, and no
behaviour here is correct:
if with_clock … | then |
|---|---|
| re-clocks this handle only | the runtime’s clone judges shared marks on the old clock |
| re-clocks a shared cell | the runtime stamps with the old clock into gauges moved to the new one |
| takes a fresh registry (what it does) | the runtime keeps writing to the old one, and this state’s gauges stay empty |
The operation is simply not meaningful after initialization, so rather
than pick the least-bad wrong answer this asserts in debug builds and
logs at error in release. It is not silently tolerated.
Sourcepub fn monotonic(&self) -> MonotonicInstant
pub fn monotonic(&self) -> MonotonicInstant
Returns the current instant on the injected clock’s monotonic timeline —
the deterministic replacement for std::time::Instant::now when
measuring how long something took.
Framework internals and app code alike should bracket work with two of
these and take the difference via
MonotonicInstant::saturating_duration_since. Handlers can reach the
same value through the crate::time::Clock extractor’s
monotonic.
Sourcepub fn entropy(&self) -> &dyn Entropy
pub fn entropy(&self) -> &dyn Entropy
Returns the active entropy source wired into this state.
Handlers should prefer the crate::entropy::Rng extractor; this
accessor exists for framework internals (id-minting subsystems) that need
randomness without going through Axum’s extractor machinery.
Sourcepub fn with_entropy(self, entropy: Arc<dyn Entropy>) -> Self
pub fn with_entropy(self, entropy: Arc<dyn Entropy>) -> Self
Replace the entropy source (builder / simulation helper).
Pass a crate::entropy::SeededEntropy to make every
framework-minted identifier reproducible under a fixed seed. Mirrors
Self::with_clock.
Sourcepub fn set_cache(&self, cache: Arc<dyn Cache>)
pub fn set_cache(&self, cache: Arc<dyn Cache>)
Install or replace the global cache backend at runtime (e.g. from a startup hook).
Updates both the process-level global (used by #[cached] functions) and
the extension map (used by CacheResponseLayer::from_app and state.cache()).
Sourcepub fn with_profile(self, profile: impl Into<String>) -> Self
pub fn with_profile(self, profile: impl Into<String>) -> Self
Sets the active profile.
Sourcepub const fn policy_registry(&self) -> &PolicyRegistry
pub const fn policy_registry(&self) -> &PolicyRegistry
Returns a reference to the PolicyRegistry.
Sourcepub fn policy<R: Send + Sync + 'static>(&self) -> Option<Arc<dyn Policy<R>>>
pub fn policy<R: Send + Sync + 'static>(&self) -> Option<Arc<dyn Policy<R>>>
Resolve the registered Policy for resource R, if any.
Sourcepub fn scope<R: Send + Sync + 'static>(&self) -> Option<Arc<dyn Scope<R>>>
pub fn scope<R: Send + Sync + 'static>(&self) -> Option<Arc<dyn Scope<R>>>
Resolve the registered Scope for resource R, if any.
Sourcepub const fn forbidden_response(&self) -> ForbiddenResponse
pub const fn forbidden_response(&self) -> ForbiddenResponse
Configured deny-response shape. See
ForbiddenResponse for the trade-off between 403 and
404 defaults.
Sourcepub fn auth_session_key(&self) -> &str
pub fn auth_session_key(&self) -> &str
Session key used to resolve the authenticated user id for
PolicyContext.
Sourcepub const fn role(&self) -> ProcessRole
pub const fn role(&self) -> ProcessRole
Returns the resolved ProcessRole for this
replica.
This is the role after config parsing and the AUTUMN_ROLE env override
— the exact same value the framework uses to gate the job runtime,
scheduler, and commit-hook worker. Use it from state_initializer,
on_startup/on_shutdown hooks, plugins, and request handlers to
self-gate app-owned background work:
if state.role().runs_workers() {
// start an embedded worker loop only on replicas that run workers
}serves_http and
runs_workers are reachable
on the returned value.
Sourcepub fn uptime(&self) -> Duration
pub fn uptime(&self) -> Duration
Returns how long the application has been running.
Measured on the injected clock’s monotonic timeline, so it is immune to
wall-clock jumps in production and moves with
Sim::advance under a
#[sim_test].
Sourcepub fn uptime_display(&self) -> String
pub fn uptime_display(&self) -> String
Format uptime as a human-readable string (e.g., “2h 15m”).
Sourcepub const fn channels(&self) -> &Channels
pub const fn channels(&self) -> &Channels
Returns a reference to the broadcast channel registry.
Shorthand for accessing self.channels directly.
Sourcepub fn broadcast(&self) -> Broadcast
pub fn broadcast(&self) -> Broadcast
Returns a high-level broadcast facade for raw and htmx HTML payloads.
Sourcepub fn shutdown_token(&self) -> CancellationToken
pub fn shutdown_token(&self) -> CancellationToken
Returns a child cancellation token for the server shutdown signal.
WebSocket handlers and the crate::extract::ShutdownToken extractor
use it. Select on it to clean up when the server stops.
Trait Implementations§
Source§impl DbState for AppState
Available on crate feature db only.
impl DbState for AppState
db only.Source§fn clock(&self) -> Arc<dyn ClockSource> ⓘ
fn clock(&self) -> Arc<dyn ClockSource> ⓘ
Source§fn metrics(&self) -> Option<&MetricsCollector>
fn metrics(&self) -> Option<&MetricsCollector>
Source§fn pool(&self) -> Option<&Pool<RuntimeConnection>>
fn pool(&self) -> Option<&Pool<RuntimeConnection>>
Source§fn replica_pool(&self) -> Option<&Pool<RuntimeConnection>>
fn replica_pool(&self) -> Option<&Pool<RuntimeConnection>>
Source§fn db_capture_gap(&self) -> Option<Arc<str>>
fn db_capture_gap(&self) -> Option<Arc<str>>
DatabaseTopology::capture_gap). Defaults to None: the pools
record, or capture is off entirely.Source§fn read_pool(&self) -> Option<&Pool<RuntimeConnection>>
fn read_pool(&self) -> Option<&Pool<RuntimeConnection>>
Source§fn shards(&self) -> Option<&ShardSet>
fn shards(&self) -> Option<&ShardSet>
[[database.shards]]
entries exist. Defaults to None so unsharded states need no
changes.Source§fn db_interceptors(&self) -> Vec<Arc<dyn DbConnectionInterceptor>>
fn db_interceptors(&self) -> Vec<Arc<dyn DbConnectionInterceptor>>
Source§fn statement_timeout(&self) -> Option<Duration>
fn statement_timeout(&self) -> Option<Duration>
Source§fn idle_in_transaction_timeout(&self) -> Option<Duration>
fn idle_in_transaction_timeout(&self) -> Option<Duration>
idle_in_transaction_session_timeout, if
configured (#3057).Source§fn slow_query_threshold(&self) -> Duration
fn slow_query_threshold(&self) -> Duration
Source§impl FromRequest<AppState> for SignedWebhook
impl FromRequest<AppState> for SignedWebhook
Source§impl FromRequestParts<AppState> for Impersonation
impl FromRequestParts<AppState> for Impersonation
Source§impl FromRequestParts<AppState> for AutumnConfig
impl FromRequestParts<AppState> for AutumnConfig
Source§impl FromRequestParts<AppState> for Rng
impl FromRequestParts<AppState> for Rng
Source§impl FromRequestParts<AppState> for ShutdownToken
impl FromRequestParts<AppState> for ShutdownToken
Source§impl FromRequestParts<AppState> for Mailer
impl FromRequestParts<AppState> for Mailer
Source§impl FromRequestParts<AppState> for ShardedDb
impl FromRequestParts<AppState> for ShardedDb
Source§impl FromRequestParts<AppState> for ShardedReadDb
impl FromRequestParts<AppState> for ShardedReadDb
Source§impl FromRequestParts<AppState> for Client
impl FromRequestParts<AppState> for Client
Source§impl FromRequestParts<AppState> for Notifications
impl FromRequestParts<AppState> for Notifications
Source§impl FromRequestParts<AppState> for WebPush
impl FromRequestParts<AppState> for WebPush
Source§impl FromRequestParts<AppState> for Sla
impl FromRequestParts<AppState> for Sla
Source§impl FromRequestParts<AppState> for Tenant
impl FromRequestParts<AppState> for Tenant
Source§impl FromRequestParts<AppState> for Clock
impl FromRequestParts<AppState> for Clock
Source§impl FromRequestParts<AppState> for TimeZone
impl FromRequestParts<AppState> for TimeZone
Source§impl FromRequestParts<AppState> for Events
impl FromRequestParts<AppState> for Events
Source§impl FromRequestParts<AppState> for Experiments
impl FromRequestParts<AppState> for Experiments
Source§impl FromRequestParts<AppState> for Flags
impl FromRequestParts<AppState> for Flags
Source§impl FromRequestParts<AppState> for Outbox
impl FromRequestParts<AppState> for Outbox
Source§impl ProvideActuatorState for AppState
impl ProvideActuatorState for AppState
Source§fn shadow(&self) -> Option<ShadowHandle>
fn shadow(&self) -> Option<ShadowHandle>
The shadow-mirroring handle, installed into the runtime extension map when the framework router assembled a mirror layer for this app.
Read from extensions rather than stored as an AppState field because
the mirror is built during router assembly — after the state exists —
and because an app that never enables [shadow] should carry no extra
bytes for it.
Source§fn metrics(&self) -> &MetricsCollector
fn metrics(&self) -> &MetricsCollector
crate::middleware::MetricsCollector
tracking current HTTP traffic metrics.Source§fn log_levels(&self) -> &LogLevels
fn log_levels(&self) -> &LogLevels
LogLevels configuration
allowing runtime adjustment of tracing filters.Source§fn task_registry(&self) -> &TaskRegistry
fn task_registry(&self) -> &TaskRegistry
TaskRegistry holding status and metadata
for async scheduled background tasks.Source§fn job_registry(&self) -> &JobRegistry
fn job_registry(&self) -> &JobRegistry
JobRegistry holding queue and failure
information for ad-hoc background jobs.Source§fn config_props(&self) -> &ConfigProperties
fn config_props(&self) -> &ConfigProperties
ConfigProperties snapshot, providing
active configuration state for the environment endpoint.Source§fn profile(&self) -> &str
fn profile(&self) -> &str
Source§fn uptime_display(&self) -> String
fn uptime_display(&self) -> String
Source§fn metrics_source_registry(&self) -> Option<&MetricsSourceRegistry>
fn metrics_source_registry(&self) -> Option<&MetricsSourceRegistry>
MetricsSource implementations. Read moreSource§fn health_indicator_registry(&self) -> Option<&HealthIndicatorRegistry>
fn health_indicator_registry(&self) -> Option<&HealthIndicatorRegistry>
HealthIndicator implementations. Read moreSource§fn health_detailed(&self) -> bool
fn health_detailed(&self) -> bool
Source§fn architecture_graph_json(&self) -> Option<Bytes>
fn architecture_graph_json(&self) -> Option<Bytes>
/actuator/graph. Read moreSource§fn data_capsules(&self) -> Result<CapsuleService, DataCapsuleError>
fn data_capsules(&self) -> Result<CapsuleService, DataCapsuleError>
{prefix}/capsules/* (issue #1811). Read moreSource§fn cost_signal(&self) -> Option<CostSignal>
fn cost_signal(&self) -> Option<CostSignal>
None.Source§fn cost_accountant(&self) -> Option<CostAccountant>
fn cost_accountant(&self) -> Option<CostAccountant>
None,
and {prefix}/cost then reports "enabled": false.Source§fn deploy_version(&self) -> String
fn deploy_version(&self) -> String
"stable" or
"canary"), used to tag Prometheus metrics so a canary controller can
compare canary vs. stable cohorts. Read moreSource§fn channels(&self) -> &Channels
fn channels(&self) -> &Channels
crate::channels::Channels which
broadcasts operational events to WebSocket streams.Source§fn shutdown_token(&self) -> CancellationToken
fn shutdown_token(&self) -> CancellationToken
Source§fn pool(&self) -> Option<&Pool<RuntimeConnection>>
fn pool(&self) -> Option<&Pool<RuntimeConnection>>
/actuator/metrics endpoint.Source§fn probe_state(&self) -> Option<&ProbeState>
fn probe_state(&self) -> Option<&ProbeState>
Source§fn shards(&self) -> Option<&ShardSet>
fn shards(&self) -> Option<&ShardSet>
/actuator/metrics endpoint. Defaults to None.Source§fn replica_pool(&self) -> Option<&Pool<RuntimeConnection>>
fn replica_pool(&self) -> Option<&Pool<RuntimeConnection>>
/actuator/prometheus with pool="replica". Defaults to None.Source§fn webhook_outbound(&self) -> Option<WebhookOutboundManager>
fn webhook_outbound(&self) -> Option<WebhookOutboundManager>
Source§fn log_buffer(&self) -> Option<LogBuffer>
fn log_buffer(&self) -> Option<LogBuffer>
Source§fn a11y_posture(&self) -> A11yPosture
fn a11y_posture(&self) -> A11yPosture
/actuator/a11y. Read moreSource§impl ProvideAuthorizationState for AppState
impl ProvideAuthorizationState for AppState
fn policy_registry(&self) -> &PolicyRegistry
fn auth_session_key(&self) -> &str
fn forbidden_response(&self) -> &ForbiddenResponse
fn pool(&self) -> Option<&Pool<RuntimeConnection>>
Source§impl ProvideProbeState for AppState
impl ProvideProbeState for AppState
Source§fn probes(&self) -> &ProbeState
fn probes(&self) -> &ProbeState
ProbeState that tracks
lifecycle phases (startup, ready, draining).Source§fn health_detailed(&self) -> bool
fn health_detailed(&self) -> bool
Source§fn profile(&self) -> &str
fn profile(&self) -> &str
Source§fn uptime_display(&self) -> String
fn uptime_display(&self) -> String
Source§fn pool(&self) -> Option<&Pool<RuntimeConnection>>
fn pool(&self) -> Option<&Pool<RuntimeConnection>>
Source§fn replica_pool(&self) -> Option<&Pool<RuntimeConnection>>
fn replica_pool(&self) -> Option<&Pool<RuntimeConnection>>
Source§fn health_indicator_registry(&self) -> Option<&HealthIndicatorRegistry>
fn health_indicator_registry(&self) -> Option<&HealthIndicatorRegistry>
crate::actuator::HealthIndicator implementations. Read moreSource§fn mark_startup_complete(&self)
fn mark_startup_complete(&self)
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> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> Self::Output
fn aggregate_filter<P>(self, f: P) -> Self::Output
Source§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> AutumnCounterCaches for Twhere
T: 'static,
impl<T> AutumnCounterCaches for Twhere
T: 'static,
Source§const HAS_COUNTER_CACHES: bool = false
const HAS_COUNTER_CACHES: bool = false
Source§fn counter_caches() -> &'static [CounterCacheSpec<Self>]
fn counter_caches() -> &'static [CounterCacheSpec<Self>]
Source§impl<T> AutumnDependents for Twhere
T: ?Sized,
impl<T> AutumnDependents for Twhere
T: ?Sized,
Source§fn dependents() -> &'static [RuntimeDependentSpec]
fn dependents() -> &'static [RuntimeDependentSpec]
#[model] overrides via an inherent shadow when dependents exist.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
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,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
&self to an expression for Diesel’s query builder. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> RepositoryHooksClone for Twhere
T: Clone,
impl<T> RepositoryHooksClone for Twhere
T: Clone,
Source§fn autumn_clone(&self) -> T
fn autumn_clone(&self) -> T
Source§impl<T, Conn> RunQueryDsl<Conn> for T
impl<T, Conn> RunQueryDsl<Conn> for T
Source§fn execute<'conn, 'query>(
self,
conn: &'conn mut Conn,
) -> <Conn as AsyncConnectionCore>::ExecuteFuture<'conn, 'query>
fn execute<'conn, 'query>( self, conn: &'conn mut Conn, ) -> <Conn as AsyncConnectionCore>::ExecuteFuture<'conn, 'query>
Source§fn load<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>>
fn load<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>>
Source§fn load_stream<'conn, 'query, U>(
self,
conn: &'conn mut Conn,
) -> Self::LoadFuture<'conn>where
Conn: AsyncConnectionCore,
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'query,
fn load_stream<'conn, 'query, U>(
self,
conn: &'conn mut Conn,
) -> Self::LoadFuture<'conn>where
Conn: AsyncConnectionCore,
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'query,
Stream] with the returned rows. Read moreSource§fn get_result<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, LoadNext<Pin<Box<Self::Stream<'conn>>>>>
fn get_result<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, LoadNext<Pin<Box<Self::Stream<'conn>>>>>
Source§fn get_results<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>>
fn get_results<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>>
Vec with the affected rows. Read moreSource§impl<T> Scoped for T
impl<T> Scoped for T
Source§fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
ScopeQuery for this type. Resolves the
registered scope at .load() time, not here.