Struct SystemPacProxy
pub struct SystemPacProxy { /* private fields */ }js and pac and std only.Expand description
Creates reusable PacResolver services for system-configured PAC URLs.
The compiled resolver is reused until the operating system reports a
different URL. Script-fetch caching remains explicit composition: wrap the
provider in PacScriptCacheLayer before
passing it to Self::new when desired. This type implements the PAC
factory contract accepted by
SystemProxyLayer.
Implementations§
§impl SystemPacProxy
impl SystemPacProxy
pub fn new<P>(provider: P) -> SystemPacProxy
pub fn new<P>(provider: P) -> SystemPacProxy
Create a system PAC factory backed by provider.
pub fn with_failure_policy(self, failure: PacFailurePolicy) -> SystemPacProxy
pub fn with_failure_policy(self, failure: PacFailurePolicy) -> SystemPacProxy
What to route through when the script cannot be consulted
(defaults to PacFailurePolicy::Fail).
pub fn set_failure_policy(
&mut self,
failure: PacFailurePolicy,
) -> &mut SystemPacProxy
pub fn set_failure_policy( &mut self, failure: PacFailurePolicy, ) -> &mut SystemPacProxy
What to route through when the script cannot be consulted
(defaults to PacFailurePolicy::Fail).
pub fn with_resolver_builder(
self,
builder: PacResolverBuilder,
) -> SystemPacProxy
pub fn with_resolver_builder( self, builder: PacResolverBuilder, ) -> SystemPacProxy
Configure the resolver used for a newly observed PAC URL.
pub fn set_resolver_builder(
&mut self,
builder: PacResolverBuilder,
) -> &mut SystemPacProxy
pub fn set_resolver_builder( &mut self, builder: PacResolverBuilder, ) -> &mut SystemPacProxy
Configure the resolver used for a newly observed PAC URL.
pub fn maybe_with_max_routes(
self,
max_routes: Option<NonZero<usize>>,
) -> SystemPacProxy
pub fn maybe_with_max_routes( self, max_routes: Option<NonZero<usize>>, ) -> SystemPacProxy
Limit the number of routes published per request.
The default is DEFAULT_PAC_MAX_ROUTES. Set None only when
the system PAC script is trusted with an unbounded fallback list.
pub fn maybe_set_max_routes(
&mut self,
max_routes: Option<NonZero<usize>>,
) -> &mut SystemPacProxy
pub fn maybe_set_max_routes( &mut self, max_routes: Option<NonZero<usize>>, ) -> &mut SystemPacProxy
Limit the number of routes published per request.
The default is DEFAULT_PAC_MAX_ROUTES. Set None only when
the system PAC script is trusted with an unbounded fallback list.
pub fn with_max_routes(self, max_routes: NonZero<usize>) -> SystemPacProxy
pub fn with_max_routes(self, max_routes: NonZero<usize>) -> SystemPacProxy
Limit the number of routes published per request.
The default is DEFAULT_PAC_MAX_ROUTES. Set None only when
the system PAC script is trusted with an unbounded fallback list.
pub fn set_max_routes(
&mut self,
max_routes: NonZero<usize>,
) -> &mut SystemPacProxy
pub fn set_max_routes( &mut self, max_routes: NonZero<usize>, ) -> &mut SystemPacProxy
Limit the number of routes published per request.
The default is DEFAULT_PAC_MAX_ROUTES. Set None only when
the system PAC script is trusted with an unbounded fallback list.
pub fn without_max_routes(self) -> SystemPacProxy
pub fn without_max_routes(self) -> SystemPacProxy
Limit the number of routes published per request.
The default is DEFAULT_PAC_MAX_ROUTES. Set None only when
the system PAC script is trusted with an unbounded fallback list.
pub fn unset_max_routes(&mut self) -> &mut SystemPacProxy
pub fn unset_max_routes(&mut self) -> &mut SystemPacProxy
Limit the number of routes published per request.
The default is DEFAULT_PAC_MAX_ROUTES. Set None only when
the system PAC script is trusted with an unbounded fallback list.
Trait Implementations§
§impl Clone for SystemPacProxy
impl Clone for SystemPacProxy
§fn clone(&self) -> SystemPacProxy
fn clone(&self) -> SystemPacProxy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for SystemPacProxy
impl Debug for SystemPacProxy
§impl Service<Uri> for SystemPacProxy
impl Service<Uri> for SystemPacProxy
§type Output = SystemPacResolver
type Output = SystemPacResolver
§async fn serve(
&self,
script_uri: Uri,
) -> Result<<SystemPacProxy as Service<Uri>>::Output, <SystemPacProxy as Service<Uri>>::Error>
async fn serve( &self, script_uri: Uri, ) -> Result<<SystemPacProxy as Service<Uri>>::Output, <SystemPacProxy as Service<Uri>>::Error>
§fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
fn boxed(self) -> BoxService<Input, Self::Output, Self::Error>
Auto Trait Implementations§
impl !RefUnwindSafe for SystemPacProxy
impl !UnwindSafe for SystemPacProxy
impl Freeze for SystemPacProxy
impl Send for SystemPacProxy
impl Sync for SystemPacProxy
impl Unpin for SystemPacProxy
impl UnsafeUnpin for SystemPacProxy
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
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,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more