silk/http_fetch_native
Profiles: aarch64-unknown-linux-gnu-no-libc, wasm32-unknown-unknown, x86_64-unknown-linux-gnu-no-libc.
Native ownership context for one-shot HTTP fetch operations.
Details
The context retains one immutable proxy policy through NativeRedirectClient. Fresh
attempts therefore recompute the sealed route for every current URI before contact. An
optional native pool handle is copied explicitly, sharing only its preallocated slot state and
bounded immutable direct-route context.
Gotchas
The delivered native pool accepts direct TCP and Unix keys only. A fetch adapter must reject a configured pool when proxy recomputation selects forwarding or tunneling; it must not silently bypass the selected proxy or publish proxy credentials to a direct pool.
Import as FetchNative with import silk.http_fetch_native as FetchNative.
Public declarations: 1.
Context
pub struct Context<'configuration>An immutable native route/acquisition context and optional compatible direct-pool capability.
Details
make consumes all fresh-acquisition settings without allocation. makeWithPool first
constructs that exact fresh context, then fallibly copies the supplied pool handle. A failed
copy publishes no partially initialized context and leaves the source handle valid.
Associated function Context.make
pub fn make<'configuration>(route: silk/http_proxy.Route<'configuration>, options: Options, limits: Limits) -> silk/http_fetch_native.Context<'configuration>Owns one native fresh-acquisition context without a connection pool.
Associated function Context.makeWithPool
pub effect<'env> fn makeWithPool<'configuration: 'env, 'life1: 'env, 'env>(route: silk/http_proxy.Route<'configuration>, options: Options, limits: Limits, pool: &'life1 silk/http_connection_pool.Handle<silk/http_connection_pool.ConnectionKey, silk/http_client_native.NativeTransport, silk/http_connection_pool_native.Context>) -> silk/http_fetch_native.Context<'configuration> ! PoolError | TrustSourceError | OutOfMemoryError ? &mut AllocatorOwns one native fresh-acquisition context and a copied direct-pool capability.
Details
The copied handle retains the pool's already bounded immutable transport, HTTP, TLS, ALPN, and trust context. Route compatibility remains a per-attempt pre-contact admission check.
Method Context.hasPool
pub fn hasPool<'configuration, 'life1>(self: &'life1 Context<'configuration>) -> boolReturns whether this context owns an explicit direct native pool capability.
Implementation silk/http_fetch.FetchClient<'policy, silk/http_client_native.NativeRouteProvider, silk/http_client_native.NativeTransport, A, HandlerError, silk/http_client_native.NativeClientError, ? HandlerRequirements, ? > for silk/http_fetch_native.Context<'configuration>
impl silk/http_fetch.FetchClient<'policy, silk/http_client_native.NativeRouteProvider, silk/http_client_native.NativeTransport, A, HandlerError, silk/http_client_native.NativeClientError, ? HandlerRequirements, ? > for silk/http_fetch_native.Context<'configuration>Operation withAttempt
withAttempt = Context.impl@2.withAttempt