#[non_exhaustive]pub struct ProxyConfig {
pub bind: SocketAddr,
pub adapters: Vec<Arc<dyn ProviderAdapter>>,
pub session_ttl: Duration,
pub body_limit_bytes: u64,
/* private fields */
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.bind: SocketAddr§adapters: Vec<Arc<dyn ProviderAdapter>>§session_ttl: Duration§body_limit_bytes: u64Implementations§
Source§impl ProxyConfig
impl ProxyConfig
pub fn new(bind: SocketAddr, adapters: Vec<Arc<dyn ProviderAdapter>>) -> Self
Sourcepub fn anthropic_direct(bind: SocketAddr, adapter: AnthropicAdapter) -> Self
pub fn anthropic_direct(bind: SocketAddr, adapter: AnthropicAdapter) -> Self
Constructs the strict direct Anthropic profile without a generic trait-object handoff.
This preserves builder-only settings such as continuity, allowlists, timeouts, and an
optional trusted principal resolver. Self::new remains source-compatible for legacy
multi-provider configurations and uses the direct profile’s frozen defaults.
Sourcepub fn with_locale_chain(self, locale_chain: LocaleChain) -> Self
pub fn with_locale_chain(self, locale_chain: LocaleChain) -> Self
Sets the locale chain every detection pass on this proxy runs under.
§Why this is explicit
Recognizers declare locales = [...] and only run when the active chain intersects
that list. Before this setting existed the proxy pinned [LocaleTag::Global], so an
adopter who had already configured de-DE silently got no postal.de and no DE
national-phone detection on proxied traffic — an axis-1 leak the adopter had no way to
observe. The chain is now adopter-supplied rather than inherited from a system default,
so what activates is a stated configuration decision.
§Derivation
Callers derive the value from the canonical 4-tier chain
(CLI > policy > rulepack default > system default) with
gaze::LocaleChain::merge_cli_policy_rulepack_default, or read it straight off a
gaze_assembly::CorePipeline::locale_chain, and pass the result here. It MUST be the
same chain the supplied gaze::Pipeline was assembled under: assembly decides which
recognizers are REGISTERED, this chain decides which of them are allowed to FIRE.
Omitting this call leaves the chain at [LocaleTag::Global], which reproduces the
pre-existing behavior exactly. gaze::LocaleChain always appends Global as its
final tier, so configuring a locale can only widen detection, never narrow it.
Both the primary surface pass and the outbound residual re-scan read this one field, which is what keeps the residual neither weaker nor stronger than the primary pass.
Sourcepub fn locale_chain(&self) -> &[LocaleTag]
pub fn locale_chain(&self) -> &[LocaleTag]
Returns the locale chain detection runs under on this proxy.
Sourcepub fn with_dictionaries(self, dictionaries: DictionaryBundle) -> Self
pub fn with_dictionaries(self, dictionaries: DictionaryBundle) -> Self
Sets the dictionary values every primary and residual detection pass uses.
Omitting this call preserves the pre-existing empty-bundle behavior. The same immutable bundle is shared across request protection and residual validation so the fail-closed pass cannot know fewer terms than the primary pass.
Sourcepub fn dictionaries(&self) -> &DictionaryBundle
pub fn dictionaries(&self) -> &DictionaryBundle
Returns the dictionary values used by every proxy detection pass.
Sourcepub fn with_inspection(self, inspection: ProxyInspectionProducerV1) -> Self
pub fn with_inspection(self, inspection: ProxyInspectionProducerV1) -> Self
Installs the immutable provider-neutral inspection producer for this launch.
The producer can be created only by install_proxy_inspection_v1, which atomically
binds it to the adopter-supplied pending consumer half. Omitting this method constructs no
inspection registration or runtime.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ProxyConfig
impl !UnwindSafe for ProxyConfig
impl Freeze for ProxyConfig
impl Send for ProxyConfig
impl Sync for ProxyConfig
impl Unpin for ProxyConfig
impl UnsafeUnpin for ProxyConfig
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
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,
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> ⓘ
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