pub(crate) struct AppState {Show 29 fields
pub(crate) registry: Arc<dyn Registry>,
repos: Repos,
pub(crate) estop: Arc<Estop>,
pub(crate) operator: Option<Arc<OperatorAuth>>,
pub(crate) relay: Option<RelayTarget>,
pub(crate) operator_login_limiter: Arc<RateLimiter>,
pub(crate) disclosure: Disclosure,
pub(crate) oauth: OAuthState,
pub(crate) provision_rate_limiter: Arc<RateLimiter>,
pub(crate) max_accounts: u64,
pub(crate) unauthenticated_creates: bool,
pub(crate) park_rate_limiter: Arc<RateLimiter>,
pub(crate) sync_rate_limiter: Arc<RateLimiter>,
pub(crate) write_meter: Arc<WriteMeter>,
pub(crate) proxy: Arc<ProxyLimits>,
pub(crate) never_wrote_min_idle: Duration,
pub(crate) tree: Arc<TreeState>,
pub(crate) subscriber_limit: Arc<SubscriberLimit>,
pub(crate) trust_forwarded_headers: bool,
pub(crate) health: Arc<HealthState>,
pub(crate) lifecycle: Arc<ServerLifecycle>,
pub(crate) nudge: Arc<PollNudge>,
pub(crate) operator_records: Arc<OperatorRecords>,
pub(crate) operator_handle: Arc<OperatorHandle>,
pub(crate) handles: Arc<dyn HandleDid>,
pub(crate) handle_lookup_limiter: Arc<RateLimiter>,
pub(crate) did_lookup_limiter: Arc<RateLimiter>,
pub(crate) foreign: Arc<ForeignRecords>,
pub(crate) lookups: Arc<LookupReader>,
}Expand description
Everything a handler needs.
Registry is deliberately an Arc<dyn ..>: the HTTP layer must not be
generic over the provisioner’s three type parameters, or every handler
signature grows them.
Fields§
§registry: Arc<dyn Registry>§repos: Repos§estop: Arc<Estop>§operator: Option<Arc<OperatorAuth>>See AuthState::operator.
relay: Option<RelayTarget>See AuthState::relay.
operator_login_limiter: Arc<RateLimiter>§disclosure: DisclosureWhich Credential::Disclosure routes are closed; see
auth::Disclosure.
oauth: OAuthState§provision_rate_limiter: Arc<RateLimiter>§max_accounts: u64§unauthenticated_creates: bool§park_rate_limiter: Arc<RateLimiter>§sync_rate_limiter: Arc<RateLimiter>§write_meter: Arc<WriteMeter>§proxy: Arc<ProxyLimits>See AuthState::proxy.
never_wrote_min_idle: Duration§tree: Arc<TreeState>See AuthState::tree.
subscriber_limit: Arc<SubscriberLimit>§trust_forwarded_headers: bool§health: Arc<HealthState>§lifecycle: Arc<ServerLifecycle>See AuthState::lifecycle and require_lifecycle.
nudge: Arc<PollNudge>See AuthState::nudge.
operator_records: Arc<OperatorRecords>§operator_handle: Arc<OperatorHandle>§handles: Arc<dyn HandleDid>See AuthState::handles.
handle_lookup_limiter: Arc<RateLimiter>§did_lookup_limiter: Arc<RateLimiter>§foreign: Arc<ForeignRecords>The one reader for records in repositories this deployment does not
hold; see crate::foreign. Built here rather than carried on
AuthState because the two facts it needs — which repositories
are ours and which names we answer to — are the registry’s, and the
registry arrives with the router rather than with the auth state.
lookups: Arc<LookupReader>The two-phase read of the records a write’s policies declared they
read: this half prefetches, before the write reaches the store’s
synchronous section. See crate::lookups.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AppState
impl !RefUnwindSafe for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnsafeUnpin for AppState
impl !UnwindSafe for AppState
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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> 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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