pub struct SoloHttpState {
pub registry: Arc<TenantRegistry>,
pub default_tenant: TenantId,
pub user_aliases: Arc<Vec<String>>,
}Expand description
HTTP-side application state. v0.8.0 P2 swapped per-handler `WriteHandle
- ReaderPool + …
for aTenantRegistrythat resolves tenant on each request via theX-Solo-Tenant` header (default tenant if absent).
Fields§
§registry: Arc<TenantRegistry>Multi-tenant registry. Lazy-loads tenants on first request.
default_tenant: TenantIdDefault tenant used when the X-Solo-Tenant header is absent.
Typically TenantId::default_tenant().
user_aliases: Arc<Vec<String>>Read-path aliases for the canonical "user" subject. Sourced
from solo.config.toml [identity] user_aliases; threaded
through to solo_query::facts_about so a query for "alex"
also surfaces rows historically extracted as "user". Empty
vec = behave as today. Wrapped in Arc so handler clone()s
stay cheap. v0.5.0 Priority 1 sub-step 1C.
Trait Implementations§
Source§impl Clone for SoloHttpState
impl Clone for SoloHttpState
Source§fn clone(&self) -> SoloHttpState
fn clone(&self) -> SoloHttpState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SoloHttpState
impl !RefUnwindSafe for SoloHttpState
impl Send for SoloHttpState
impl Sync for SoloHttpState
impl Unpin for SoloHttpState
impl UnsafeUnpin for SoloHttpState
impl !UnwindSafe for SoloHttpState
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