diff --git a/.cursor/rules/Architecture.mdc b/.cursor/rules/Architecture.mdc new file mode 100644 index 00000000..6c9026bb --- /dev/null +++ b/.cursor/rules/Architecture.mdc @@ -0,0 +1,169 @@ +--- +alwaysApply: true +--- + +# Archipelago Bitcoin Node OS - Architecture Documentation + +## Overview + +Archipelago is a next-generation Bitcoin Node OS built on Alpine Linux with Podman containerization, combining the modularity of Parmanode with the security and efficiency of a minimal server OS. + +## System Architecture + +``` +┌─────────────────────────────────────────────────────────┐ +│ Alpine Linux Base (130MB) │ +│ - Minimal kernel │ +│ - Hardened security │ +│ - Read-only root filesystem │ +└─────────────────────────────────────────────────────────┘ + │ + ┌───────────────┼───────────────┐ + │ │ │ +┌───────▼──────┐ ┌──────▼──────┐ ┌─────▼──────┐ +│ Podman │ │ Rust Backend│ │ Vue.js UI │ +│ (rootless) │ │ (core/) │ │ (neode-ui/) │ +└───────┬──────┘ └──────┬──────┘ └─────────────┘ + │ │ + └───────┬───────┘ + │ + ┌───────────▼───────────┐ + │ Container Orchestration│ + │ Layer (new) │ + │ - Manifest parser │ + │ - Podman client │ + │ - Dependency resolver │ + │ - Health monitor │ + └───────────┬───────────┘ + │ + ┌───────────▼───────────┐ + │ Containerized Apps │ + │ - Bitcoin Core │ + │ - LND / CLN │ + │ - BTCPay Server │ + │ - Nostr Relays │ + │ - Meshtastic │ + │ - Web5 DWN │ + └───────────────────────┘ +``` + +## Key Components + +### 1. Alpine Linux Base + +- **Size**: ~130MB (vs 1.5GB+ for Umbrel/StartOS) +- **Security**: Hardened kernel, minimal attack surface +- **Multi-arch**: ARM64 (Raspberry Pi) and x86_64 support + +### 2. Container Orchestration Layer + +Located in `core/container/`: +- **manifest.rs**: Parses YAML app manifests +- **podman_client.rs**: Wraps Podman API for container management +- **dependency_resolver.rs**: Resolves app dependencies and conflicts +- **health_monitor.rs**: Monitors container health and auto-restarts + +### 3. Backend API Extensions + +New RPC endpoints in `core/startos/src/container/`: +- `container-install`: Install app from manifest +- `container-start/stop/remove`: Container lifecycle +- `container-status/logs`: Status and debugging +- `container-list`: List all containers +- `container-health`: Health status aggregation + +### 4. Vue.js UI Integration + +New components in `neode-ui/`: +- **ContainerApps.vue**: List of containerized apps +- **ContainerAppDetails.vue**: Detailed app view with logs +- **ContainerStatus.vue**: Status indicator component +- **container-client.ts**: API client for container operations +- **container.ts**: Pinia store for container state + +### 5. App Manifest System + +Standardized YAML format in `apps/`: +- Defines container image, resources, dependencies +- Security policies and health checks +- Bitcoin/Lightning/Web5 integration metadata + +### 6. Parmanode Compatibility + +Located in `core/parmanode/`: +- **script_runner.rs**: Executes Parmanode scripts in containers +- **converter.rs**: Converts Parmanode modules to app manifests +- **parmanode-wrapper.sh**: Shell wrapper for direct script execution + +### 7. Security Modules + +Located in `core/security/`: +- **container_policies.rs**: Generates AppArmor/SELinux profiles +- **secrets_manager.rs**: Encrypted secrets storage +- **image_verifier.rs**: Cosign signature verification + +### 8. Performance Optimization + +Located in `core/performance/`: +- **resource_manager.rs**: CPU/memory/disk allocation +- **optimize-alpine.sh**: OS-level optimizations + +## App Categories + +### Bitcoin & Lightning +- Bitcoin Core (full node) +- LND (Lightning Network Daemon) +- Core Lightning (CLN) +- BTCPay Server +- Mempool (blockchain explorer) + +### Web5 & Decentralized Protocols +- Nostr relays (nostr-rs-relay, strfry) +- Web5 DWN (Decentralized Web Node) +- DID Wallet +- Bitcoin Domain Names + +### Mesh Networking & Routing +- Meshtastic (LoRa mesh networking) +- Router (mesh routing, device discovery) +- Local network management + +### Self-Hosted Services +- Home Assistant +- Grafana +- SearXNG +- OnlyOffice +- Ollama (local AI) +- Penpot + +## Security Model + +1. **OS Level**: Hardened Alpine, read-only root, minimal kernel +2. **Container Level**: Rootless Podman, capability dropping, network isolation +3. **Secrets**: Encrypted storage, runtime injection only +4. **Supply Chain**: Signed images (Cosign), SBOM generation +5. **Network**: Firewall, rate limiting, Tor integration +6. **Audit**: Immutable logs, configuration tracking + +## Networking + +- **Isolated Networks**: Each app on separate bridge network by default +- **Bitcoin Core**: Isolated network, explicit RPC access +- **Lightning Nodes**: Separate network, gRPC/REST exposed +- **Tor Integration**: Optional, default for privacy-sensitive apps +- **Mesh Networking**: Meshtastic and router support for decentralized communication + +## Data Persistence + +- **App Data**: `/var/lib/archipelago/{app-id}/` +- **Secrets**: `/var/lib/archipelago/secrets/{app-id}/` (encrypted) +- **Logs**: `/var/lib/archipelago/logs/{app-id}/` +- **Backups**: `/var/lib/archipelago/backups/` + +## Future Enhancements + +- Time-travel snapshots (ZFS/BTRFS) +- Decentralized app marketplace (IPFS + Nostr) +- Multi-node clustering +- Hardware attestation (TPM 2.0) +- Protocol-agnostic design (multi-chain support) diff --git a/.cursor/rules/coding-rules.mdc b/.cursor/rules/coding-rules.mdc index e1dae72f..1d9649d2 100644 --- a/.cursor/rules/coding-rules.mdc +++ b/.cursor/rules/coding-rules.mdc @@ -1,17 +1,110 @@ # Archipelago Development Rules -## CRITICAL: Project Structure & Location +**Mission**: Build a production-ready, open-source Bitcoin Node OS that's secure, minimal, and user-friendly from day one. -### NEVER Reference External Directories -- ❌ **NEVER** reference `/Users/tx1138/Code/Archipelago/` in code, scripts, or documentation -- ✅ **ALWAYS** use workspace-relative paths: `./`, `../`, or `$PROJECT_ROOT` -- ✅ The workspace at `/Users/tx1138/Archipelago` is the ONLY project location +**Philosophy**: Code in development should mirror production quality. Write it right the first time. + +--- + +## Table of Contents +1. [Project Structure & Location](#project-structure--location) +2. [Open Source & Licensing](#open-source--licensing) +3. [Production-Ready Development](#production-ready-development) +4. [Architecture & System Design](#architecture--system-design) +5. [Backend Development (Rust)](#backend-development-rust) +6. [Frontend Development (Vue.js)](#frontend-development-vuejs) +7. [Container & Security](#container--security) +8. [Code Quality & Testing](#code-quality--testing) +9. [Documentation](#documentation) +10. [Common Mistakes](#common-mistakes) + +--- + +## Project Structure & Location + +### CRITICAL: Workspace-Relative Paths Only +- ❌ **NEVER** reference absolute user paths (`/Users/username/...`) in code, scripts, or documentation +- ✅ **ALWAYS** use workspace-relative paths: `./`, `../`, or environment variables - ✅ All files must be created in the workspace, never in external directories +- ✅ When copying from external sources, copy TO workspace, then update all references ### File Creation Rules - ✅ Create files directly in the workspace using relative paths - ❌ Never assume files exist elsewhere - check first, create if missing -- ✅ When copying from external sources, copy TO workspace, then update references +- ✅ Use environment variables for paths that change between environments +- ✅ Document all path dependencies in README or setup guides + +--- + +## Open Source & Licensing + +### License Compliance +- ✅ Project is **open source** under [specify license: MIT/Apache 2.0/GPL] +- ✅ All dependencies must be compatible with our license +- ✅ Check license compatibility before adding dependencies +- ✅ Document all third-party licenses in `LICENSES.md` or `THIRD_PARTY_NOTICES.md` + +### Third-Party Code +- ✅ Use permissive licenses (MIT, Apache 2.0, BSD) when possible +- ⚠️ Be cautious with GPL/AGPL dependencies (viral licensing) +- ✅ Always include license headers in source files +- ✅ Document attribution for copied/adapted code + +### Community Standards +- ✅ Follow [Contributor Covenant](https://www.contributor-covenant.org/) code of conduct +- ✅ Provide clear CONTRIBUTING.md with guidelines +- ✅ Use semantic versioning (SemVer) for releases +- ✅ Maintain comprehensive changelog (CHANGELOG.md) +- ✅ Accept community contributions via pull requests +- ✅ Respond to issues and PRs within reasonable timeframes + +### Open Source Best Practices +- ✅ Never commit secrets, API keys, or credentials +- ✅ Use `.gitignore` to exclude sensitive/generated files +- ✅ Keep commit messages clear and descriptive +- ✅ Write documentation as if explaining to new contributors +- ✅ Include setup/installation scripts for easy onboarding + +--- + +## Production-Ready Development + +### Development = Production Mindset +- 🎯 **CRITICAL**: Write production-quality code from the start +- ✅ No "TODO: Fix before production" comments - fix it now +- ✅ No hardcoded values - use configuration from day one +- ✅ No "works on my machine" - test in clean environments +- ✅ Security is NOT optional - implement it in development + +### Configuration Management +- ✅ Use `.env` files for environment-specific configuration +- ✅ Provide `.env.example` with all required variables +- ✅ Never commit `.env` files to git +- ✅ Validate configuration at startup with clear error messages +- ✅ Support multiple environments: dev, staging, production + +### Infrastructure as Code +- ✅ All infrastructure should be reproducible from code +- ✅ Container definitions = production-ready from first commit +- ✅ Scripts should work on fresh systems (document prerequisites) +- ✅ Use Alpine Linux base for containers (production-ready minimal OS) +- ✅ Test multi-arch builds early (ARM64, x86_64) + +### Development Environments +- ✅ Provide dev containers or Docker Compose setups +- ✅ Mock external services for local development +- ✅ Minimize differences between dev and production +- ✅ Document all system prerequisites clearly +- ✅ Use version managers for language runtimes (rustup, nvm) + +### Continuous Integration Preparation +- ✅ Write code that can be automatically tested +- ✅ Keep builds fast (parallelize, cache dependencies) +- ✅ Lint and format code automatically +- ✅ Run security checks on dependencies +- ✅ Test on multiple platforms (Linux, macOS, ARM64) + +--- ## Design System & Styling @@ -54,9 +147,11 @@ } ``` -## StartOS Independence +--- -### Zero StartOS Dependencies +## Architecture & System Design + +### StartOS Independence - ❌ **NEVER** import or reference StartOS-specific code - ❌ **NEVER** copy StartOS patterns without refactoring - ✅ **ALWAYS** create Archipelago-native implementations @@ -66,128 +161,369 @@ ### Backend Architecture - ✅ Use `archipelago-container` crate, not StartOS container code -- ✅ Use our RPC endpoints in `core/startos/src/container/` -- ⚠️ **TEMPORARY**: Using StartOS backend (`startbox`) as base - this is temporary -- ✅ **GOAL**: Build our own Archipelago backend binary that uses ONLY our modules +- ✅ Use our RPC endpoints in `core/archipelago/src/` +- ⚠️ **TEMPORARY**: Using StartOS backend as base during Phase 1 +- 🎯 **GOAL**: Build our own Archipelago backend binary that uses ONLY our modules - ✅ Mark all StartOS-derived code with `// TODO: Refactor to Archipelago-native` -- ✅ For development: Use mock backend for UI work, avoid StartOS backend when possible -- ✅ All new features must use our modules (`archipelago-container`, `archipelago-security`, etc.) +- ✅ For development: Use mock backend for UI work when possible +- ✅ All new features must use our modules (`archipelago-*` crates) -## Container & App Development +### System Architecture Principles +- ✅ **Alpine Linux Base**: 130MB minimal, secure, multi-arch +- ✅ **Podman Only**: Rootless containers, no Docker dependencies +- ✅ **Manifest-Driven**: All apps defined by YAML manifests +- ✅ **Security First**: Read-only filesystems, capability dropping, network isolation +- ✅ **Dependency Resolution**: Automatic dependency management between apps +- ✅ **Health Monitoring**: Built-in health checks and auto-restart -### App Manifest Rules +### Multi-Architecture Support +- ✅ Support both ARM64 (Raspberry Pi) and x86_64 from day one +- ✅ Test builds on both architectures regularly +- ✅ Use multi-arch container images +- ✅ Document architecture-specific differences + +### Modular Design +- ✅ Each crate in `core/` should be independent and reusable +- ✅ Minimize coupling between modules +- ✅ Define clear interfaces between components +- ✅ Use traits for abstraction and testability + +--- + +## Container & Security + +### App Manifest Rules (Production Standards) - ✅ **ALWAYS** create manifests in `apps/{app-id}/manifest.yml` - ✅ Follow the manifest specification in `docs/app-manifest-spec.md` - ✅ Use semantic versioning: `MAJOR.MINOR.PATCH` - ✅ Include security policies, resource limits, health checks +- ✅ Define explicit dependencies with version constraints +- ✅ Include license information and attribution +- ✅ Document configuration options clearly +- ✅ Provide default values that are secure ### Container Orchestration - ✅ Use `archipelago_container::PodmanClient` for all container operations - ✅ Use `archipelago_container::AppManifest` for manifest parsing - ✅ Use `archipelago_container::DependencyResolver` for dependency management - ❌ Never use Docker directly - always use Podman via our client +- ✅ Implement graceful shutdown (handle SIGTERM) +- ✅ Set resource limits (CPU, memory, disk) +- ✅ Monitor container health continuously -### Security First +### Security First (CRITICAL - Production Requirement) +- 🔒 **Security is NOT optional** - every container must be hardened + +#### Container Security - ✅ **ALWAYS** set `readonly_root: true` unless explicitly needed - ✅ **ALWAYS** drop all capabilities, add only required ones -- ✅ **ALWAYS** use isolated networks unless host network is required -- ✅ **ALWAYS** verify container images with Cosign signatures -- ✅ Use AppArmor profiles from `core/security/` +- ✅ **ALWAYS** use isolated networks (never `host` network unless required) +- ✅ **ALWAYS** run as non-root user (UID > 1000) +- ✅ **ALWAYS** set `no-new-privileges: true` +- ✅ Use AppArmor/SELinux profiles from `core/security/` +- ✅ Implement seccomp profiles to restrict syscalls -## Frontend Development +#### Image Security +- ✅ **ALWAYS** verify container images with Cosign signatures +- ✅ Use official base images from trusted registries +- ✅ Pin image versions (never use `latest` tag) +- ✅ Scan images for vulnerabilities (Trivy, Grype) +- ✅ Rebuild images regularly for security updates +- ✅ Generate and publish SBOM (Software Bill of Materials) + +#### Secrets Management +- ✅ **NEVER** hardcode secrets in code or config files +- ✅ Use encrypted secrets storage (`core/security/secrets_manager.rs`) +- ✅ Inject secrets at runtime only (environment variables or mounted files) +- ✅ Rotate secrets regularly +- ✅ Use minimal secret scopes (principle of least privilege) +- ✅ Clear secrets from memory after use +- ✅ Log secret access for audit trails (without logging values) + +#### Network Security +- ✅ Use isolated bridge networks per app +- ✅ Implement firewall rules (iptables/nftables) +- ✅ Rate limit API endpoints +- ✅ Use TLS for all external communication +- ✅ Support Tor for privacy-sensitive apps +- ✅ Implement intrusion detection (fail2ban) + +#### Data Security +- ✅ Encrypt sensitive data at rest +- ✅ Use encrypted volumes for secrets +- ✅ Implement secure backup/restore +- ✅ Sanitize logs (no secrets in logs) +- ✅ Implement data retention policies +- ✅ Support secure data deletion + +--- + +## Frontend Development (Vue.js) ### Vue.js Component Rules -- ✅ Use Composition API (`

All

Rustdoc help

Back
\ No newline at end of file diff --git a/core/target/doc/http_body_util/all.html b/core/target/doc/http_body_util/all.html deleted file mode 100644 index 2949554e..00000000 --- a/core/target/doc/http_body_util/all.html +++ /dev/null @@ -1 +0,0 @@ -List of all items in this crate

All

List of all items

Structs

Enums

Traits

\ No newline at end of file diff --git a/core/target/doc/http_body_util/collected/struct.Collected.html b/core/target/doc/http_body_util/collected/struct.Collected.html deleted file mode 100644 index cfb2d8a9..00000000 --- a/core/target/doc/http_body_util/collected/struct.Collected.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../http_body_util/struct.Collected.html...

- - - \ No newline at end of file diff --git a/core/target/doc/http_body_util/combinators/box_body/struct.BoxBody.html b/core/target/doc/http_body_util/combinators/box_body/struct.BoxBody.html deleted file mode 100644 index f66d5d24..00000000 --- a/core/target/doc/http_body_util/combinators/box_body/struct.BoxBody.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../../http_body_util/combinators/struct.BoxBody.html...

- - - \ No newline at end of file diff --git a/core/target/doc/http_body_util/combinators/box_body/struct.UnsyncBoxBody.html b/core/target/doc/http_body_util/combinators/box_body/struct.UnsyncBoxBody.html deleted file mode 100644 index f108a6b7..00000000 --- a/core/target/doc/http_body_util/combinators/box_body/struct.UnsyncBoxBody.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../../http_body_util/combinators/struct.UnsyncBoxBody.html...

- - - \ No newline at end of file diff --git a/core/target/doc/http_body_util/combinators/collect/struct.Collect.html b/core/target/doc/http_body_util/combinators/collect/struct.Collect.html deleted file mode 100644 index af1fca80..00000000 --- a/core/target/doc/http_body_util/combinators/collect/struct.Collect.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../../http_body_util/combinators/struct.Collect.html...

- - - \ No newline at end of file diff --git a/core/target/doc/http_body_util/combinators/frame/struct.Frame.html b/core/target/doc/http_body_util/combinators/frame/struct.Frame.html deleted file mode 100644 index e58f4d32..00000000 --- a/core/target/doc/http_body_util/combinators/frame/struct.Frame.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../../http_body_util/combinators/struct.Frame.html...

- - - \ No newline at end of file diff --git a/core/target/doc/http_body_util/combinators/index.html b/core/target/doc/http_body_util/combinators/index.html deleted file mode 100644 index 734f56c9..00000000 --- a/core/target/doc/http_body_util/combinators/index.html +++ /dev/null @@ -1,2 +0,0 @@ -http_body_util::combinators - Rust

Module combinators

Module combinators 

Source
Expand description

Combinators for the Body trait.

-

Structs§

BoxBody
A boxed [Body] trait object.
Collect
Future that resolves into a Collected.
Frame
Future that resolves to the next frame from a [Body].
MapErr
Body returned by the map_err combinator.
MapFrame
Body returned by the map_frame combinator.
UnsyncBoxBody
A boxed [Body] trait object that is !Sync.
WithTrailers
Adds trailers to a body.
\ No newline at end of file diff --git a/core/target/doc/http_body_util/combinators/map_err/struct.MapErr.html b/core/target/doc/http_body_util/combinators/map_err/struct.MapErr.html deleted file mode 100644 index 221b07fd..00000000 --- a/core/target/doc/http_body_util/combinators/map_err/struct.MapErr.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../../http_body_util/combinators/struct.MapErr.html...

- - - \ No newline at end of file diff --git a/core/target/doc/http_body_util/combinators/map_frame/struct.MapFrame.html b/core/target/doc/http_body_util/combinators/map_frame/struct.MapFrame.html deleted file mode 100644 index 7a9df69a..00000000 --- a/core/target/doc/http_body_util/combinators/map_frame/struct.MapFrame.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../../http_body_util/combinators/struct.MapFrame.html...

- - - \ No newline at end of file diff --git a/core/target/doc/http_body_util/combinators/sidebar-items.js b/core/target/doc/http_body_util/combinators/sidebar-items.js deleted file mode 100644 index 028686b4..00000000 --- a/core/target/doc/http_body_util/combinators/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"struct":["BoxBody","Collect","Frame","MapErr","MapFrame","UnsyncBoxBody","WithTrailers"]}; \ No newline at end of file diff --git a/core/target/doc/http_body_util/combinators/struct.BoxBody.html b/core/target/doc/http_body_util/combinators/struct.BoxBody.html deleted file mode 100644 index 618d367a..00000000 --- a/core/target/doc/http_body_util/combinators/struct.BoxBody.html +++ /dev/null @@ -1,34 +0,0 @@ -BoxBody in http_body_util::combinators - Rust

BoxBody

Struct BoxBody 

Source
pub struct BoxBody<D, E> { /* private fields */ }
Expand description

A boxed [Body] trait object.

-

Implementations§

Source§

impl<D, E> BoxBody<D, E>

Source

pub fn new<B>(body: B) -> Self
where - B: Body<Data = D, Error = E> + Send + Sync + 'static, - D: Buf,

Create a new BoxBody.

-

Trait Implementations§

Source§

impl<D, E> Body for BoxBody<D, E>
where - D: Buf,

Source§

type Data = D

Values yielded by the Body.
Source§

type Error = E

The error type this Body might generate.
Source§

fn poll_frame( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>>

Attempt to pull out the next data buffer of this stream.
Source§

fn is_end_stream(&self) -> bool

Returns true when the end of stream has been reached. Read more
Source§

fn size_hint(&self) -> SizeHint

Returns the bounds on the remaining length of the stream. Read more
Source§

impl<D, E> Debug for BoxBody<D, E>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<D, E> Default for BoxBody<D, E>
where - D: Buf + 'static,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<D, E> Freeze for BoxBody<D, E>

§

impl<D, E> !RefUnwindSafe for BoxBody<D, E>

§

impl<D, E> Send for BoxBody<D, E>

§

impl<D, E> Sync for BoxBody<D, E>

§

impl<D, E> Unpin for BoxBody<D, E>

§

impl<D, E> !UnwindSafe for BoxBody<D, E>

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> BodyExt for T
where - T: Body + ?Sized,

Source§

fn frame(&mut self) -> Frame<'_, Self>
where - Self: Unpin,

Returns a future that resolves to the next Frame, if any.
Source§

fn map_frame<F, B>(self, f: F) -> MapFrame<Self, F>
where - Self: Sized, - F: FnMut(Frame<Self::Data>) -> Frame<B>, - B: Buf,

Maps this body’s frame to a different kind.
Source§

fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
where - Self: Sized, - F: FnMut(Self::Error) -> E,

Maps this body’s error value to a different value.
Source§

fn boxed(self) -> BoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + Sync + 'static,

Turn this body into a boxed trait object.
Source§

fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + 'static,

Turn this body into a boxed trait object that is !Sync.
Source§

fn collect(self) -> Collect<Self>
where - Self: Sized,

Turn this body into Collected body which will collect all the DATA frames -and trailers.
Source§

fn with_trailers<F>(self, trailers: F) -> WithTrailers<Self, F>
where - Self: Sized, - F: Future<Output = Option<Result<HeaderMap, Self::Error>>>,

Add trailers to the body. Read more
Source§

fn into_data_stream(self) -> BodyDataStream<Self>
where - Self: Sized,

Turn this body into BodyDataStream.
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/core/target/doc/http_body_util/combinators/struct.Collect.html b/core/target/doc/http_body_util/combinators/struct.Collect.html deleted file mode 100644 index 1a8bcbad..00000000 --- a/core/target/doc/http_body_util/combinators/struct.Collect.html +++ /dev/null @@ -1,30 +0,0 @@ -Collect in http_body_util::combinators - Rust

Collect

Struct Collect 

Source
pub struct Collect<T>
where - T: Body + ?Sized,
{ /* private fields */ }
Expand description

Future that resolves into a Collected.

-

Trait Implementations§

Source§

impl<T: Body + ?Sized> Future for Collect<T>

Source§

type Output = Result<Collected<<T as Body>::Data>, <T as Body>::Error>

The type of value produced on completion.
Source§

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>

Attempts to resolve the future to a final value, registering -the current task for wakeup if the value is not yet available. Read more
Source§

impl<'__pin, T> Unpin for Collect<T>
where - PinnedFieldsOf<__Origin<'__pin, T>>: Unpin, - T: Body + ?Sized,

Auto Trait Implementations§

§

impl<T> Freeze for Collect<T>
where - T: Freeze + ?Sized,

§

impl<T> RefUnwindSafe for Collect<T>
where - T: RefUnwindSafe + ?Sized, - <T as Body>::Data: RefUnwindSafe,

§

impl<T> Send for Collect<T>
where - T: Send + ?Sized, - <T as Body>::Data: Send,

§

impl<T> Sync for Collect<T>
where - T: Sync + ?Sized, - <T as Body>::Data: Sync,

§

impl<T> UnwindSafe for Collect<T>
where - T: UnwindSafe + ?Sized, - <T as Body>::Data: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<F> IntoFuture for F
where - F: Future,

Source§

type Output = <F as Future>::Output

The output that the future will produce on completion.
Source§

type IntoFuture = F

Which kind of future are we turning this into?
Source§

fn into_future(self) -> <F as IntoFuture>::IntoFuture

Creates a future from a value. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<F, T, E> TryFuture for F
where - F: Future<Output = Result<T, E>> + ?Sized,

§

type Ok = T

The type of successful values yielded by this future
§

type Error = E

The type of failures yielded by this future
§

fn try_poll( - self: Pin<&mut F>, - cx: &mut Context<'_>, -) -> Poll<<F as Future>::Output>

Poll this TryFuture as if it were a Future. Read more
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/core/target/doc/http_body_util/combinators/struct.Frame.html b/core/target/doc/http_body_util/combinators/struct.Frame.html deleted file mode 100644 index f9da3877..00000000 --- a/core/target/doc/http_body_util/combinators/struct.Frame.html +++ /dev/null @@ -1,19 +0,0 @@ -Frame in http_body_util::combinators - Rust

Frame

Struct Frame 

Source
pub struct Frame<'a, T: ?Sized>(/* private fields */);
Expand description

Future that resolves to the next frame from a [Body].

-

Trait Implementations§

Source§

impl<'a, T: Debug + ?Sized> Debug for Frame<'a, T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: Body + Unpin + ?Sized> Future for Frame<'_, T>

Source§

type Output = Option<Result<Frame<<T as Body>::Data>, <T as Body>::Error>>

The type of value produced on completion.
Source§

fn poll(self: Pin<&mut Self>, ctx: &mut Context<'_>) -> Poll<Self::Output>

Attempts to resolve the future to a final value, registering -the current task for wakeup if the value is not yet available. Read more

Auto Trait Implementations§

§

impl<'a, T> Freeze for Frame<'a, T>
where - T: ?Sized,

§

impl<'a, T> RefUnwindSafe for Frame<'a, T>
where - T: RefUnwindSafe + ?Sized,

§

impl<'a, T> Send for Frame<'a, T>
where - T: Send + ?Sized,

§

impl<'a, T> Sync for Frame<'a, T>
where - T: Sync + ?Sized,

§

impl<'a, T> Unpin for Frame<'a, T>
where - T: ?Sized,

§

impl<'a, T> !UnwindSafe for Frame<'a, T>

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<F> IntoFuture for F
where - F: Future,

Source§

type Output = <F as Future>::Output

The output that the future will produce on completion.
Source§

type IntoFuture = F

Which kind of future are we turning this into?
Source§

fn into_future(self) -> <F as IntoFuture>::IntoFuture

Creates a future from a value. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/core/target/doc/http_body_util/combinators/struct.MapErr.html b/core/target/doc/http_body_util/combinators/struct.MapErr.html deleted file mode 100644 index db81e142..00000000 --- a/core/target/doc/http_body_util/combinators/struct.MapErr.html +++ /dev/null @@ -1,49 +0,0 @@ -MapErr in http_body_util::combinators - Rust

MapErr

Struct MapErr 

Source
pub struct MapErr<B, F> { /* private fields */ }
Expand description

Body returned by the map_err combinator.

-

Implementations§

Source§

impl<B, F> MapErr<B, F>

Source

pub fn get_ref(&self) -> &B

Get a reference to the inner body

-
Source

pub fn get_mut(&mut self) -> &mut B

Get a mutable reference to the inner body

-
Source

pub fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut B>

Get a pinned mutable reference to the inner body

-
Source

pub fn into_inner(self) -> B

Consume self, returning the inner body

-

Trait Implementations§

Source§

impl<B, F, E> Body for MapErr<B, F>
where - B: Body, - F: FnMut(B::Error) -> E,

Source§

type Data = <B as Body>::Data

Values yielded by the Body.
Source§

type Error = E

The error type this Body might generate.
Source§

fn poll_frame( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>>

Attempt to pull out the next data buffer of this stream.
Source§

fn is_end_stream(&self) -> bool

Returns true when the end of stream has been reached. Read more
Source§

fn size_hint(&self) -> SizeHint

Returns the bounds on the remaining length of the stream. Read more
Source§

impl<B: Clone, F: Clone> Clone for MapErr<B, F>

Source§

fn clone(&self) -> MapErr<B, F>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<B, F> Debug for MapErr<B, F>
where - B: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<B: Copy, F: Copy> Copy for MapErr<B, F>

Source§

impl<'__pin, B, F> Unpin for MapErr<B, F>
where - PinnedFieldsOf<__Origin<'__pin, B, F>>: Unpin,

Auto Trait Implementations§

§

impl<B, F> Freeze for MapErr<B, F>
where - B: Freeze, - F: Freeze,

§

impl<B, F> RefUnwindSafe for MapErr<B, F>
where - B: RefUnwindSafe, - F: RefUnwindSafe,

§

impl<B, F> Send for MapErr<B, F>
where - B: Send, - F: Send,

§

impl<B, F> Sync for MapErr<B, F>
where - B: Sync, - F: Sync,

§

impl<B, F> UnwindSafe for MapErr<B, F>
where - B: UnwindSafe, - F: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> BodyExt for T
where - T: Body + ?Sized,

Source§

fn frame(&mut self) -> Frame<'_, Self>
where - Self: Unpin,

Returns a future that resolves to the next Frame, if any.
Source§

fn map_frame<F, B>(self, f: F) -> MapFrame<Self, F>
where - Self: Sized, - F: FnMut(Frame<Self::Data>) -> Frame<B>, - B: Buf,

Maps this body’s frame to a different kind.
Source§

fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
where - Self: Sized, - F: FnMut(Self::Error) -> E,

Maps this body’s error value to a different value.
Source§

fn boxed(self) -> BoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + Sync + 'static,

Turn this body into a boxed trait object.
Source§

fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + 'static,

Turn this body into a boxed trait object that is !Sync.
Source§

fn collect(self) -> Collect<Self>
where - Self: Sized,

Turn this body into Collected body which will collect all the DATA frames -and trailers.
Source§

fn with_trailers<F>(self, trailers: F) -> WithTrailers<Self, F>
where - Self: Sized, - F: Future<Output = Option<Result<HeaderMap, Self::Error>>>,

Add trailers to the body. Read more
Source§

fn into_data_stream(self) -> BodyDataStream<Self>
where - Self: Sized,

Turn this body into BodyDataStream.
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/core/target/doc/http_body_util/combinators/struct.MapFrame.html b/core/target/doc/http_body_util/combinators/struct.MapFrame.html deleted file mode 100644 index 883b9f22..00000000 --- a/core/target/doc/http_body_util/combinators/struct.MapFrame.html +++ /dev/null @@ -1,50 +0,0 @@ -MapFrame in http_body_util::combinators - Rust

MapFrame

Struct MapFrame 

Source
pub struct MapFrame<B, F> { /* private fields */ }
Expand description

Body returned by the map_frame combinator.

-

Implementations§

Source§

impl<B, F> MapFrame<B, F>

Source

pub fn get_ref(&self) -> &B

Get a reference to the inner body

-
Source

pub fn get_mut(&mut self) -> &mut B

Get a mutable reference to the inner body

-
Source

pub fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut B>

Get a pinned mutable reference to the inner body

-
Source

pub fn into_inner(self) -> B

Consume self, returning the inner body

-

Trait Implementations§

Source§

impl<B, F, B2> Body for MapFrame<B, F>
where - B: Body, - F: FnMut(Frame<B::Data>) -> Frame<B2>, - B2: Buf,

Source§

type Data = B2

Values yielded by the Body.
Source§

type Error = <B as Body>::Error

The error type this Body might generate.
Source§

fn poll_frame( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>>

Attempt to pull out the next data buffer of this stream.
Source§

fn is_end_stream(&self) -> bool

Returns true when the end of stream has been reached. Read more
§

fn size_hint(&self) -> SizeHint

Returns the bounds on the remaining length of the stream. Read more
Source§

impl<B: Clone, F: Clone> Clone for MapFrame<B, F>

Source§

fn clone(&self) -> MapFrame<B, F>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<B, F> Debug for MapFrame<B, F>
where - B: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<B: Copy, F: Copy> Copy for MapFrame<B, F>

Source§

impl<'__pin, B, F> Unpin for MapFrame<B, F>
where - PinnedFieldsOf<__Origin<'__pin, B, F>>: Unpin,

Auto Trait Implementations§

§

impl<B, F> Freeze for MapFrame<B, F>
where - B: Freeze, - F: Freeze,

§

impl<B, F> RefUnwindSafe for MapFrame<B, F>
where - B: RefUnwindSafe, - F: RefUnwindSafe,

§

impl<B, F> Send for MapFrame<B, F>
where - B: Send, - F: Send,

§

impl<B, F> Sync for MapFrame<B, F>
where - B: Sync, - F: Sync,

§

impl<B, F> UnwindSafe for MapFrame<B, F>
where - B: UnwindSafe, - F: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> BodyExt for T
where - T: Body + ?Sized,

Source§

fn frame(&mut self) -> Frame<'_, Self>
where - Self: Unpin,

Returns a future that resolves to the next Frame, if any.
Source§

fn map_frame<F, B>(self, f: F) -> MapFrame<Self, F>
where - Self: Sized, - F: FnMut(Frame<Self::Data>) -> Frame<B>, - B: Buf,

Maps this body’s frame to a different kind.
Source§

fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
where - Self: Sized, - F: FnMut(Self::Error) -> E,

Maps this body’s error value to a different value.
Source§

fn boxed(self) -> BoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + Sync + 'static,

Turn this body into a boxed trait object.
Source§

fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + 'static,

Turn this body into a boxed trait object that is !Sync.
Source§

fn collect(self) -> Collect<Self>
where - Self: Sized,

Turn this body into Collected body which will collect all the DATA frames -and trailers.
Source§

fn with_trailers<F>(self, trailers: F) -> WithTrailers<Self, F>
where - Self: Sized, - F: Future<Output = Option<Result<HeaderMap, Self::Error>>>,

Add trailers to the body. Read more
Source§

fn into_data_stream(self) -> BodyDataStream<Self>
where - Self: Sized,

Turn this body into BodyDataStream.
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/core/target/doc/http_body_util/combinators/struct.UnsyncBoxBody.html b/core/target/doc/http_body_util/combinators/struct.UnsyncBoxBody.html deleted file mode 100644 index 7f7b754f..00000000 --- a/core/target/doc/http_body_util/combinators/struct.UnsyncBoxBody.html +++ /dev/null @@ -1,34 +0,0 @@ -UnsyncBoxBody in http_body_util::combinators - Rust

UnsyncBoxBody

Struct UnsyncBoxBody 

Source
pub struct UnsyncBoxBody<D, E> { /* private fields */ }
Expand description

A boxed [Body] trait object that is !Sync.

-

Implementations§

Source§

impl<D, E> UnsyncBoxBody<D, E>

Source

pub fn new<B>(body: B) -> Self
where - B: Body<Data = D, Error = E> + Send + 'static, - D: Buf,

Create a new UnsyncBoxBody.

-

Trait Implementations§

Source§

impl<D, E> Body for UnsyncBoxBody<D, E>
where - D: Buf,

Source§

type Data = D

Values yielded by the Body.
Source§

type Error = E

The error type this Body might generate.
Source§

fn poll_frame( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>>

Attempt to pull out the next data buffer of this stream.
Source§

fn is_end_stream(&self) -> bool

Returns true when the end of stream has been reached. Read more
Source§

fn size_hint(&self) -> SizeHint

Returns the bounds on the remaining length of the stream. Read more
Source§

impl<D, E> Debug for UnsyncBoxBody<D, E>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<D, E> Default for UnsyncBoxBody<D, E>
where - D: Buf + 'static,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<D, E> Freeze for UnsyncBoxBody<D, E>

§

impl<D, E> !RefUnwindSafe for UnsyncBoxBody<D, E>

§

impl<D, E> Send for UnsyncBoxBody<D, E>

§

impl<D, E> !Sync for UnsyncBoxBody<D, E>

§

impl<D, E> Unpin for UnsyncBoxBody<D, E>

§

impl<D, E> !UnwindSafe for UnsyncBoxBody<D, E>

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> BodyExt for T
where - T: Body + ?Sized,

Source§

fn frame(&mut self) -> Frame<'_, Self>
where - Self: Unpin,

Returns a future that resolves to the next Frame, if any.
Source§

fn map_frame<F, B>(self, f: F) -> MapFrame<Self, F>
where - Self: Sized, - F: FnMut(Frame<Self::Data>) -> Frame<B>, - B: Buf,

Maps this body’s frame to a different kind.
Source§

fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
where - Self: Sized, - F: FnMut(Self::Error) -> E,

Maps this body’s error value to a different value.
Source§

fn boxed(self) -> BoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + Sync + 'static,

Turn this body into a boxed trait object.
Source§

fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + 'static,

Turn this body into a boxed trait object that is !Sync.
Source§

fn collect(self) -> Collect<Self>
where - Self: Sized,

Turn this body into Collected body which will collect all the DATA frames -and trailers.
Source§

fn with_trailers<F>(self, trailers: F) -> WithTrailers<Self, F>
where - Self: Sized, - F: Future<Output = Option<Result<HeaderMap, Self::Error>>>,

Add trailers to the body. Read more
Source§

fn into_data_stream(self) -> BodyDataStream<Self>
where - Self: Sized,

Turn this body into BodyDataStream.
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/core/target/doc/http_body_util/combinators/struct.WithTrailers.html b/core/target/doc/http_body_util/combinators/struct.WithTrailers.html deleted file mode 100644 index 24be635f..00000000 --- a/core/target/doc/http_body_util/combinators/struct.WithTrailers.html +++ /dev/null @@ -1,43 +0,0 @@ -WithTrailers in http_body_util::combinators - Rust

WithTrailers

Struct WithTrailers 

Source
pub struct WithTrailers<T, F> { /* private fields */ }
Expand description

Adds trailers to a body.

-

See [BodyExt::with_trailers] for more details.

-

Trait Implementations§

Source§

impl<T, F> Body for WithTrailers<T, F>
where - T: Body, - F: Future<Output = Option<Result<HeaderMap, T::Error>>>,

Source§

type Data = <T as Body>::Data

Values yielded by the Body.
Source§

type Error = <T as Body>::Error

The error type this Body might generate.
Source§

fn poll_frame( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>>

Attempt to pull out the next data buffer of this stream.
Source§

fn size_hint(&self) -> SizeHint

Returns the bounds on the remaining length of the stream. Read more
§

fn is_end_stream(&self) -> bool

Returns true when the end of stream has been reached. Read more
Source§

impl<'__pin, T, F> Unpin for WithTrailers<T, F>
where - PinnedFieldsOf<__Origin<'__pin, T, F>>: Unpin,

Auto Trait Implementations§

§

impl<T, F> Freeze for WithTrailers<T, F>
where - T: Freeze, - F: Freeze,

§

impl<T, F> RefUnwindSafe for WithTrailers<T, F>
where - T: RefUnwindSafe, - F: RefUnwindSafe,

§

impl<T, F> Send for WithTrailers<T, F>
where - T: Send, - F: Send,

§

impl<T, F> Sync for WithTrailers<T, F>
where - T: Sync, - F: Sync,

§

impl<T, F> UnwindSafe for WithTrailers<T, F>
where - T: UnwindSafe, - F: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> BodyExt for T
where - T: Body + ?Sized,

Source§

fn frame(&mut self) -> Frame<'_, Self>
where - Self: Unpin,

Returns a future that resolves to the next Frame, if any.
Source§

fn map_frame<F, B>(self, f: F) -> MapFrame<Self, F>
where - Self: Sized, - F: FnMut(Frame<Self::Data>) -> Frame<B>, - B: Buf,

Maps this body’s frame to a different kind.
Source§

fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
where - Self: Sized, - F: FnMut(Self::Error) -> E,

Maps this body’s error value to a different value.
Source§

fn boxed(self) -> BoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + Sync + 'static,

Turn this body into a boxed trait object.
Source§

fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + 'static,

Turn this body into a boxed trait object that is !Sync.
Source§

fn collect(self) -> Collect<Self>
where - Self: Sized,

Turn this body into Collected body which will collect all the DATA frames -and trailers.
Source§

fn with_trailers<F>(self, trailers: F) -> WithTrailers<Self, F>
where - Self: Sized, - F: Future<Output = Option<Result<HeaderMap, Self::Error>>>,

Add trailers to the body. Read more
Source§

fn into_data_stream(self) -> BodyDataStream<Self>
where - Self: Sized,

Turn this body into BodyDataStream.
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/core/target/doc/http_body_util/combinators/with_trailers/struct.WithTrailers.html b/core/target/doc/http_body_util/combinators/with_trailers/struct.WithTrailers.html deleted file mode 100644 index 2e5f078d..00000000 --- a/core/target/doc/http_body_util/combinators/with_trailers/struct.WithTrailers.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../../http_body_util/combinators/struct.WithTrailers.html...

- - - \ No newline at end of file diff --git a/core/target/doc/http_body_util/either/enum.Either.html b/core/target/doc/http_body_util/either/enum.Either.html deleted file mode 100644 index 5d51eb9a..00000000 --- a/core/target/doc/http_body_util/either/enum.Either.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../http_body_util/enum.Either.html...

- - - \ No newline at end of file diff --git a/core/target/doc/http_body_util/empty/struct.Empty.html b/core/target/doc/http_body_util/empty/struct.Empty.html deleted file mode 100644 index d2992924..00000000 --- a/core/target/doc/http_body_util/empty/struct.Empty.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../http_body_util/struct.Empty.html...

- - - \ No newline at end of file diff --git a/core/target/doc/http_body_util/enum.Either.html b/core/target/doc/http_body_util/enum.Either.html deleted file mode 100644 index 08d27a60..00000000 --- a/core/target/doc/http_body_util/enum.Either.html +++ /dev/null @@ -1,55 +0,0 @@ -Either in http_body_util - Rust

Either

Enum Either 

Source
pub enum Either<L, R> {
-    Left(L),
-    Right(R),
-}
Expand description

Sum type with two cases: Left and Right, used if a body can be one of -two distinct types.

-

Variants§

§

Left(L)

A value of type L

-
§

Right(R)

A value of type R

-

Implementations§

Source§

impl<L> Either<L, L>

Source

pub fn into_inner(self) -> L

Convert Either into the inner type, if both Left and Right are -of the same type.

-

Trait Implementations§

Source§

impl<L, R, Data> Body for Either<L, R>
where - L: Body<Data = Data>, - R: Body<Data = Data>, - L::Error: Into<Box<dyn Error + Send + Sync>>, - R::Error: Into<Box<dyn Error + Send + Sync>>, - Data: Buf,

Source§

type Data = Data

Values yielded by the Body.
Source§

type Error = Box<dyn Error + Sync + Send>

The error type this Body might generate.
Source§

fn poll_frame( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>>

Attempt to pull out the next data buffer of this stream.
Source§

fn is_end_stream(&self) -> bool

Returns true when the end of stream has been reached. Read more
Source§

fn size_hint(&self) -> SizeHint

Returns the bounds on the remaining length of the stream. Read more
Source§

impl<L: Clone, R: Clone> Clone for Either<L, R>

Source§

fn clone(&self) -> Either<L, R>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<L: Debug, R: Debug> Debug for Either<L, R>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<L: Copy, R: Copy> Copy for Either<L, R>

Source§

impl<'__pin, L, R> Unpin for Either<L, R>
where - __Origin<'__pin, L, R>: Unpin,

Auto Trait Implementations§

§

impl<L, R> Freeze for Either<L, R>
where - L: Freeze, - R: Freeze,

§

impl<L, R> RefUnwindSafe for Either<L, R>
where - L: RefUnwindSafe, - R: RefUnwindSafe,

§

impl<L, R> Send for Either<L, R>
where - L: Send, - R: Send,

§

impl<L, R> Sync for Either<L, R>
where - L: Sync, - R: Sync,

§

impl<L, R> UnwindSafe for Either<L, R>
where - L: UnwindSafe, - R: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> BodyExt for T
where - T: Body + ?Sized,

Source§

fn frame(&mut self) -> Frame<'_, Self>
where - Self: Unpin,

Returns a future that resolves to the next Frame, if any.
Source§

fn map_frame<F, B>(self, f: F) -> MapFrame<Self, F>
where - Self: Sized, - F: FnMut(Frame<Self::Data>) -> Frame<B>, - B: Buf,

Maps this body’s frame to a different kind.
Source§

fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
where - Self: Sized, - F: FnMut(Self::Error) -> E,

Maps this body’s error value to a different value.
Source§

fn boxed(self) -> BoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + Sync + 'static,

Turn this body into a boxed trait object.
Source§

fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + 'static,

Turn this body into a boxed trait object that is !Sync.
Source§

fn collect(self) -> Collect<Self>
where - Self: Sized,

Turn this body into Collected body which will collect all the DATA frames -and trailers.
Source§

fn with_trailers<F>(self, trailers: F) -> WithTrailers<Self, F>
where - Self: Sized, - F: Future<Output = Option<Result<HeaderMap, Self::Error>>>,

Add trailers to the body. Read more
Source§

fn into_data_stream(self) -> BodyDataStream<Self>
where - Self: Sized,

Turn this body into BodyDataStream.
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/core/target/doc/http_body_util/full/struct.Full.html b/core/target/doc/http_body_util/full/struct.Full.html deleted file mode 100644 index c2140be0..00000000 --- a/core/target/doc/http_body_util/full/struct.Full.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../http_body_util/struct.Full.html...

- - - \ No newline at end of file diff --git a/core/target/doc/http_body_util/index.html b/core/target/doc/http_body_util/index.html deleted file mode 100644 index bd561be6..00000000 --- a/core/target/doc/http_body_util/index.html +++ /dev/null @@ -1,6 +0,0 @@ -http_body_util - Rust

Crate http_body_util

Crate http_body_util 

Source
Expand description

Utilities for [http_body::Body].

-

BodyExt adds extensions to the common trait.

-

Empty and Full provide simple implementations.

-

Modules§

combinators
Combinators for the Body trait.

Structs§

BodyDataStream
A data stream created from a [Body].
BodyStream
A stream created from a [Body].
Collected
A collected body produced by BodyExt::collect which collects all the DATA frames -and trailers.
Empty
A body that is always empty.
Full
A body that consists of a single chunk.
LengthLimitError
An error returned when body length exceeds the configured limit.
Limited
A length limited body.
StreamBody
A body created from a [Stream].

Enums§

Either
Sum type with two cases: Left and Right, used if a body can be one of -two distinct types.

Traits§

BodyExt
An extension trait for [http_body::Body] adding various combinators and adapters
\ No newline at end of file diff --git a/core/target/doc/http_body_util/limited/struct.LengthLimitError.html b/core/target/doc/http_body_util/limited/struct.LengthLimitError.html deleted file mode 100644 index edb65b5f..00000000 --- a/core/target/doc/http_body_util/limited/struct.LengthLimitError.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../http_body_util/struct.LengthLimitError.html...

- - - \ No newline at end of file diff --git a/core/target/doc/http_body_util/limited/struct.Limited.html b/core/target/doc/http_body_util/limited/struct.Limited.html deleted file mode 100644 index 67cb1216..00000000 --- a/core/target/doc/http_body_util/limited/struct.Limited.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../http_body_util/struct.Limited.html...

- - - \ No newline at end of file diff --git a/core/target/doc/http_body_util/sidebar-items.js b/core/target/doc/http_body_util/sidebar-items.js deleted file mode 100644 index d351bf48..00000000 --- a/core/target/doc/http_body_util/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"enum":["Either"],"mod":["combinators"],"struct":["BodyDataStream","BodyStream","Collected","Empty","Full","LengthLimitError","Limited","StreamBody"],"trait":["BodyExt"]}; \ No newline at end of file diff --git a/core/target/doc/http_body_util/stream/struct.BodyDataStream.html b/core/target/doc/http_body_util/stream/struct.BodyDataStream.html deleted file mode 100644 index cfec7ff6..00000000 --- a/core/target/doc/http_body_util/stream/struct.BodyDataStream.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../http_body_util/struct.BodyDataStream.html...

- - - \ No newline at end of file diff --git a/core/target/doc/http_body_util/stream/struct.BodyStream.html b/core/target/doc/http_body_util/stream/struct.BodyStream.html deleted file mode 100644 index b97d94d9..00000000 --- a/core/target/doc/http_body_util/stream/struct.BodyStream.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../http_body_util/struct.BodyStream.html...

- - - \ No newline at end of file diff --git a/core/target/doc/http_body_util/stream/struct.StreamBody.html b/core/target/doc/http_body_util/stream/struct.StreamBody.html deleted file mode 100644 index c9e1e5ef..00000000 --- a/core/target/doc/http_body_util/stream/struct.StreamBody.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../http_body_util/struct.StreamBody.html...

- - - \ No newline at end of file diff --git a/core/target/doc/http_body_util/struct.BodyDataStream.html b/core/target/doc/http_body_util/struct.BodyDataStream.html deleted file mode 100644 index a67c11ae..00000000 --- a/core/target/doc/http_body_util/struct.BodyDataStream.html +++ /dev/null @@ -1,31 +0,0 @@ -BodyDataStream in http_body_util - Rust

BodyDataStream

Struct BodyDataStream 

Source
pub struct BodyDataStream<B> { /* private fields */ }
Expand description

A data stream created from a [Body].

-

Implementations§

Source§

impl<B> BodyDataStream<B>

Source

pub fn new(body: B) -> Self

Create a new BodyDataStream

-

Trait Implementations§

Source§

impl<B: Clone> Clone for BodyDataStream<B>

Source§

fn clone(&self) -> BodyDataStream<B>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<B: Debug> Debug for BodyDataStream<B>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<B> Stream for BodyDataStream<B>
where - B: Body,

Source§

type Item = Result<<B as Body>::Data, <B as Body>::Error>

Values yielded by the stream.
Source§

fn poll_next( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Option<Self::Item>>

Attempt to pull out the next value of this stream, registering the -current task for wakeup if the value is not yet available, and returning -None if the stream is exhausted. Read more
§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the stream. Read more
Source§

impl<B: Copy> Copy for BodyDataStream<B>

Source§

impl<'__pin, B> Unpin for BodyDataStream<B>
where - PinnedFieldsOf<__Origin<'__pin, B>>: Unpin,

Auto Trait Implementations§

§

impl<B> Freeze for BodyDataStream<B>
where - B: Freeze,

§

impl<B> RefUnwindSafe for BodyDataStream<B>
where - B: RefUnwindSafe,

§

impl<B> Send for BodyDataStream<B>
where - B: Send,

§

impl<B> Sync for BodyDataStream<B>
where - B: Sync,

§

impl<B> UnwindSafe for BodyDataStream<B>
where - B: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<S, T, E> TryStream for S
where - S: Stream<Item = Result<T, E>> + ?Sized,

§

type Ok = T

The type of successful values yielded by this future
§

type Error = E

The type of failures yielded by this future
§

fn try_poll_next( - self: Pin<&mut S>, - cx: &mut Context<'_>, -) -> Poll<Option<Result<<S as TryStream>::Ok, <S as TryStream>::Error>>>

Poll this TryStream as if it were a Stream. Read more
\ No newline at end of file diff --git a/core/target/doc/http_body_util/struct.BodyStream.html b/core/target/doc/http_body_util/struct.BodyStream.html deleted file mode 100644 index 6bdb6cc4..00000000 --- a/core/target/doc/http_body_util/struct.BodyStream.html +++ /dev/null @@ -1,49 +0,0 @@ -BodyStream in http_body_util - Rust

BodyStream

Struct BodyStream 

Source
pub struct BodyStream<B> { /* private fields */ }
Expand description

A stream created from a [Body].

-

Implementations§

Source§

impl<B> BodyStream<B>

Source

pub fn new(body: B) -> Self

Create a new BodyStream.

-

Trait Implementations§

Source§

impl<B> Body for BodyStream<B>
where - B: Body,

Source§

type Data = <B as Body>::Data

Values yielded by the Body.
Source§

type Error = <B as Body>::Error

The error type this Body might generate.
Source§

fn poll_frame( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>>

Attempt to pull out the next data buffer of this stream.
§

fn is_end_stream(&self) -> bool

Returns true when the end of stream has been reached. Read more
§

fn size_hint(&self) -> SizeHint

Returns the bounds on the remaining length of the stream. Read more
Source§

impl<B: Clone> Clone for BodyStream<B>

Source§

fn clone(&self) -> BodyStream<B>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<B: Debug> Debug for BodyStream<B>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<B> Stream for BodyStream<B>
where - B: Body,

Source§

type Item = Result<Frame<<B as Body>::Data>, <B as Body>::Error>

Values yielded by the stream.
Source§

fn poll_next( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Option<Self::Item>>

Attempt to pull out the next value of this stream, registering the -current task for wakeup if the value is not yet available, and returning -None if the stream is exhausted. Read more
§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the stream. Read more
Source§

impl<B: Copy> Copy for BodyStream<B>

Source§

impl<'__pin, B> Unpin for BodyStream<B>
where - PinnedFieldsOf<__Origin<'__pin, B>>: Unpin,

Auto Trait Implementations§

§

impl<B> Freeze for BodyStream<B>
where - B: Freeze,

§

impl<B> RefUnwindSafe for BodyStream<B>
where - B: RefUnwindSafe,

§

impl<B> Send for BodyStream<B>
where - B: Send,

§

impl<B> Sync for BodyStream<B>
where - B: Sync,

§

impl<B> UnwindSafe for BodyStream<B>
where - B: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> BodyExt for T
where - T: Body + ?Sized,

Source§

fn frame(&mut self) -> Frame<'_, Self>
where - Self: Unpin,

Returns a future that resolves to the next Frame, if any.
Source§

fn map_frame<F, B>(self, f: F) -> MapFrame<Self, F>
where - Self: Sized, - F: FnMut(Frame<Self::Data>) -> Frame<B>, - B: Buf,

Maps this body’s frame to a different kind.
Source§

fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
where - Self: Sized, - F: FnMut(Self::Error) -> E,

Maps this body’s error value to a different value.
Source§

fn boxed(self) -> BoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + Sync + 'static,

Turn this body into a boxed trait object.
Source§

fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + 'static,

Turn this body into a boxed trait object that is !Sync.
Source§

fn collect(self) -> Collect<Self>
where - Self: Sized,

Turn this body into Collected body which will collect all the DATA frames -and trailers.
Source§

fn with_trailers<F>(self, trailers: F) -> WithTrailers<Self, F>
where - Self: Sized, - F: Future<Output = Option<Result<HeaderMap, Self::Error>>>,

Add trailers to the body. Read more
Source§

fn into_data_stream(self) -> BodyDataStream<Self>
where - Self: Sized,

Turn this body into BodyDataStream.
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<S, T, E> TryStream for S
where - S: Stream<Item = Result<T, E>> + ?Sized,

§

type Ok = T

The type of successful values yielded by this future
§

type Error = E

The type of failures yielded by this future
§

fn try_poll_next( - self: Pin<&mut S>, - cx: &mut Context<'_>, -) -> Poll<Option<Result<<S as TryStream>::Ok, <S as TryStream>::Error>>>

Poll this TryStream as if it were a Stream. Read more
\ No newline at end of file diff --git a/core/target/doc/http_body_util/struct.Collected.html b/core/target/doc/http_body_util/struct.Collected.html deleted file mode 100644 index 5fc9b07b..00000000 --- a/core/target/doc/http_body_util/struct.Collected.html +++ /dev/null @@ -1,38 +0,0 @@ -Collected in http_body_util - Rust

Collected

Struct Collected 

Source
pub struct Collected<B> { /* private fields */ }
Expand description

A collected body produced by BodyExt::collect which collects all the DATA frames -and trailers.

-

Implementations§

Source§

impl<B: Buf> Collected<B>

Source

pub fn trailers(&self) -> Option<&HeaderMap>

If there is a trailers frame buffered, returns a reference to it.

-

Returns None if the body contained no trailers.

-
Source

pub fn aggregate(self) -> impl Buf

Aggregate this buffered into a [Buf].

-
Source

pub fn to_bytes(self) -> Bytes

Convert this body into a [Bytes].

-

Trait Implementations§

Source§

impl<B: Buf> Body for Collected<B>

Source§

type Data = B

Values yielded by the Body.
Source§

type Error = Infallible

The error type this Body might generate.
Source§

fn poll_frame( - self: Pin<&mut Self>, - _: &mut Context<'_>, -) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>>

Attempt to pull out the next data buffer of this stream.
§

fn is_end_stream(&self) -> bool

Returns true when the end of stream has been reached. Read more
§

fn size_hint(&self) -> SizeHint

Returns the bounds on the remaining length of the stream. Read more
Source§

impl<B: Debug> Debug for Collected<B>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<B> Default for Collected<B>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<B> Unpin for Collected<B>

Auto Trait Implementations§

§

impl<B> Freeze for Collected<B>

§

impl<B> RefUnwindSafe for Collected<B>
where - B: RefUnwindSafe,

§

impl<B> Send for Collected<B>
where - B: Send,

§

impl<B> Sync for Collected<B>
where - B: Sync,

§

impl<B> UnwindSafe for Collected<B>
where - B: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> BodyExt for T
where - T: Body + ?Sized,

Source§

fn frame(&mut self) -> Frame<'_, Self>
where - Self: Unpin,

Returns a future that resolves to the next Frame, if any.
Source§

fn map_frame<F, B>(self, f: F) -> MapFrame<Self, F>
where - Self: Sized, - F: FnMut(Frame<Self::Data>) -> Frame<B>, - B: Buf,

Maps this body’s frame to a different kind.
Source§

fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
where - Self: Sized, - F: FnMut(Self::Error) -> E,

Maps this body’s error value to a different value.
Source§

fn boxed(self) -> BoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + Sync + 'static,

Turn this body into a boxed trait object.
Source§

fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + 'static,

Turn this body into a boxed trait object that is !Sync.
Source§

fn collect(self) -> Collect<Self>
where - Self: Sized,

Turn this body into Collected body which will collect all the DATA frames -and trailers.
Source§

fn with_trailers<F>(self, trailers: F) -> WithTrailers<Self, F>
where - Self: Sized, - F: Future<Output = Option<Result<HeaderMap, Self::Error>>>,

Add trailers to the body. Read more
Source§

fn into_data_stream(self) -> BodyDataStream<Self>
where - Self: Sized,

Turn this body into BodyDataStream.
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/core/target/doc/http_body_util/struct.Empty.html b/core/target/doc/http_body_util/struct.Empty.html deleted file mode 100644 index b9e4c1ef..00000000 --- a/core/target/doc/http_body_util/struct.Empty.html +++ /dev/null @@ -1,32 +0,0 @@ -Empty in http_body_util - Rust

Empty

Struct Empty 

Source
pub struct Empty<D> { /* private fields */ }
Expand description

A body that is always empty.

-

Implementations§

Source§

impl<D> Empty<D>

Source

pub const fn new() -> Self

Create a new Empty.

-

Trait Implementations§

Source§

impl<D: Buf> Body for Empty<D>

Source§

type Data = D

Values yielded by the Body.
Source§

type Error = Infallible

The error type this Body might generate.
Source§

fn poll_frame( - self: Pin<&mut Self>, - _cx: &mut Context<'_>, -) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>>

Attempt to pull out the next data buffer of this stream.
Source§

fn is_end_stream(&self) -> bool

Returns true when the end of stream has been reached. Read more
Source§

fn size_hint(&self) -> SizeHint

Returns the bounds on the remaining length of the stream. Read more
Source§

impl<D> Clone for Empty<D>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<D> Debug for Empty<D>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<D> Default for Empty<D>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<D> Copy for Empty<D>

Auto Trait Implementations§

§

impl<D> Freeze for Empty<D>

§

impl<D> RefUnwindSafe for Empty<D>

§

impl<D> Send for Empty<D>

§

impl<D> Sync for Empty<D>

§

impl<D> Unpin for Empty<D>

§

impl<D> UnwindSafe for Empty<D>

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> BodyExt for T
where - T: Body + ?Sized,

Source§

fn frame(&mut self) -> Frame<'_, Self>
where - Self: Unpin,

Returns a future that resolves to the next Frame, if any.
Source§

fn map_frame<F, B>(self, f: F) -> MapFrame<Self, F>
where - Self: Sized, - F: FnMut(Frame<Self::Data>) -> Frame<B>, - B: Buf,

Maps this body’s frame to a different kind.
Source§

fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
where - Self: Sized, - F: FnMut(Self::Error) -> E,

Maps this body’s error value to a different value.
Source§

fn boxed(self) -> BoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + Sync + 'static,

Turn this body into a boxed trait object.
Source§

fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + 'static,

Turn this body into a boxed trait object that is !Sync.
Source§

fn collect(self) -> Collect<Self>
where - Self: Sized,

Turn this body into Collected body which will collect all the DATA frames -and trailers.
Source§

fn with_trailers<F>(self, trailers: F) -> WithTrailers<Self, F>
where - Self: Sized, - F: Future<Output = Option<Result<HeaderMap, Self::Error>>>,

Add trailers to the body. Read more
Source§

fn into_data_stream(self) -> BodyDataStream<Self>
where - Self: Sized,

Turn this body into BodyDataStream.
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/core/target/doc/http_body_util/struct.Full.html b/core/target/doc/http_body_util/struct.Full.html deleted file mode 100644 index 59b8c33d..00000000 --- a/core/target/doc/http_body_util/struct.Full.html +++ /dev/null @@ -1,49 +0,0 @@ -Full in http_body_util - Rust

Full

Struct Full 

Source
pub struct Full<D> { /* private fields */ }
Expand description

A body that consists of a single chunk.

-

Implementations§

Source§

impl<D> Full<D>
where - D: Buf,

Source

pub fn new(data: D) -> Self

Create a new Full.

-

Trait Implementations§

Source§

impl<D> Body for Full<D>
where - D: Buf,

Source§

type Data = D

Values yielded by the Body.
Source§

type Error = Infallible

The error type this Body might generate.
Source§

fn poll_frame( - self: Pin<&mut Self>, - _cx: &mut Context<'_>, -) -> Poll<Option<Result<Frame<D>, Self::Error>>>

Attempt to pull out the next data buffer of this stream.
Source§

fn is_end_stream(&self) -> bool

Returns true when the end of stream has been reached. Read more
Source§

fn size_hint(&self) -> SizeHint

Returns the bounds on the remaining length of the stream. Read more
Source§

impl<D: Clone> Clone for Full<D>

Source§

fn clone(&self) -> Full<D>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<D: Debug> Debug for Full<D>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<D> Default for Full<D>
where - D: Buf,

Source§

fn default() -> Self

Create an empty Full.

-
Source§

impl<D> From<&'static [u8]> for Full<D>
where - D: Buf + From<&'static [u8]>,

Source§

fn from(slice: &'static [u8]) -> Self

Converts to this type from the input type.
Source§

impl<D> From<&'static str> for Full<D>
where - D: Buf + From<&'static str>,

Source§

fn from(slice: &'static str) -> Self

Converts to this type from the input type.
Source§

impl<D> From<Bytes> for Full<D>
where - D: Buf + From<Bytes>,

Source§

fn from(bytes: Bytes) -> Self

Converts to this type from the input type.
Source§

impl<D, B> From<Cow<'static, B>> for Full<D>
where - D: Buf + From<&'static B> + From<B::Owned>, - B: ToOwned + ?Sized,

Source§

fn from(cow: Cow<'static, B>) -> Self

Converts to this type from the input type.
Source§

impl<D> From<String> for Full<D>
where - D: Buf + From<String>,

Source§

fn from(s: String) -> Self

Converts to this type from the input type.
Source§

impl<D> From<Vec<u8>> for Full<D>
where - D: Buf + From<Vec<u8>>,

Source§

fn from(vec: Vec<u8>) -> Self

Converts to this type from the input type.
Source§

impl<D: Copy> Copy for Full<D>

Source§

impl<'__pin, D> Unpin for Full<D>
where - PinnedFieldsOf<__Origin<'__pin, D>>: Unpin,

Auto Trait Implementations§

§

impl<D> Freeze for Full<D>
where - D: Freeze,

§

impl<D> RefUnwindSafe for Full<D>
where - D: RefUnwindSafe,

§

impl<D> Send for Full<D>
where - D: Send,

§

impl<D> Sync for Full<D>
where - D: Sync,

§

impl<D> UnwindSafe for Full<D>
where - D: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> BodyExt for T
where - T: Body + ?Sized,

Source§

fn frame(&mut self) -> Frame<'_, Self>
where - Self: Unpin,

Returns a future that resolves to the next Frame, if any.
Source§

fn map_frame<F, B>(self, f: F) -> MapFrame<Self, F>
where - Self: Sized, - F: FnMut(Frame<Self::Data>) -> Frame<B>, - B: Buf,

Maps this body’s frame to a different kind.
Source§

fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
where - Self: Sized, - F: FnMut(Self::Error) -> E,

Maps this body’s error value to a different value.
Source§

fn boxed(self) -> BoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + Sync + 'static,

Turn this body into a boxed trait object.
Source§

fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + 'static,

Turn this body into a boxed trait object that is !Sync.
Source§

fn collect(self) -> Collect<Self>
where - Self: Sized,

Turn this body into Collected body which will collect all the DATA frames -and trailers.
Source§

fn with_trailers<F>(self, trailers: F) -> WithTrailers<Self, F>
where - Self: Sized, - F: Future<Output = Option<Result<HeaderMap, Self::Error>>>,

Add trailers to the body. Read more
Source§

fn into_data_stream(self) -> BodyDataStream<Self>
where - Self: Sized,

Turn this body into BodyDataStream.
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/core/target/doc/http_body_util/struct.LengthLimitError.html b/core/target/doc/http_body_util/struct.LengthLimitError.html deleted file mode 100644 index fdb263ae..00000000 --- a/core/target/doc/http_body_util/struct.LengthLimitError.html +++ /dev/null @@ -1,13 +0,0 @@ -LengthLimitError in http_body_util - Rust

LengthLimitError

Struct LengthLimitError 

Source
#[non_exhaustive]
pub struct LengthLimitError;
Expand description

An error returned when body length exceeds the configured limit.

-

Trait Implementations§

Source§

impl Debug for LengthLimitError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for LengthLimitError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for LengthLimitError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToString for T
where - T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/core/target/doc/http_body_util/struct.Limited.html b/core/target/doc/http_body_util/struct.Limited.html deleted file mode 100644 index b1b949f7..00000000 --- a/core/target/doc/http_body_util/struct.Limited.html +++ /dev/null @@ -1,42 +0,0 @@ -Limited in http_body_util - Rust

Limited

Struct Limited 

Source
pub struct Limited<B> { /* private fields */ }
Expand description

A length limited body.

-

This body will return an error if more than the configured number -of bytes are returned on polling the wrapped body.

-

Implementations§

Source§

impl<B> Limited<B>

Source

pub fn new(inner: B, limit: usize) -> Self

Create a new Limited.

-

Trait Implementations§

Source§

impl<B> Body for Limited<B>
where - B: Body, - B::Error: Into<Box<dyn Error + Send + Sync>>,

Source§

type Data = <B as Body>::Data

Values yielded by the Body.
Source§

type Error = Box<dyn Error + Sync + Send>

The error type this Body might generate.
Source§

fn poll_frame( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>>

Attempt to pull out the next data buffer of this stream.
Source§

fn is_end_stream(&self) -> bool

Returns true when the end of stream has been reached. Read more
Source§

fn size_hint(&self) -> SizeHint

Returns the bounds on the remaining length of the stream. Read more
Source§

impl<B: Clone> Clone for Limited<B>

Source§

fn clone(&self) -> Limited<B>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<B: Debug> Debug for Limited<B>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<B: Copy> Copy for Limited<B>

Source§

impl<'__pin, B> Unpin for Limited<B>
where - PinnedFieldsOf<__Origin<'__pin, B>>: Unpin,

Auto Trait Implementations§

§

impl<B> Freeze for Limited<B>
where - B: Freeze,

§

impl<B> RefUnwindSafe for Limited<B>
where - B: RefUnwindSafe,

§

impl<B> Send for Limited<B>
where - B: Send,

§

impl<B> Sync for Limited<B>
where - B: Sync,

§

impl<B> UnwindSafe for Limited<B>
where - B: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> BodyExt for T
where - T: Body + ?Sized,

Source§

fn frame(&mut self) -> Frame<'_, Self>
where - Self: Unpin,

Returns a future that resolves to the next Frame, if any.
Source§

fn map_frame<F, B>(self, f: F) -> MapFrame<Self, F>
where - Self: Sized, - F: FnMut(Frame<Self::Data>) -> Frame<B>, - B: Buf,

Maps this body’s frame to a different kind.
Source§

fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
where - Self: Sized, - F: FnMut(Self::Error) -> E,

Maps this body’s error value to a different value.
Source§

fn boxed(self) -> BoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + Sync + 'static,

Turn this body into a boxed trait object.
Source§

fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + 'static,

Turn this body into a boxed trait object that is !Sync.
Source§

fn collect(self) -> Collect<Self>
where - Self: Sized,

Turn this body into Collected body which will collect all the DATA frames -and trailers.
Source§

fn with_trailers<F>(self, trailers: F) -> WithTrailers<Self, F>
where - Self: Sized, - F: Future<Output = Option<Result<HeaderMap, Self::Error>>>,

Add trailers to the body. Read more
Source§

fn into_data_stream(self) -> BodyDataStream<Self>
where - Self: Sized,

Turn this body into BodyDataStream.
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/core/target/doc/http_body_util/struct.StreamBody.html b/core/target/doc/http_body_util/struct.StreamBody.html deleted file mode 100644 index ae10cfef..00000000 --- a/core/target/doc/http_body_util/struct.StreamBody.html +++ /dev/null @@ -1,49 +0,0 @@ -StreamBody in http_body_util - Rust

StreamBody

Struct StreamBody 

Source
pub struct StreamBody<S> { /* private fields */ }
Expand description

A body created from a [Stream].

-

Implementations§

Source§

impl<S> StreamBody<S>

Source

pub fn new(stream: S) -> Self

Create a new StreamBody.

-

Trait Implementations§

Source§

impl<S, D, E> Body for StreamBody<S>
where - S: Stream<Item = Result<Frame<D>, E>>, - D: Buf,

Source§

type Data = D

Values yielded by the Body.
Source§

type Error = E

The error type this Body might generate.
Source§

fn poll_frame( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>>

Attempt to pull out the next data buffer of this stream.
§

fn is_end_stream(&self) -> bool

Returns true when the end of stream has been reached. Read more
§

fn size_hint(&self) -> SizeHint

Returns the bounds on the remaining length of the stream. Read more
Source§

impl<S: Clone> Clone for StreamBody<S>

Source§

fn clone(&self) -> StreamBody<S>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<S: Debug> Debug for StreamBody<S>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<S: Stream> Stream for StreamBody<S>

Source§

type Item = <S as Stream>::Item

Values yielded by the stream.
Source§

fn poll_next( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Option<Self::Item>>

Attempt to pull out the next value of this stream, registering the -current task for wakeup if the value is not yet available, and returning -None if the stream is exhausted. Read more
Source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the stream. Read more
Source§

impl<S: Copy> Copy for StreamBody<S>

Source§

impl<'__pin, S> Unpin for StreamBody<S>
where - PinnedFieldsOf<__Origin<'__pin, S>>: Unpin,

Auto Trait Implementations§

§

impl<S> Freeze for StreamBody<S>
where - S: Freeze,

§

impl<S> RefUnwindSafe for StreamBody<S>
where - S: RefUnwindSafe,

§

impl<S> Send for StreamBody<S>
where - S: Send,

§

impl<S> Sync for StreamBody<S>
where - S: Sync,

§

impl<S> UnwindSafe for StreamBody<S>
where - S: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> BodyExt for T
where - T: Body + ?Sized,

Source§

fn frame(&mut self) -> Frame<'_, Self>
where - Self: Unpin,

Returns a future that resolves to the next Frame, if any.
Source§

fn map_frame<F, B>(self, f: F) -> MapFrame<Self, F>
where - Self: Sized, - F: FnMut(Frame<Self::Data>) -> Frame<B>, - B: Buf,

Maps this body’s frame to a different kind.
Source§

fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
where - Self: Sized, - F: FnMut(Self::Error) -> E,

Maps this body’s error value to a different value.
Source§

fn boxed(self) -> BoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + Sync + 'static,

Turn this body into a boxed trait object.
Source§

fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + 'static,

Turn this body into a boxed trait object that is !Sync.
Source§

fn collect(self) -> Collect<Self>
where - Self: Sized,

Turn this body into Collected body which will collect all the DATA frames -and trailers.
Source§

fn with_trailers<F>(self, trailers: F) -> WithTrailers<Self, F>
where - Self: Sized, - F: Future<Output = Option<Result<HeaderMap, Self::Error>>>,

Add trailers to the body. Read more
Source§

fn into_data_stream(self) -> BodyDataStream<Self>
where - Self: Sized,

Turn this body into BodyDataStream.
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<S, T, E> TryStream for S
where - S: Stream<Item = Result<T, E>> + ?Sized,

§

type Ok = T

The type of successful values yielded by this future
§

type Error = E

The type of failures yielded by this future
§

fn try_poll_next( - self: Pin<&mut S>, - cx: &mut Context<'_>, -) -> Poll<Option<Result<<S as TryStream>::Ok, <S as TryStream>::Error>>>

Poll this TryStream as if it were a Stream. Read more
\ No newline at end of file diff --git a/core/target/doc/http_body_util/trait.BodyExt.html b/core/target/doc/http_body_util/trait.BodyExt.html deleted file mode 100644 index ada5cef9..00000000 --- a/core/target/doc/http_body_util/trait.BodyExt.html +++ /dev/null @@ -1,72 +0,0 @@ -BodyExt in http_body_util - Rust

BodyExt

Trait BodyExt 

Source
pub trait BodyExt: Body {
-    // Provided methods
-    fn frame(&mut self) -> Frame<'_, Self> 
-       where Self: Unpin { ... }
-    fn map_frame<F, B>(self, f: F) -> MapFrame<Self, F>
-       where Self: Sized,
-             F: FnMut(Frame<Self::Data>) -> Frame<B>,
-             B: Buf { ... }
-    fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
-       where Self: Sized,
-             F: FnMut(Self::Error) -> E { ... }
-    fn boxed(self) -> BoxBody<Self::Data, Self::Error>
-       where Self: Sized + Send + Sync + 'static { ... }
-    fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
-       where Self: Sized + Send + 'static { ... }
-    fn collect(self) -> Collect<Self> 
-       where Self: Sized { ... }
-    fn with_trailers<F>(self, trailers: F) -> WithTrailers<Self, F>
-       where Self: Sized,
-             F: Future<Output = Option<Result<HeaderMap, Self::Error>>> { ... }
-    fn into_data_stream(self) -> BodyDataStream<Self>
-       where Self: Sized { ... }
-}
Expand description

An extension trait for [http_body::Body] adding various combinators and adapters

-

Provided Methods§

Source

fn frame(&mut self) -> Frame<'_, Self>
where - Self: Unpin,

Returns a future that resolves to the next Frame, if any.

-
Source

fn map_frame<F, B>(self, f: F) -> MapFrame<Self, F>
where - Self: Sized, - F: FnMut(Frame<Self::Data>) -> Frame<B>, - B: Buf,

Maps this body’s frame to a different kind.

-
Source

fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
where - Self: Sized, - F: FnMut(Self::Error) -> E,

Maps this body’s error value to a different value.

-
Source

fn boxed(self) -> BoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + Sync + 'static,

Turn this body into a boxed trait object.

-
Source

fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
where - Self: Sized + Send + 'static,

Turn this body into a boxed trait object that is !Sync.

-
Source

fn collect(self) -> Collect<Self>
where - Self: Sized,

Turn this body into Collected body which will collect all the DATA frames -and trailers.

-
Source

fn with_trailers<F>(self, trailers: F) -> WithTrailers<Self, F>
where - Self: Sized, - F: Future<Output = Option<Result<HeaderMap, Self::Error>>>,

Add trailers to the body.

-

The trailers will be sent when all previous frames have been sent and the trailers future -resolves.

-
§Example
-
use http::HeaderMap;
-use http_body_util::{Full, BodyExt};
-use bytes::Bytes;
-
-async fn main() {
-let (tx, rx) = tokio::sync::oneshot::channel::<HeaderMap>();
-
-let body = Full::<Bytes>::from("Hello, World!")
-    // add trailers via a future
-    .with_trailers(async move {
-        match rx.await {
-            Ok(trailers) => Some(Ok(trailers)),
-            Err(_err) => None,
-        }
-    });
-
-// compute the trailers in the background
-tokio::spawn(async move {
-    let _ = tx.send(compute_trailers().await);
-});
-
-async fn compute_trailers() -> HeaderMap {
-    // ...
-}
Source

fn into_data_stream(self) -> BodyDataStream<Self>
where - Self: Sized,

Turn this body into BodyDataStream.

-

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> BodyExt for T
where - T: Body + ?Sized,

\ No newline at end of file diff --git a/core/target/doc/hyper_util/all.html b/core/target/doc/hyper_util/all.html deleted file mode 100644 index ae9e7433..00000000 --- a/core/target/doc/hyper_util/all.html +++ /dev/null @@ -1 +0,0 @@ -List of all items in this crate

All

List of all items

Structs

Traits

Functions

\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/index.html b/core/target/doc/hyper_util/client/index.html deleted file mode 100644 index 71e47b48..00000000 --- a/core/target/doc/hyper_util/client/index.html +++ /dev/null @@ -1,2 +0,0 @@ -hyper_util::client - Rust

Module client

Module client 

Source
Expand description

HTTP client utilities

-

Modules§

legacy
Legacy implementations of connect module and Client
pool
Composable pool services
proxy
Proxy utilities
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/client/struct.Builder.html b/core/target/doc/hyper_util/client/legacy/client/struct.Builder.html deleted file mode 100644 index e656f49b..00000000 --- a/core/target/doc/hyper_util/client/legacy/client/struct.Builder.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../../../hyper_util/client/legacy/struct.Builder.html...

- - - \ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/client/struct.Client.html b/core/target/doc/hyper_util/client/legacy/client/struct.Client.html deleted file mode 100644 index f3ad6cfb..00000000 --- a/core/target/doc/hyper_util/client/legacy/client/struct.Client.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../../../hyper_util/client/legacy/struct.Client.html...

- - - \ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/client/struct.Error.html b/core/target/doc/hyper_util/client/legacy/client/struct.Error.html deleted file mode 100644 index a9f8d490..00000000 --- a/core/target/doc/hyper_util/client/legacy/client/struct.Error.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../../../hyper_util/client/legacy/struct.Error.html...

- - - \ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/client/struct.ResponseFuture.html b/core/target/doc/hyper_util/client/legacy/client/struct.ResponseFuture.html deleted file mode 100644 index 8203bf18..00000000 --- a/core/target/doc/hyper_util/client/legacy/client/struct.ResponseFuture.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../../../hyper_util/client/legacy/struct.ResponseFuture.html...

- - - \ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/capture/fn.capture_connection.html b/core/target/doc/hyper_util/client/legacy/connect/capture/fn.capture_connection.html deleted file mode 100644 index d4d68d20..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/capture/fn.capture_connection.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../../../../hyper_util/client/legacy/connect/fn.capture_connection.html...

- - - \ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/capture/struct.CaptureConnection.html b/core/target/doc/hyper_util/client/legacy/connect/capture/struct.CaptureConnection.html deleted file mode 100644 index c27cf664..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/capture/struct.CaptureConnection.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../../../../hyper_util/client/legacy/connect/struct.CaptureConnection.html...

- - - \ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/dns/index.html b/core/target/doc/hyper_util/client/legacy/connect/dns/index.html deleted file mode 100644 index 06885a20..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/dns/index.html +++ /dev/null @@ -1,17 +0,0 @@ -hyper_util::client::legacy::connect::dns - Rust

Module dns

Module dns 

Source
Expand description

DNS Resolution used by the HttpConnector.

-

This module contains:

-
    -
  • A GaiResolver that is the default resolver for the HttpConnector.
  • -
  • The Name type used as an argument to custom resolvers.
  • -
-

§Resolvers are Services

-

A resolver is just a -Service<Name, Response = impl Iterator<Item = SocketAddr>>.

-

A simple resolver that ignores the name and always returns a specific -address:

- -
use std::{convert::Infallible, iter, net::SocketAddr};
-
-let resolver = tower::service_fn(|_name| async {
-    Ok::<_, Infallible>(iter::once(SocketAddr::from(([127, 0, 0, 1], 8080))))
-});

Structs§

GaiAddrs
An iterator of IP addresses returned from getaddrinfo.
GaiFuture
A future to resolve a name returned by GaiResolver.
GaiResolver
A resolver using blocking getaddrinfo calls in a threadpool.
InvalidNameError
Error indicating a given string was not a valid domain name.
Name
A domain name to resolve into IP addresses.
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/dns/sidebar-items.js b/core/target/doc/hyper_util/client/legacy/connect/dns/sidebar-items.js deleted file mode 100644 index 5e6b7d29..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/dns/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"struct":["GaiAddrs","GaiFuture","GaiResolver","InvalidNameError","Name"]}; \ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/dns/struct.GaiAddrs.html b/core/target/doc/hyper_util/client/legacy/connect/dns/struct.GaiAddrs.html deleted file mode 100644 index 36ab00d6..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/dns/struct.GaiAddrs.html +++ /dev/null @@ -1,215 +0,0 @@ -GaiAddrs in hyper_util::client::legacy::connect::dns - Rust

GaiAddrs

Struct GaiAddrs 

Source
pub struct GaiAddrs { /* private fields */ }
Expand description

An iterator of IP addresses returned from getaddrinfo.

-

Trait Implementations§

Source§

impl Debug for GaiAddrs

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Iterator for GaiAddrs

Source§

type Item = SocketAddr

The type of the elements being iterated over.
Source§

fn next(&mut self) -> Option<Self::Item>

Advances the iterator and returns the next value. Read more
Source§

fn next_chunk<const N: usize>( - &mut self, -) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>
where - Self: Sized,

🔬This is a nightly-only experimental API. (iter_next_chunk)
Advances the iterator and returns an array containing the next N values. Read more
1.0.0 · Source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
1.0.0 · Source§

fn count(self) -> usize
where - Self: Sized,

Consumes the iterator, counting the number of iterations and returning it. Read more
1.0.0 · Source§

fn last(self) -> Option<Self::Item>
where - Self: Sized,

Consumes the iterator, returning the last element. Read more
Source§

fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator by n elements. Read more
1.0.0 · Source§

fn nth(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element of the iterator. Read more
1.28.0 · Source§

fn step_by(self, step: usize) -> StepBy<Self>
where - Self: Sized,

Creates an iterator starting at the same point, but stepping by -the given amount at each iteration. Read more
1.0.0 · Source§

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
where - Self: Sized, - U: IntoIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both in sequence. Read more
1.0.0 · Source§

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>
where - Self: Sized, - U: IntoIterator,

‘Zips up’ two iterators into a single iterator of pairs. Read more
Source§

fn intersperse(self, separator: Self::Item) -> Intersperse<Self>
where - Self: Sized, - Self::Item: Clone,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places a copy of separator between adjacent -items of the original iterator. Read more
Source§

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
where - Self: Sized, - G: FnMut() -> Self::Item,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places an item generated by separator -between adjacent items of the original iterator. Read more
1.0.0 · Source§

fn map<B, F>(self, f: F) -> Map<Self, F>
where - Self: Sized, - F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each -element. Read more
1.21.0 · Source§

fn for_each<F>(self, f: F)
where - Self: Sized, - F: FnMut(Self::Item),

Calls a closure on each element of an iterator. Read more
1.0.0 · Source§

fn filter<P>(self, predicate: P) -> Filter<Self, P>
where - Self: Sized, - P: FnMut(&Self::Item) -> bool,

Creates an iterator which uses a closure to determine if an element -should be yielded. Read more
1.0.0 · Source§

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
where - Self: Sized, - F: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both filters and maps. Read more
1.0.0 · Source§

fn enumerate(self) -> Enumerate<Self>
where - Self: Sized,

Creates an iterator which gives the current iteration count as well as -the next value. Read more
1.0.0 · Source§

fn peekable(self) -> Peekable<Self>
where - Self: Sized,

Creates an iterator which can use the peek and peek_mut methods -to look at the next element of the iterator without consuming it. See -their documentation for more information. Read more
1.0.0 · Source§

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
where - Self: Sized, - P: FnMut(&Self::Item) -> bool,

Creates an iterator that skips elements based on a predicate. Read more
1.0.0 · Source§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
where - Self: Sized, - P: FnMut(&Self::Item) -> bool,

Creates an iterator that yields elements based on a predicate. Read more
1.57.0 · Source§

fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
where - Self: Sized, - P: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both yields elements based on a predicate and maps. Read more
1.0.0 · Source§

fn skip(self, n: usize) -> Skip<Self>
where - Self: Sized,

Creates an iterator that skips the first n elements. Read more
1.0.0 · Source§

fn take(self, n: usize) -> Take<Self>
where - Self: Sized,

Creates an iterator that yields the first n elements, or fewer -if the underlying iterator ends sooner. Read more
1.0.0 · Source§

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
where - Self: Sized, - F: FnMut(&mut St, Self::Item) -> Option<B>,

An iterator adapter which, like fold, holds internal state, but -unlike fold, produces a new iterator. Read more
1.0.0 · Source§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
where - Self: Sized, - U: IntoIterator, - F: FnMut(Self::Item) -> U,

Creates an iterator that works like map, but flattens nested structure. Read more
1.29.0 · Source§

fn flatten(self) -> Flatten<Self>
where - Self: Sized, - Self::Item: IntoIterator,

Creates an iterator that flattens nested structure. Read more
Source§

fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
where - Self: Sized, - F: FnMut(&[Self::Item; N]) -> R,

🔬This is a nightly-only experimental API. (iter_map_windows)
Calls the given function f for each contiguous window of size N over -self and returns an iterator over the outputs of f. Like slice::windows(), -the windows during mapping overlap as well. Read more
1.0.0 · Source§

fn fuse(self) -> Fuse<Self>
where - Self: Sized,

Creates an iterator which ends after the first None. Read more
1.0.0 · Source§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where - Self: Sized, - F: FnMut(&Self::Item),

Does something with each element of an iterator, passing the value on. Read more
1.0.0 · Source§

fn by_ref(&mut self) -> &mut Self
where - Self: Sized,

Creates a “by reference” adapter for this instance of Iterator. Read more
1.0.0 · Source§

fn collect<B>(self) -> B
where - B: FromIterator<Self::Item>, - Self: Sized,

Transforms an iterator into a collection. Read more
Source§

fn try_collect<B>( - &mut self, -) -> <<Self::Item as Try>::Residual as Residual<B>>::TryType
where - Self: Sized, - Self::Item: Try, - <Self::Item as Try>::Residual: Residual<B>, - B: FromIterator<<Self::Item as Try>::Output>,

🔬This is a nightly-only experimental API. (iterator_try_collect)
Fallibly transforms an iterator into a collection, short circuiting if -a failure is encountered. Read more
Source§

fn collect_into<E>(self, collection: &mut E) -> &mut E
where - E: Extend<Self::Item>, - Self: Sized,

🔬This is a nightly-only experimental API. (iter_collect_into)
Collects all the items from an iterator into a collection. Read more
1.0.0 · Source§

fn partition<B, F>(self, f: F) -> (B, B)
where - Self: Sized, - B: Default + Extend<Self::Item>, - F: FnMut(&Self::Item) -> bool,

Consumes an iterator, creating two collections from it. Read more
Source§

fn is_partitioned<P>(self, predicate: P) -> bool
where - Self: Sized, - P: FnMut(Self::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_is_partitioned)
Checks if the elements of this iterator are partitioned according to the given predicate, -such that all those that return true precede all those that return false. Read more
1.27.0 · Source§

fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
where - Self: Sized, - F: FnMut(B, Self::Item) -> R, - R: Try<Output = B>,

An iterator method that applies a function as long as it returns -successfully, producing a single, final value. Read more
1.27.0 · Source§

fn try_for_each<F, R>(&mut self, f: F) -> R
where - Self: Sized, - F: FnMut(Self::Item) -> R, - R: Try<Output = ()>,

An iterator method that applies a fallible function to each item in the -iterator, stopping at the first error and returning that error. Read more
1.0.0 · Source§

fn fold<B, F>(self, init: B, f: F) -> B
where - Self: Sized, - F: FnMut(B, Self::Item) -> B,

Folds every element into an accumulator by applying an operation, -returning the final result. Read more
1.51.0 · Source§

fn reduce<F>(self, f: F) -> Option<Self::Item>
where - Self: Sized, - F: FnMut(Self::Item, Self::Item) -> Self::Item,

Reduces the elements to a single one, by repeatedly applying a reducing -operation. Read more
Source§

fn try_reduce<R>( - &mut self, - f: impl FnMut(Self::Item, Self::Item) -> R, -) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
where - Self: Sized, - R: Try<Output = Self::Item>, - <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (iterator_try_reduce)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the -closure returns a failure, the failure is propagated back to the caller immediately. Read more
1.0.0 · Source§

fn all<F>(&mut self, f: F) -> bool
where - Self: Sized, - F: FnMut(Self::Item) -> bool,

Tests if every element of the iterator matches a predicate. Read more
1.0.0 · Source§

fn any<F>(&mut self, f: F) -> bool
where - Self: Sized, - F: FnMut(Self::Item) -> bool,

Tests if any element of the iterator matches a predicate. Read more
1.0.0 · Source§

fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
where - Self: Sized, - P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator that satisfies a predicate. Read more
1.30.0 · Source§

fn find_map<B, F>(&mut self, f: F) -> Option<B>
where - Self: Sized, - F: FnMut(Self::Item) -> Option<B>,

Applies function to the elements of iterator and returns -the first non-none result. Read more
Source§

fn try_find<R>( - &mut self, - f: impl FnMut(&Self::Item) -> R, -) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
where - Self: Sized, - R: Try<Output = bool>, - <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (try_find)
Applies function to the elements of iterator and returns -the first true result or the first error. Read more
1.0.0 · Source§

fn position<P>(&mut self, predicate: P) -> Option<usize>
where - Self: Sized, - P: FnMut(Self::Item) -> bool,

Searches for an element in an iterator, returning its index. Read more
1.0.0 · Source§

fn max(self) -> Option<Self::Item>
where - Self: Sized, - Self::Item: Ord,

Returns the maximum element of an iterator. Read more
1.0.0 · Source§

fn min(self) -> Option<Self::Item>
where - Self: Sized, - Self::Item: Ord,

Returns the minimum element of an iterator. Read more
1.6.0 · Source§

fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
where - B: Ord, - Self: Sized, - F: FnMut(&Self::Item) -> B,

Returns the element that gives the maximum value from the -specified function. Read more
1.15.0 · Source§

fn max_by<F>(self, compare: F) -> Option<Self::Item>
where - Self: Sized, - F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the maximum value with respect to the -specified comparison function. Read more
1.6.0 · Source§

fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
where - B: Ord, - Self: Sized, - F: FnMut(&Self::Item) -> B,

Returns the element that gives the minimum value from the -specified function. Read more
1.15.0 · Source§

fn min_by<F>(self, compare: F) -> Option<Self::Item>
where - Self: Sized, - F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the minimum value with respect to the -specified comparison function. Read more
1.0.0 · Source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where - FromA: Default + Extend<A>, - FromB: Default + Extend<B>, - Self: Sized + Iterator<Item = (A, B)>,

Converts an iterator of pairs into a pair of containers. Read more
1.36.0 · Source§

fn copied<'a, T>(self) -> Copied<Self>
where - T: Copy + 'a, - Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which copies all of its elements. Read more
1.0.0 · Source§

fn cloned<'a, T>(self) -> Cloned<Self>
where - T: Clone + 'a, - Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which clones all of its elements. Read more
Source§

fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>
where - Self: Sized,

🔬This is a nightly-only experimental API. (iter_array_chunks)
Returns an iterator over N elements of the iterator at a time. Read more
1.11.0 · Source§

fn sum<S>(self) -> S
where - Self: Sized, - S: Sum<Self::Item>,

Sums the elements of an iterator. Read more
1.11.0 · Source§

fn product<P>(self) -> P
where - Self: Sized, - P: Product<Self::Item>,

Iterates over the entire iterator, multiplying all the elements Read more
1.5.0 · Source§

fn cmp<I>(self, other: I) -> Ordering
where - I: IntoIterator<Item = Self::Item>, - Self::Item: Ord, - Self: Sized,

Lexicographically compares the elements of this Iterator with those -of another. Read more
Source§

fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
where - Self: Sized, - I: IntoIterator, - F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those -of another with respect to the specified comparison function. Read more
1.5.0 · Source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>
where - I: IntoIterator, - Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Lexicographically compares the PartialOrd elements of -this Iterator with those of another. The comparison works like short-circuit -evaluation, returning a result without comparing the remaining elements. -As soon as an order can be determined, the evaluation stops and a result is returned. Read more
Source§

fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
where - Self: Sized, - I: IntoIterator, - F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those -of another with respect to the specified comparison function. Read more
1.5.0 · Source§

fn eq<I>(self, other: I) -> bool
where - I: IntoIterator, - Self::Item: PartialEq<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are equal to those of -another. Read more
Source§

fn eq_by<I, F>(self, other: I, eq: F) -> bool
where - Self: Sized, - I: IntoIterator, - F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_order_by)
Determines if the elements of this Iterator are equal to those of -another with respect to the specified equality function. Read more
1.5.0 · Source§

fn ne<I>(self, other: I) -> bool
where - I: IntoIterator, - Self::Item: PartialEq<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are not equal to those of -another. Read more
1.5.0 · Source§

fn lt<I>(self, other: I) -> bool
where - I: IntoIterator, - Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are lexicographically -less than those of another. Read more
1.5.0 · Source§

fn le<I>(self, other: I) -> bool
where - I: IntoIterator, - Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are lexicographically -less or equal to those of another. Read more
1.5.0 · Source§

fn gt<I>(self, other: I) -> bool
where - I: IntoIterator, - Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are lexicographically -greater than those of another. Read more
1.5.0 · Source§

fn ge<I>(self, other: I) -> bool
where - I: IntoIterator, - Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are lexicographically -greater than or equal to those of another. Read more
1.82.0 · Source§

fn is_sorted(self) -> bool
where - Self: Sized, - Self::Item: PartialOrd,

Checks if the elements of this iterator are sorted. Read more
1.82.0 · Source§

fn is_sorted_by<F>(self, compare: F) -> bool
where - Self: Sized, - F: FnMut(&Self::Item, &Self::Item) -> bool,

Checks if the elements of this iterator are sorted using the given comparator function. Read more
1.82.0 · Source§

fn is_sorted_by_key<F, K>(self, f: F) -> bool
where - Self: Sized, - F: FnMut(Self::Item) -> K, - K: PartialOrd,

Checks if the elements of this iterator are sorted using the given key extraction -function. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<I> IntoIterator for I
where - I: Iterator,

Source§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
Source§

type IntoIter = I

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/dns/struct.GaiFuture.html b/core/target/doc/hyper_util/client/legacy/connect/dns/struct.GaiFuture.html deleted file mode 100644 index 0d9f532c..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/dns/struct.GaiFuture.html +++ /dev/null @@ -1,124 +0,0 @@ -GaiFuture in hyper_util::client::legacy::connect::dns - Rust

GaiFuture

Struct GaiFuture 

Source
pub struct GaiFuture { /* private fields */ }
Expand description

A future to resolve a name returned by GaiResolver.

-

Trait Implementations§

Source§

impl Debug for GaiFuture

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for GaiFuture

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Future for GaiFuture

Source§

type Output = Result<GaiAddrs, Error>

The type of value produced on completion.
Source§

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>

Attempts to resolve the future to a final value, registering -the current task for wakeup if the value is not yet available. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> FutureExt for T
where - T: Future + ?Sized,

§

fn map<U, F>(self, f: F) -> Map<Self, F>
where - F: FnOnce(Self::Output) -> U, - Self: Sized,

Map this future’s output to a different type, returning a new future of -the resulting type. Read more
§

fn map_into<U>(self) -> MapInto<Self, U>
where - Self::Output: Into<U>, - Self: Sized,

Map this future’s output to a different type, returning a new future of -the resulting type. Read more
§

fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
where - F: FnOnce(Self::Output) -> Fut, - Fut: Future, - Self: Sized,

Chain on a computation for when a future finished, passing the result of -the future to the provided closure f. Read more
§

fn left_future<B>(self) -> Either<Self, B>
where - B: Future<Output = Self::Output>, - Self: Sized,

Wrap this future in an Either future, making it the left-hand variant -of that Either. Read more
§

fn right_future<A>(self) -> Either<A, Self>
where - A: Future<Output = Self::Output>, - Self: Sized,

Wrap this future in an Either future, making it the right-hand variant -of that Either. Read more
§

fn into_stream(self) -> IntoStream<Self>
where - Self: Sized,

Convert this future into a single element stream. Read more
§

fn flatten(self) -> Flatten<Self>
where - Self::Output: Future, - Self: Sized,

Flatten the execution of this future when the output of this -future is itself another future. Read more
§

fn flatten_stream(self) -> FlattenStream<Self>
where - Self::Output: Stream, - Self: Sized,

Flatten the execution of this future when the successful result of this -future is a stream. Read more
§

fn fuse(self) -> Fuse<Self>
where - Self: Sized,

Fuse a future such that poll will never again be called once it has -completed. This method can be used to turn any Future into a -FusedFuture. Read more
§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where - F: FnOnce(&Self::Output), - Self: Sized,

Do something with the output of a future before passing it on. Read more
§

fn catch_unwind(self) -> CatchUnwind<Self>
where - Self: Sized + UnwindSafe,

Catches unwinding panics while polling the future. Read more
§

fn shared(self) -> Shared<Self>
where - Self: Sized, - Self::Output: Clone,

Create a cloneable handle to this future where all handles will resolve -to the same result. Read more
§

fn remote_handle(self) -> (Remote<Self>, RemoteHandle<Self::Output>)
where - Self: Sized,

Turn this future into a future that yields () on completion and sends -its output to another future on a separate task. Read more
§

fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
where - Self: Sized + Send + 'a,

Wrap the future in a Box, pinning it. Read more
§

fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
where - Self: Sized + 'a,

Wrap the future in a Box, pinning it. Read more
§

fn unit_error(self) -> UnitError<Self>
where - Self: Sized,

§

fn never_error(self) -> NeverError<Self>
where - Self: Sized,

§

fn poll_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Self::Output>
where - Self: Unpin,

A convenience for calling Future::poll on Unpin future types.
§

fn now_or_never(self) -> Option<Self::Output>
where - Self: Sized,

Evaluates and consumes the future, returning the resulting output if -the future is ready after the first call to Future::poll. Read more
§

impl<T> FutureExt for T
where - T: Future + ?Sized,

§

fn with_cancellation_token( - self, - cancellation_token: &CancellationToken, -) -> WithCancellationTokenFuture<'_, Self>
where - Self: Sized,

Similar to [CancellationToken::run_until_cancelled], -but with the advantage that it is easier to write fluent call chains. Read more
§

fn with_cancellation_token_owned( - self, - cancellation_token: CancellationToken, -) -> WithCancellationTokenFutureOwned<Self>
where - Self: Sized,

Similar to [CancellationToken::run_until_cancelled_owned], -but with the advantage that it is easier to write fluent call chains. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<F> IntoFuture for F
where - F: Future,

Source§

type Output = <F as Future>::Output

The output that the future will produce on completion.
Source§

type IntoFuture = F

Which kind of future are we turning this into?
Source§

fn into_future(self) -> <F as IntoFuture>::IntoFuture

Creates a future from a value. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<F, T, E> TryFuture for F
where - F: Future<Output = Result<T, E>> + ?Sized,

§

type Ok = T

The type of successful values yielded by this future
§

type Error = E

The type of failures yielded by this future
§

fn try_poll( - self: Pin<&mut F>, - cx: &mut Context<'_>, -) -> Poll<<F as Future>::Output>

Poll this TryFuture as if it were a Future. Read more
§

impl<Fut> TryFutureExt for Fut
where - Fut: TryFuture + ?Sized,

§

fn flatten_sink<Item>(self) -> FlattenSink<Self, Self::Ok>
where - Self::Ok: Sink<Item, Error = Self::Error>, - Self: Sized,

Flattens the execution of this future when the successful result of this -future is a [Sink]. Read more
§

fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>
where - F: FnOnce(Self::Ok) -> T, - Self: Sized,

Maps this future’s success value to a different value. Read more
§

fn map_ok_or_else<T, E, F>(self, e: E, f: F) -> MapOkOrElse<Self, F, E>
where - F: FnOnce(Self::Ok) -> T, - E: FnOnce(Self::Error) -> T, - Self: Sized,

Maps this future’s success value to a different value, and permits for error handling resulting in the same type. Read more
§

fn map_err<E, F>(self, f: F) -> MapErr<Self, F>
where - F: FnOnce(Self::Error) -> E, - Self: Sized,

Maps this future’s error value to a different value. Read more
§

fn err_into<E>(self) -> ErrInto<Self, E>
where - Self: Sized, - Self::Error: Into<E>,

Maps this future’s Error to a new error type -using the Into trait. Read more
§

fn ok_into<U>(self) -> OkInto<Self, U>
where - Self: Sized, - Self::Ok: Into<U>,

Maps this future’s Ok to a new type -using the Into trait.
§

fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>
where - F: FnOnce(Self::Ok) -> Fut, - Fut: TryFuture<Error = Self::Error>, - Self: Sized,

Executes another future after this one resolves successfully. The -success value is passed to a closure to create this subsequent future. Read more
§

fn or_else<Fut, F>(self, f: F) -> OrElse<Self, Fut, F>
where - F: FnOnce(Self::Error) -> Fut, - Fut: TryFuture<Ok = Self::Ok>, - Self: Sized,

Executes another future if this one resolves to an error. The -error value is passed to a closure to create this subsequent future. Read more
§

fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>
where - F: FnOnce(&Self::Ok), - Self: Sized,

Do something with the success value of a future before passing it on. Read more
§

fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
where - F: FnOnce(&Self::Error), - Self: Sized,

Do something with the error value of a future before passing it on. Read more
§

fn try_flatten(self) -> TryFlatten<Self, Self::Ok>
where - Self::Ok: TryFuture<Error = Self::Error>, - Self: Sized,

Flatten the execution of this future when the successful result of this -future is another future. Read more
§

fn try_flatten_stream(self) -> TryFlattenStream<Self>
where - Self::Ok: TryStream<Error = Self::Error>, - Self: Sized,

Flatten the execution of this future when the successful result of this -future is a stream. Read more
§

fn unwrap_or_else<F>(self, f: F) -> UnwrapOrElse<Self, F>
where - Self: Sized, - F: FnOnce(Self::Error) -> Self::Ok,

Unwraps this future’s output, producing a future with this future’s -Ok type as its -Output type. Read more
§

fn into_future(self) -> IntoFuture<Self>
where - Self: Sized,

Wraps a [TryFuture] into a type that implements -Future. Read more
§

fn try_poll_unpin( - &mut self, - cx: &mut Context<'_>, -) -> Poll<Result<Self::Ok, Self::Error>>
where - Self: Unpin,

A convenience method for calling [TryFuture::try_poll] on Unpin -future types.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/dns/struct.GaiResolver.html b/core/target/doc/hyper_util/client/legacy/connect/dns/struct.GaiResolver.html deleted file mode 100644 index fd780087..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/dns/struct.GaiResolver.html +++ /dev/null @@ -1,20 +0,0 @@ -GaiResolver in hyper_util::client::legacy::connect::dns - Rust

GaiResolver

Struct GaiResolver 

Source
pub struct GaiResolver { /* private fields */ }
Expand description

A resolver using blocking getaddrinfo calls in a threadpool.

-

Implementations§

Source§

impl GaiResolver

Source

pub fn new() -> Self

Construct a new GaiResolver.

-

Trait Implementations§

Source§

impl Clone for GaiResolver

Source§

fn clone(&self) -> GaiResolver

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GaiResolver

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Service<Name> for GaiResolver

Source§

type Response = GaiAddrs

Responses given by the service.
Source§

type Error = Error

Errors produced by the service.
Source§

type Future = GaiFuture

The future response value.
Source§

fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, name: Name) -> Self::Future

Process the request and return the response asynchronously. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/dns/struct.InvalidNameError.html b/core/target/doc/hyper_util/client/legacy/connect/dns/struct.InvalidNameError.html deleted file mode 100644 index 761144d2..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/dns/struct.InvalidNameError.html +++ /dev/null @@ -1,18 +0,0 @@ -InvalidNameError in hyper_util::client::legacy::connect::dns - Rust

InvalidNameError

Struct InvalidNameError 

Source
pub struct InvalidNameError(/* private fields */);
Expand description

Error indicating a given string was not a valid domain name.

-

Trait Implementations§

Source§

impl Debug for InvalidNameError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for InvalidNameError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for InvalidNameError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToString for T
where - T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/dns/struct.Name.html b/core/target/doc/hyper_util/client/legacy/connect/dns/struct.Name.html deleted file mode 100644 index ae8bdb97..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/dns/struct.Name.html +++ /dev/null @@ -1,28 +0,0 @@ -Name in hyper_util::client::legacy::connect::dns - Rust

Name

Struct Name 

Source
pub struct Name { /* private fields */ }
Expand description

A domain name to resolve into IP addresses.

-

Implementations§

Source§

impl Name

Source

pub fn as_str(&self) -> &str

View the hostname as a string slice.

-

Trait Implementations§

Source§

impl Clone for Name

Source§

fn clone(&self) -> Name

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Name

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Name

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromStr for Name

Source§

type Err = InvalidNameError

The associated error which can be returned from parsing.
Source§

fn from_str(host: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for Name

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where - H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Name

Source§

fn eq(&self, other: &Name) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
Source§

impl Service<Name> for GaiResolver

Source§

type Response = GaiAddrs

Responses given by the service.
Source§

type Error = Error

Errors produced by the service.
Source§

type Future = GaiFuture

The future response value.
Source§

fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, name: Name) -> Self::Future

Process the request and return the response asynchronously. Read more
Source§

impl Eq for Name

Source§

impl StructuralPartialEq for Name

Auto Trait Implementations§

§

impl Freeze for Name

§

impl RefUnwindSafe for Name

§

impl Send for Name

§

impl Sync for Name

§

impl Unpin for Name

§

impl UnwindSafe for Name

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where - T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/fn.capture_connection.html b/core/target/doc/hyper_util/client/legacy/connect/fn.capture_connection.html deleted file mode 100644 index f0288282..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/fn.capture_connection.html +++ /dev/null @@ -1,43 +0,0 @@ -capture_connection in hyper_util::client::legacy::connect - Rust

capture_connection

Function capture_connection 

Source
pub fn capture_connection<B>(request: &mut Request<B>) -> CaptureConnection
Expand description

Capture the connection for a given request

-

When making a request with Hyper, the underlying connection must implement the Connection trait. -capture_connection allows a caller to capture the returned Connected structure as soon -as the connection is established.

-

Note: If establishing a connection fails, CaptureConnection::connection_metadata will always return none.

-

§Examples

-

Synchronous access: -The CaptureConnection::connection_metadata method allows callers to check if a connection has been -established. This is ideal for situations where you are certain the connection has already -been established (e.g. after the response future has already completed).

- -
use hyper_util::client::legacy::connect::capture_connection;
-let mut request = http::Request::builder()
-  .uri("http://foo.com")
-  .body(())
-  .unwrap();
-
-let captured_connection = capture_connection(&mut request);
-// some time later after the request has been sent...
-let connection_info = captured_connection.connection_metadata();
-println!("we are connected! {:?}", connection_info.as_ref());
-

Asynchronous access: -The CaptureConnection::wait_for_connection_metadata method returns a future resolves as soon as the -connection is available.

- -
use hyper_util::client::legacy::connect::capture_connection;
-use hyper_util::client::legacy::Client;
-use hyper_util::rt::TokioExecutor;
-use bytes::Bytes;
-use http_body_util::Empty;
-let mut request = http::Request::builder()
-  .uri("http://foo.com")
-  .body(Empty::<Bytes>::new())
-  .unwrap();
-
-let mut captured = capture_connection(&mut request);
-tokio::task::spawn(async move {
-    let connection_info = captured.wait_for_connection_metadata().await;
-    println!("we are connected! {:?}", connection_info.as_ref());
-});
-
-let client = Client::builder(TokioExecutor::new()).build_http();
-client.request(request).await.expect("request failed");
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/http/struct.HttpConnector.html b/core/target/doc/hyper_util/client/legacy/connect/http/struct.HttpConnector.html deleted file mode 100644 index 2d6f0823..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/http/struct.HttpConnector.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../../../../hyper_util/client/legacy/connect/struct.HttpConnector.html...

- - - \ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/http/struct.HttpInfo.html b/core/target/doc/hyper_util/client/legacy/connect/http/struct.HttpInfo.html deleted file mode 100644 index 2652afef..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/http/struct.HttpInfo.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../../../../hyper_util/client/legacy/connect/struct.HttpInfo.html...

- - - \ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/index.html b/core/target/doc/hyper_util/client/legacy/connect/index.html deleted file mode 100644 index 77abee9f..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/index.html +++ /dev/null @@ -1,48 +0,0 @@ -hyper_util::client::legacy::connect - Rust

Module connect

Module connect 

Source
Expand description

Connectors used by the Client.

-

This module contains:

-
    -
  • A default HttpConnector that does DNS resolution and establishes -connections over TCP.
  • -
  • Types to build custom connectors.
  • -
-

§Connectors

-

A “connector” is a Service that takes a Uri destination, and -its Response is some type implementing Read, Write, -and Connection.

-

§Custom Connectors

-

A simple connector that ignores the Uri destination and always returns -a TCP connection to the same address could be written like this:

- -
let connector = tower::service_fn(|_dst| async {
-    tokio::net::TcpStream::connect("127.0.0.1:1337")
-})
-

Or, fully written out:

- -
use std::{future::Future, net::SocketAddr, pin::Pin, task::{self, Poll}};
-use http::Uri;
-use tokio::net::TcpStream;
-use tower_service::Service;
-
-#[derive(Clone)]
-struct LocalConnector;
-
-impl Service<Uri> for LocalConnector {
-    type Response = TcpStream;
-    type Error = std::io::Error;
-    // We can't "name" an `async` generated future.
-    type Future = Pin<Box<
-        dyn Future<Output = Result<Self::Response, Self::Error>> + Send
-    >>;
-
-    fn poll_ready(&mut self, _: &mut task::Context<'_>) -> Poll<Result<(), Self::Error>> {
-        // This connector is always ready, but others might not be.
-        Poll::Ready(Ok(()))
-    }
-
-    fn call(&mut self, _: Uri) -> Self::Future {
-        Box::pin(TcpStream::connect(SocketAddr::from(([127, 0, 0, 1], 1337))))
-    }
-}
-

It’s worth noting that for TcpStreams, the HttpConnector is a -better starting place to extend from.

-

Modules§

dns
DNS Resolution used by the HttpConnector.
proxy
Proxy helpers

Structs§

CaptureConnection
CaptureConnection allows callers to capture Connected information
Connected
Extra information about the connected transport.
HttpConnector
A connector for the http scheme.
HttpInfo
Extra information about the transport when an HttpConnector is used.

Traits§

Connect
Connect to a destination, returning an IO transport.
Connection
Describes a type returned by a connector.

Functions§

capture_connection
Capture the connection for a given request
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/proxy/index.html b/core/target/doc/hyper_util/client/legacy/connect/proxy/index.html deleted file mode 100644 index 06a64284..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/proxy/index.html +++ /dev/null @@ -1,2 +0,0 @@ -hyper_util::client::legacy::connect::proxy - Rust

Module proxy

Module proxy 

Source
Expand description

Proxy helpers

-

Structs§

SocksV4
Tunnel Proxy via SOCKSv4
SocksV5
Tunnel Proxy via SOCKSv5
Tunnel
Tunnel Proxy via HTTP CONNECT
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/proxy/sidebar-items.js b/core/target/doc/hyper_util/client/legacy/connect/proxy/sidebar-items.js deleted file mode 100644 index e1032b4b..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/proxy/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"struct":["SocksV4","SocksV5","Tunnel"]}; \ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/proxy/socks/v4/struct.SocksV4.html b/core/target/doc/hyper_util/client/legacy/connect/proxy/socks/v4/struct.SocksV4.html deleted file mode 100644 index 870f1c43..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/proxy/socks/v4/struct.SocksV4.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../../../../../../hyper_util/client/legacy/connect/proxy/struct.SocksV4.html...

- - - \ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/proxy/socks/v5/struct.SocksV5.html b/core/target/doc/hyper_util/client/legacy/connect/proxy/socks/v5/struct.SocksV5.html deleted file mode 100644 index f65680e4..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/proxy/socks/v5/struct.SocksV5.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../../../../../../hyper_util/client/legacy/connect/proxy/struct.SocksV5.html...

- - - \ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/proxy/struct.SocksV4.html b/core/target/doc/hyper_util/client/legacy/connect/proxy/struct.SocksV4.html deleted file mode 100644 index 280eee82..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/proxy/struct.SocksV4.html +++ /dev/null @@ -1,40 +0,0 @@ -SocksV4 in hyper_util::client::legacy::connect::proxy - Rust

SocksV4

Struct SocksV4 

Source
pub struct SocksV4<C> { /* private fields */ }
Expand description

Tunnel Proxy via SOCKSv4

-

This is a connector that can be used by the legacy::Client. It wraps -another connector, and after getting an underlying connection, it establishes -a TCP tunnel over it using SOCKSv4.

-

Implementations§

Source§

impl<C> SocksV4<C>

Source

pub fn new(proxy_dst: Uri, connector: C) -> Self

Create a new SOCKSv4 handshake service

-

Wraps an underlying connector and stores the address of a tunneling -proxying server.

-

A SocksV4 can then be called with any destination. The dst passed to -call will not be used to create the underlying connection, but will -be used in a SOCKS handshake with the proxy destination.

-
Source

pub fn local_dns(self, local_dns: bool) -> Self

Resolve domain names locally on the client, rather than on the proxy server.

-

Disabled by default as local resolution of domain names can be detected as a -DNS leak.

-

Trait Implementations§

Source§

impl<C: Clone> Clone for SocksV4<C>

Source§

fn clone(&self) -> SocksV4<C>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<C: Debug> Debug for SocksV4<C>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<C> Service<Uri> for SocksV4<C>
where - C: Service<Uri>, - C::Future: Send + 'static, - C::Response: Read + Write + Unpin + Send + 'static, - C::Error: Send + 'static,

Source§

type Response = <C as Service<Uri>>::Response

Responses given by the service.
Source§

type Error = SocksError<<C as Service<Uri>>::Error>

Errors produced by the service.
Source§

type Future = Handshaking<<C as Service<Uri>>::Future, <C as Service<Uri>>::Response, <C as Service<Uri>>::Error>

The future response value.
Source§

fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, dst: Uri) -> Self::Future

Process the request and return the response asynchronously. Read more

Auto Trait Implementations§

§

impl<C> !Freeze for SocksV4<C>

§

impl<C> RefUnwindSafe for SocksV4<C>
where - C: RefUnwindSafe,

§

impl<C> Send for SocksV4<C>
where - C: Send,

§

impl<C> Sync for SocksV4<C>
where - C: Sync,

§

impl<C> Unpin for SocksV4<C>
where - C: Unpin,

§

impl<C> UnwindSafe for SocksV4<C>
where - C: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/proxy/struct.SocksV5.html b/core/target/doc/hyper_util/client/legacy/connect/proxy/struct.SocksV5.html deleted file mode 100644 index b0f59819..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/proxy/struct.SocksV5.html +++ /dev/null @@ -1,52 +0,0 @@ -SocksV5 in hyper_util::client::legacy::connect::proxy - Rust

SocksV5

Struct SocksV5 

Source
pub struct SocksV5<C> { /* private fields */ }
Expand description

Tunnel Proxy via SOCKSv5

-

This is a connector that can be used by the legacy::Client. It wraps -another connector, and after getting an underlying connection, it establishes -a TCP tunnel over it using SOCKSv5.

-

Implementations§

Source§

impl<C> SocksV5<C>

Source

pub fn new(proxy_dst: Uri, connector: C) -> Self

Create a new SOCKSv5 handshake service.

-

Wraps an underlying connector and stores the address of a tunneling -proxying server.

-

A SocksV5 can then be called with any destination. The dst passed to -call will not be used to create the underlying connection, but will -be used in a SOCKS handshake with the proxy destination.

-
Source

pub fn with_auth(self, user: String, pass: String) -> Self

Use User/Pass authentication method during handshake.

-

Username and Password must be maximum of 255 characters each. -0 length strings are allowed despite RFC prohibiting it. This is done for -compatablity with server implementations that use empty credentials -to allow returning error codes during IP authentication.

-
Source

pub fn local_dns(self, local_dns: bool) -> Self

Resolve domain names locally on the client, rather than on the proxy server.

-

Disabled by default as local resolution of domain names can be detected as a -DNS leak.

-
Source

pub fn send_optimistically(self, optimistic: bool) -> Self

Send all messages of the handshake optmistically (without waiting for server response).

-

A typical SOCKS handshake with user/pass authentication takes 3 round trips Optimistic sending -can reduce round trip times and dramatically increase speed of handshake at the cost of -reduced portability; many server implementations do not support optimistic sending as it -is not defined in the RFC.

-

Recommended to ensure connector works correctly without optimistic sending before trying -with optimistic sending.

-

Trait Implementations§

Source§

impl<C: Clone> Clone for SocksV5<C>

Source§

fn clone(&self) -> SocksV5<C>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<C: Debug> Debug for SocksV5<C>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<C> Service<Uri> for SocksV5<C>
where - C: Service<Uri>, - C::Future: Send + 'static, - C::Response: Read + Write + Unpin + Send + 'static, - C::Error: Send + 'static,

Source§

type Response = <C as Service<Uri>>::Response

Responses given by the service.
Source§

type Error = SocksError<<C as Service<Uri>>::Error>

Errors produced by the service.
Source§

type Future = Handshaking<<C as Service<Uri>>::Future, <C as Service<Uri>>::Response, <C as Service<Uri>>::Error>

The future response value.
Source§

fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, dst: Uri) -> Self::Future

Process the request and return the response asynchronously. Read more

Auto Trait Implementations§

§

impl<C> !Freeze for SocksV5<C>

§

impl<C> RefUnwindSafe for SocksV5<C>
where - C: RefUnwindSafe,

§

impl<C> Send for SocksV5<C>
where - C: Send,

§

impl<C> Sync for SocksV5<C>
where - C: Sync,

§

impl<C> Unpin for SocksV5<C>
where - C: Unpin,

§

impl<C> UnwindSafe for SocksV5<C>
where - C: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/proxy/struct.Tunnel.html b/core/target/doc/hyper_util/client/legacy/connect/proxy/struct.Tunnel.html deleted file mode 100644 index d4940371..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/proxy/struct.Tunnel.html +++ /dev/null @@ -1,40 +0,0 @@ -Tunnel in hyper_util::client::legacy::connect::proxy - Rust

Tunnel

Struct Tunnel 

Source
pub struct Tunnel<C> { /* private fields */ }
Expand description

Tunnel Proxy via HTTP CONNECT

-

This is a connector that can be used by the legacy::Client. It wraps -another connector, and after getting an underlying connection, it creates -an HTTP CONNECT tunnel over it.

-

Implementations§

Source§

impl<C> Tunnel<C>

Source

pub fn new(proxy_dst: Uri, connector: C) -> Self

Create a new Tunnel service.

-

This wraps an underlying connector, and stores the address of a -tunneling proxy server.

-

A Tunnel can then be called with any destination. The dst passed to -call will not be used to create the underlying connection, but will -be used in an HTTP CONNECT request sent to the proxy destination.

-
Source

pub fn with_auth(self, auth: HeaderValue) -> Self

Add proxy-authorization header value to the CONNECT request.

-
Source

pub fn with_headers(self, headers: HeaderMap) -> Self

Add extra headers to be sent with the CONNECT request.

-

If existing headers have been set, these will be merged.

-

Trait Implementations§

Source§

impl<C: Clone> Clone for Tunnel<C>

Source§

fn clone(&self) -> Tunnel<C>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<C: Debug> Debug for Tunnel<C>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<C> Service<Uri> for Tunnel<C>
where - C: Service<Uri>, - C::Future: Send + 'static, - C::Response: Read + Write + Unpin + Send + 'static, - C::Error: Into<Box<dyn StdError + Send + Sync>>,

Source§

type Response = <C as Service<Uri>>::Response

Responses given by the service.
Source§

type Error = TunnelError

Errors produced by the service.
Source§

type Future = Tunneling<<C as Service<Uri>>::Future, <C as Service<Uri>>::Response>

The future response value.
Source§

fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, dst: Uri) -> Self::Future

Process the request and return the response asynchronously. Read more

Auto Trait Implementations§

§

impl<C> !Freeze for Tunnel<C>

§

impl<C> RefUnwindSafe for Tunnel<C>
where - C: RefUnwindSafe,

§

impl<C> Send for Tunnel<C>
where - C: Send,

§

impl<C> Sync for Tunnel<C>
where - C: Sync,

§

impl<C> Unpin for Tunnel<C>
where - C: Unpin,

§

impl<C> UnwindSafe for Tunnel<C>
where - C: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/proxy/tunnel/struct.Tunnel.html b/core/target/doc/hyper_util/client/legacy/connect/proxy/tunnel/struct.Tunnel.html deleted file mode 100644 index 5f62d30a..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/proxy/tunnel/struct.Tunnel.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../../../../../hyper_util/client/legacy/connect/proxy/struct.Tunnel.html...

- - - \ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/sealed/trait.Connect.html b/core/target/doc/hyper_util/client/legacy/connect/sealed/trait.Connect.html deleted file mode 100644 index a54081d0..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/sealed/trait.Connect.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../../../../hyper_util/client/legacy/connect/trait.Connect.html...

- - - \ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/sidebar-items.js b/core/target/doc/hyper_util/client/legacy/connect/sidebar-items.js deleted file mode 100644 index 4729f4a7..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["capture_connection"],"mod":["dns","proxy"],"struct":["CaptureConnection","Connected","HttpConnector","HttpInfo"],"trait":["Connect","Connection"]}; \ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/struct.CaptureConnection.html b/core/target/doc/hyper_util/client/legacy/connect/struct.CaptureConnection.html deleted file mode 100644 index 77a16fc1..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/struct.CaptureConnection.html +++ /dev/null @@ -1,26 +0,0 @@ -CaptureConnection in hyper_util::client::legacy::connect - Rust

CaptureConnection

Struct CaptureConnection 

Source
pub struct CaptureConnection { /* private fields */ }
Expand description

CaptureConnection allows callers to capture Connected information

-

To capture a connection for a request, use capture_connection.

-

Implementations§

Source§

impl CaptureConnection

Source

pub fn connection_metadata(&self) -> impl Deref<Target = Option<Connected>> + '_

Retrieve the connection metadata, if available

-
Source

pub async fn wait_for_connection_metadata( - &mut self, -) -> impl Deref<Target = Option<Connected>> + '_

Wait for the connection to be established

-

If a connection was established, this will always return Some(...). If the request never -successfully connected (e.g. DNS resolution failure), this method will never return.

-

Trait Implementations§

Source§

impl Clone for CaptureConnection

Source§

fn clone(&self) -> CaptureConnection

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CaptureConnection

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/struct.Connected.html b/core/target/doc/hyper_util/client/legacy/connect/struct.Connected.html deleted file mode 100644 index d96f1c85..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/struct.Connected.html +++ /dev/null @@ -1,39 +0,0 @@ -Connected in hyper_util::client::legacy::connect - Rust

Connected

Struct Connected 

Source
pub struct Connected { /* private fields */ }
Expand description

Extra information about the connected transport.

-

This can be used to inform recipients about things like if ALPN -was used, or if connected to an HTTP proxy.

-

Implementations§

Source§

impl Connected

Source

pub fn new() -> Connected

Create new Connected type with empty metadata.

-
Source

pub fn proxy(self, is_proxied: bool) -> Connected

Set whether the connected transport is to an HTTP proxy.

-

This setting will affect if HTTP/1 requests written on the transport -will have the request-target in absolute-form or origin-form:

-
    -
  • When proxy(false):
  • -
-
GET /guide HTTP/1.1
-
    -
  • When proxy(true):
  • -
-
GET http://hyper.rs/guide HTTP/1.1
-

Default is false.

-
Source

pub fn is_proxied(&self) -> bool

Determines if the connected transport is to an HTTP proxy.

-
Source

pub fn extra<T: Clone + Send + Sync + 'static>(self, extra: T) -> Connected

Set extra connection information to be set in the extensions of every Response.

-
Source

pub fn get_extras(&self, extensions: &mut Extensions)

Copies the extra connection information into an Extensions map.

-
Source

pub fn negotiated_h2(self) -> Connected

Set that the connected transport negotiated HTTP/2 as its next protocol.

-
Source

pub fn is_negotiated_h2(&self) -> bool

Determines if the connected transport negotiated HTTP/2 as its next protocol.

-
Source

pub fn poison(&self)

Poison this connection

-

A poisoned connection will not be reused for subsequent requests by the pool

-

Trait Implementations§

Source§

impl Debug for Connected

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/struct.HttpConnector.html b/core/target/doc/hyper_util/client/legacy/connect/struct.HttpConnector.html deleted file mode 100644 index 3c1dab0c..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/struct.HttpConnector.html +++ /dev/null @@ -1,85 +0,0 @@ -HttpConnector in hyper_util::client::legacy::connect - Rust

HttpConnector

Struct HttpConnector 

Source
pub struct HttpConnector<R = GaiResolver> { /* private fields */ }
Expand description

A connector for the http scheme.

-

Performs DNS resolution in a thread pool, and then connects over TCP.

-

§Note

-

Sets the HttpInfo value on responses, which includes -transport information such as the remote socket address used.

-

Implementations§

Source§

impl HttpConnector

Source

pub fn new() -> HttpConnector

Construct a new HttpConnector.

-
Source§

impl<R> HttpConnector<R>

Source

pub fn new_with_resolver(resolver: R) -> HttpConnector<R>

Construct a new HttpConnector.

-

Takes a Resolver to handle DNS lookups.

-
Source

pub fn enforce_http(&mut self, is_enforced: bool)

Option to enforce all Uris have the http scheme.

-

Enabled by default.

-
Source

pub fn set_keepalive(&mut self, time: Option<Duration>)

Set that all sockets have SO_KEEPALIVE set with the supplied duration -to remain idle before sending TCP keepalive probes.

-

If None, keepalive is disabled.

-

Default is None.

-
Source

pub fn set_keepalive_interval(&mut self, interval: Option<Duration>)

Set the duration between two successive TCP keepalive retransmissions, -if acknowledgement to the previous keepalive transmission is not received.

-
Source

pub fn set_keepalive_retries(&mut self, retries: Option<u32>)

Set the number of retransmissions to be carried out before declaring that remote end is not available.

-
Source

pub fn set_nodelay(&mut self, nodelay: bool)

Set that all sockets have SO_NODELAY set to the supplied value nodelay.

-

Default is false.

-
Source

pub fn set_send_buffer_size(&mut self, size: Option<usize>)

Sets the value of the SO_SNDBUF option on the socket.

-
Source

pub fn set_recv_buffer_size(&mut self, size: Option<usize>)

Sets the value of the SO_RCVBUF option on the socket.

-
Source

pub fn set_local_address(&mut self, addr: Option<IpAddr>)

Set that all sockets are bound to the configured address before connection.

-

If None, the sockets will not be bound.

-

Default is None.

-
Source

pub fn set_local_addresses(&mut self, addr_ipv4: Ipv4Addr, addr_ipv6: Ipv6Addr)

Set that all sockets are bound to the configured IPv4 or IPv6 address (depending on host’s -preferences) before connection.

-
Source

pub fn set_connect_timeout(&mut self, dur: Option<Duration>)

Set the connect timeout.

-

If a domain resolves to multiple IP addresses, the timeout will be -evenly divided across them.

-

Default is None.

-
Source

pub fn set_happy_eyeballs_timeout(&mut self, dur: Option<Duration>)

Set timeout for RFC 6555 (Happy Eyeballs) algorithm.

-

If hostname resolves to both IPv4 and IPv6 addresses and connection -cannot be established using preferred address family before timeout -elapses, then connector will in parallel attempt connection using other -address family.

-

If None, parallel connection attempts are disabled.

-

Default is 300 milliseconds.

-
Source

pub fn set_reuse_address(&mut self, reuse_address: bool) -> &mut Self

Set that all socket have SO_REUSEADDR set to the supplied value reuse_address.

-

Default is false.

-
Source

pub fn set_interface<S: Into<String>>(&mut self, interface: S) -> &mut Self

Sets the name of the interface to bind sockets produced by this -connector.

-

On Linux, this sets the SO_BINDTODEVICE option on this socket (see -[man 7 socket] for details). On macOS (and macOS-derived systems like -iOS), illumos, and Solaris, this will instead use the IP_BOUND_IF -socket option (see [man 7p ip]).

-

If a socket is bound to an interface, only packets received from that particular -interface are processed by the socket. Note that this only works for some socket -types, particularly `AF_INET`` sockets.

-

On Linux it can be used to specify a VRF, but the binary needs -to either have CAP_NET_RAW or to be run as root.

-

This function is only available on the following operating systems:

-
    -
  • Linux, including Android
  • -
  • Fuchsia
  • -
  • illumos and Solaris
  • -
  • macOS, iOS, visionOS, watchOS, and tvOS
  • -
-

[man 7 socket] https://man7.org/linux/man-pages/man7/socket.7.html -[man 7p ip]: https://docs.oracle.com/cd/E86824_01/html/E54777/ip-7p.html

-

Trait Implementations§

Source§

impl<R: Clone> Clone for HttpConnector<R>

Source§

fn clone(&self) -> HttpConnector<R>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<R: Debug> Debug for HttpConnector<R>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<R> Service<Uri> for HttpConnector<R>
where - R: Resolve + Clone + Send + Sync + 'static, - R::Future: Send,

Source§

type Response = TokioIo<TcpStream>

Responses given by the service.
Source§

type Error = ConnectError

Errors produced by the service.
Source§

type Future = HttpConnecting<R>

The future response value.
Source§

fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, dst: Uri) -> Self::Future

Process the request and return the response asynchronously. Read more

Auto Trait Implementations§

§

impl<R> Freeze for HttpConnector<R>
where - R: Freeze,

§

impl<R> RefUnwindSafe for HttpConnector<R>
where - R: RefUnwindSafe,

§

impl<R> Send for HttpConnector<R>
where - R: Send,

§

impl<R> Sync for HttpConnector<R>
where - R: Sync,

§

impl<R> Unpin for HttpConnector<R>
where - R: Unpin,

§

impl<R> UnwindSafe for HttpConnector<R>
where - R: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/struct.HttpInfo.html b/core/target/doc/hyper_util/client/legacy/connect/struct.HttpInfo.html deleted file mode 100644 index 477cf392..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/struct.HttpInfo.html +++ /dev/null @@ -1,34 +0,0 @@ -HttpInfo in hyper_util::client::legacy::connect - Rust

HttpInfo

Struct HttpInfo 

Source
pub struct HttpInfo { /* private fields */ }
Expand description

Extra information about the transport when an HttpConnector is used.

-

§Example

-
use hyper_util::client::legacy::connect::HttpInfo;
-
-// res = http::Response
-res
-    .extensions()
-    .get::<HttpInfo>()
-    .map(|info| {
-        println!("remote addr = {}", info.remote_addr());
-    });

§Note

-

If a different connector is used besides HttpConnector, -this value will not exist in the extensions. Consult that specific -connector to see what “extra” information it might provide to responses.

-

Implementations§

Source§

impl HttpInfo

Source

pub fn remote_addr(&self) -> SocketAddr

Get the remote address of the transport used.

-
Source

pub fn local_addr(&self) -> SocketAddr

Get the local address of the transport used.

-

Trait Implementations§

Source§

impl Clone for HttpInfo

Source§

fn clone(&self) -> HttpInfo

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HttpInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/trait.Connect.html b/core/target/doc/hyper_util/client/legacy/connect/trait.Connect.html deleted file mode 100644 index f1dd812b..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/trait.Connect.html +++ /dev/null @@ -1,12 +0,0 @@ -Connect in hyper_util::client::legacy::connect - Rust

Connect

Trait Connect 

Source
pub trait Connect: Sealed + Sized { }
Expand description

Connect to a destination, returning an IO transport.

-

A connector receives a Uri and returns a Future of the -ready connection.

-

§Trait Alias

-

This is really just an alias for the tower::Service trait, with -additional bounds set for convenience inside hyper. You don’t actually -implement this trait, but tower::Service<Uri> instead.

-

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<S, T> Connect for S
where - S: Service<Uri, Response = T> + Send + 'static, - S::Error: Into<Box<dyn StdError + Send + Sync>>, - S::Future: Unpin + Send, - T: Read + Write + Connection + Unpin + Send + 'static,

\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/connect/trait.Connection.html b/core/target/doc/hyper_util/client/legacy/connect/trait.Connection.html deleted file mode 100644 index 320d9ece..00000000 --- a/core/target/doc/hyper_util/client/legacy/connect/trait.Connection.html +++ /dev/null @@ -1,7 +0,0 @@ -Connection in hyper_util::client::legacy::connect - Rust

Connection

Trait Connection 

Source
pub trait Connection {
-    // Required method
-    fn connected(&self) -> Connected;
-}
Expand description

Describes a type returned by a connector.

-

Required Methods§

Source

fn connected(&self) -> Connected

Return metadata describing the connection.

-

Implementations on Foreign Types§

Source§

impl Connection for TcpStream

Source§

impl Connection for UnixStream

Available on Unix only.

Implementors§

Source§

impl<T> Connection for TokioIo<T>
where - T: Connection,

\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/index.html b/core/target/doc/hyper_util/client/legacy/index.html deleted file mode 100644 index 9fb33595..00000000 --- a/core/target/doc/hyper_util/client/legacy/index.html +++ /dev/null @@ -1,2 +0,0 @@ -hyper_util::client::legacy - Rust

Module legacy

Module legacy 

Source
Expand description

Legacy implementations of connect module and Client

-

Modules§

connect
Connectors used by the Client.

Structs§

Builder
A builder to configure a new Client.
Client
A Client to make outgoing HTTP requests.
Error
Client errors
ResponseFuture
A Future that will resolve to an HTTP Response.
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/sidebar-items.js b/core/target/doc/hyper_util/client/legacy/sidebar-items.js deleted file mode 100644 index 8aeee431..00000000 --- a/core/target/doc/hyper_util/client/legacy/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["connect"],"struct":["Builder","Client","Error","ResponseFuture"]}; \ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/struct.Builder.html b/core/target/doc/hyper_util/client/legacy/struct.Builder.html deleted file mode 100644 index 8c06d6a0..00000000 --- a/core/target/doc/hyper_util/client/legacy/struct.Builder.html +++ /dev/null @@ -1,264 +0,0 @@ -Builder in hyper_util::client::legacy - Rust

Builder

Struct Builder 

Source
pub struct Builder { /* private fields */ }
Expand description

A builder to configure a new Client.

-

§Example

-
use std::time::Duration;
-use hyper_util::client::legacy::Client;
-use hyper_util::rt::TokioExecutor;
-
-let client = Client::builder(TokioExecutor::new())
-    .pool_idle_timeout(Duration::from_secs(30))
-    .http2_only(true)
-    .build_http();

Implementations§

Source§

impl Builder

Source

pub fn new<E>(executor: E) -> Self
where - E: Executor<Pin<Box<dyn Future<Output = ()> + Send>>> + Send + Sync + Clone + 'static,

Construct a new Builder.

-
Source

pub fn pool_idle_timeout<D>(&mut self, val: D) -> &mut Self
where - D: Into<Option<Duration>>,

Set an optional timeout for idle sockets being kept-alive. -A Timer is required for this to take effect. See Builder::pool_timer

-

Pass None to disable timeout.

-

Default is 90 seconds.

-
§Example
-
use std::time::Duration;
-use hyper_util::client::legacy::Client;
-use hyper_util::rt::{TokioExecutor, TokioTimer};
-
-let client = Client::builder(TokioExecutor::new())
-    .pool_idle_timeout(Duration::from_secs(30))
-    .pool_timer(TokioTimer::new())
-    .build_http();
-
Source

pub fn pool_max_idle_per_host(&mut self, max_idle: usize) -> &mut Self

Sets the maximum idle connection per host allowed in the pool.

-

Default is usize::MAX (no limit).

-
Source

pub fn http1_read_buf_exact_size(&mut self, sz: usize) -> &mut Self

Sets the exact size of the read buffer to always use.

-

Note that setting this option unsets the http1_max_buf_size option.

-

Default is an adaptive read buffer.

-
Source

pub fn http1_max_buf_size(&mut self, max: usize) -> &mut Self

Set the maximum buffer size for the connection.

-

Default is ~400kb.

-

Note that setting this option unsets the http1_read_exact_buf_size option.

-
§Panics
-

The minimum value allowed is 8192. This method panics if the passed max is less than the minimum.

-
Source

pub fn http1_allow_spaces_after_header_name_in_responses( - &mut self, - val: bool, -) -> &mut Self

Set whether HTTP/1 connections will accept spaces between header names -and the colon that follow them in responses.

-

Newline codepoints (\r and \n) will be transformed to spaces when -parsing.

-

You probably don’t need this, here is what RFC 7230 Section 3.2.4. has -to say about it:

-
-

No whitespace is allowed between the header field-name and colon. In -the past, differences in the handling of such whitespace have led to -security vulnerabilities in request routing and response handling. A -server MUST reject any received request message that contains -whitespace between a header field-name and colon with a response code -of 400 (Bad Request). A proxy MUST remove any such whitespace from a -response message before forwarding the message downstream.

-
-

Note that this setting does not affect HTTP/2.

-

Default is false.

-
Source

pub fn http1_allow_obsolete_multiline_headers_in_responses( - &mut self, - val: bool, -) -> &mut Self

Set whether HTTP/1 connections will accept obsolete line folding for -header values.

-

You probably don’t need this, here is what RFC 7230 Section 3.2.4. has -to say about it:

-
-

A server that receives an obs-fold in a request message that is not -within a message/http container MUST either reject the message by -sending a 400 (Bad Request), preferably with a representation -explaining that obsolete line folding is unacceptable, or replace -each received obs-fold with one or more SP octets prior to -interpreting the field value or forwarding the message downstream.

-
-
-

A proxy or gateway that receives an obs-fold in a response message -that is not within a message/http container MUST either discard the -message and replace it with a 502 (Bad Gateway) response, preferably -with a representation explaining that unacceptable line folding was -received, or replace each received obs-fold with one or more SP -octets prior to interpreting the field value or forwarding the -message downstream.

-
-
-

A user agent that receives an obs-fold in a response message that is -not within a message/http container MUST replace each received -obs-fold with one or more SP octets prior to interpreting the field -value.

-
-

Note that this setting does not affect HTTP/2.

-

Default is false.

-
Source

pub fn http1_ignore_invalid_headers_in_responses( - &mut self, - val: bool, -) -> &mut Builder

Sets whether invalid header lines should be silently ignored in HTTP/1 responses.

-

This mimics the behaviour of major browsers. You probably don’t want this. -You should only want this if you are implementing a proxy whose main -purpose is to sit in front of browsers whose users access arbitrary content -which may be malformed, and they expect everything that works without -the proxy to keep working with the proxy.

-

This option will prevent Hyper’s client from returning an error encountered -when parsing a header, except if the error was caused by the character NUL -(ASCII code 0), as Chrome specifically always reject those.

-

The ignorable errors are:

-
    -
  • empty header names;
  • -
  • characters that are not allowed in header names, except for \0 and \r;
  • -
  • when allow_spaces_after_header_name_in_responses is not enabled, -spaces and tabs between the header name and the colon;
  • -
  • missing colon between header name and colon;
  • -
  • characters that are not allowed in header values except for \0 and \r.
  • -
-

If an ignorable error is encountered, the parser tries to find the next -line in the input to resume parsing the rest of the headers. An error -will be emitted nonetheless if it finds \0 or a lone \r while -looking for the next line.

-
Source

pub fn http1_writev(&mut self, enabled: bool) -> &mut Builder

Set whether HTTP/1 connections should try to use vectored writes, -or always flatten into a single buffer.

-

Note that setting this to false may mean more copies of body data, -but may also improve performance when an IO transport doesn’t -support vectored writes well, such as most TLS implementations.

-

Setting this to true will force hyper to use queued strategy -which may eliminate unnecessary cloning on some TLS backends

-

Default is auto. In this mode hyper will try to guess which -mode to use

-
Source

pub fn http1_title_case_headers(&mut self, val: bool) -> &mut Self

Set whether HTTP/1 connections will write header names as title case at -the socket level.

-

Note that this setting does not affect HTTP/2.

-

Default is false.

-
Source

pub fn http1_preserve_header_case(&mut self, val: bool) -> &mut Self

Set whether to support preserving original header cases.

-

Currently, this will record the original cases received, and store them -in a private extension on the Response. It will also look for and use -such an extension in any provided Request.

-

Since the relevant extension is still private, there is no way to -interact with the original cases. The only effect this can have now is -to forward the cases in a proxy-like fashion.

-

Note that this setting does not affect HTTP/2.

-

Default is false.

-
Source

pub fn http1_max_headers(&mut self, val: usize) -> &mut Self

Set the maximum number of headers.

-

When a response is received, the parser will reserve a buffer to store headers for optimal -performance.

-

If client receives more headers than the buffer size, the error “message header too large” -is returned.

-

The headers is allocated on the stack by default, which has higher performance. After -setting this value, headers will be allocated in heap memory, that is, heap memory -allocation will occur for each response, and there will be a performance drop of about 5%.

-

Note that this setting does not affect HTTP/2.

-

Default is 100.

-
Source

pub fn http09_responses(&mut self, val: bool) -> &mut Self

Set whether HTTP/0.9 responses should be tolerated.

-

Default is false.

-
Source

pub fn http2_only(&mut self, val: bool) -> &mut Self

Set whether the connection must use HTTP/2.

-

The destination must either allow HTTP2 Prior Knowledge, or the -Connect should be configured to do use ALPN to upgrade to h2 -as part of the connection process. This will not make the Client -utilize ALPN by itself.

-

Note that setting this to true prevents HTTP/1 from being allowed.

-

Default is false.

-
Source

pub fn http2_max_pending_accept_reset_streams( - &mut self, - max: impl Into<Option<usize>>, -) -> &mut Self

Configures the maximum number of pending reset streams allowed before a GOAWAY will be sent.

-

This will default to the default value set by the h2 crate. -As of v0.4.0, it is 20.

-

See https://github.com/hyperium/hyper/issues/2877 for more information.

-
Source

pub fn http2_initial_stream_window_size( - &mut self, - sz: impl Into<Option<u32>>, -) -> &mut Self

Sets the SETTINGS_INITIAL_WINDOW_SIZE option for HTTP2 -stream-level flow control.

-

Passing None will do nothing.

-

If not set, hyper will use a default.

-
Source

pub fn http2_initial_connection_window_size( - &mut self, - sz: impl Into<Option<u32>>, -) -> &mut Self

Sets the max connection-level flow control for HTTP2

-

Passing None will do nothing.

-

If not set, hyper will use a default.

-
Source

pub fn http2_initial_max_send_streams( - &mut self, - initial: impl Into<Option<usize>>, -) -> &mut Self

Sets the initial maximum of locally initiated (send) streams.

-

This value will be overwritten by the value included in the initial -SETTINGS frame received from the peer as part of a connection preface.

-

Passing None will do nothing.

-

If not set, hyper will use a default.

-
Source

pub fn http2_adaptive_window(&mut self, enabled: bool) -> &mut Self

Sets whether to use an adaptive flow control.

-

Enabling this will override the limits set in -http2_initial_stream_window_size and -http2_initial_connection_window_size.

-
Source

pub fn http2_max_frame_size(&mut self, sz: impl Into<Option<u32>>) -> &mut Self

Sets the maximum frame size to use for HTTP2.

-

Passing None will do nothing.

-

If not set, hyper will use a default.

-
Source

pub fn http2_max_header_list_size(&mut self, max: u32) -> &mut Self

Sets the max size of received header frames for HTTP2.

-

Default is currently 16KB, but can change.

-
Source

pub fn http2_keep_alive_interval( - &mut self, - interval: impl Into<Option<Duration>>, -) -> &mut Self

Sets an interval for HTTP2 Ping frames should be sent to keep a -connection alive.

-

Pass None to disable HTTP2 keep-alive.

-

Default is currently disabled.

-
§Cargo Feature
-

Requires the tokio cargo feature to be enabled.

-
Source

pub fn http2_keep_alive_timeout(&mut self, timeout: Duration) -> &mut Self

Sets a timeout for receiving an acknowledgement of the keep-alive ping.

-

If the ping is not acknowledged within the timeout, the connection will -be closed. Does nothing if http2_keep_alive_interval is disabled.

-

Default is 20 seconds.

-
§Cargo Feature
-

Requires the tokio cargo feature to be enabled.

-
Source

pub fn http2_keep_alive_while_idle(&mut self, enabled: bool) -> &mut Self

Sets whether HTTP2 keep-alive should apply while the connection is idle.

-

If disabled, keep-alive pings are only sent while there are open -request/responses streams. If enabled, pings are also sent when no -streams are active. Does nothing if http2_keep_alive_interval is -disabled.

-

Default is false.

-
§Cargo Feature
-

Requires the tokio cargo feature to be enabled.

-
Source

pub fn http2_max_concurrent_reset_streams(&mut self, max: usize) -> &mut Self

Sets the maximum number of HTTP2 concurrent locally reset streams.

-

See the documentation of h2::client::Builder::max_concurrent_reset_streams for more -details.

-

The default value is determined by the h2 crate.

-
Source

pub fn timer<M>(&mut self, timer: M) -> &mut Self
where - M: Timer + Send + Sync + 'static,

Provide a timer to be used for h2

-

See the documentation of h2::client::Builder::timer for more -details.

-
Source

pub fn pool_timer<M>(&mut self, timer: M) -> &mut Self
where - M: Timer + Clone + Send + Sync + 'static,

Provide a timer to be used for timeouts and intervals in connection pools.

-
Source

pub fn http2_max_send_buf_size(&mut self, max: usize) -> &mut Self

Set the maximum write buffer size for each HTTP/2 stream.

-

Default is currently 1MB, but may change.

-
§Panics
-

The value must be no larger than u32::MAX.

-
Source

pub fn retry_canceled_requests(&mut self, val: bool) -> &mut Self

Set whether to retry requests that get disrupted before ever starting -to write.

-

This means a request that is queued, and gets given an idle, reused -connection, and then encounters an error immediately as the idle -connection was found to be unusable.

-

When this is set to false, the related ResponseFuture would instead -resolve to an Error::Cancel.

-

Default is true.

-
Source

pub fn set_host(&mut self, val: bool) -> &mut Self

Set whether to automatically add the Host header to requests.

-

If true, and a request does not include a Host header, one will be -added automatically, derived from the authority of the Uri.

-

Default is true.

-
Source

pub fn build_http<B>(&self) -> Client<HttpConnector, B>
where - B: Body + Send, - B::Data: Send,

Build a client with this configuration and the default HttpConnector.

-
Source

pub fn build<C, B>(&self, connector: C) -> Client<C, B>
where - C: Connect + Clone, - B: Body + Send, - B::Data: Send,

Combine the configuration of this builder with a connector to create a Client.

-

Trait Implementations§

Source§

impl Clone for Builder

Source§

fn clone(&self) -> Builder

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Builder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/struct.Client.html b/core/target/doc/hyper_util/client/legacy/struct.Client.html deleted file mode 100644 index e19bf82d..00000000 --- a/core/target/doc/hyper_util/client/legacy/struct.Client.html +++ /dev/null @@ -1,81 +0,0 @@ -Client in hyper_util::client::legacy - Rust

Client

Struct Client 

Source
pub struct Client<C, B> { /* private fields */ }
Expand description

A Client to make outgoing HTTP requests.

-

Client is cheap to clone and cloning is the recommended way to share a Client. The -underlying connection pool will be reused.

-

Implementations§

Source§

impl Client<(), ()>

Source

pub fn builder<E>(executor: E) -> Builder
where - E: Executor<Pin<Box<dyn Future<Output = ()> + Send>>> + Send + Sync + Clone + 'static,

Create a builder to configure a new Client.

-
§Example
-
use std::time::Duration;
-use hyper_util::client::legacy::Client;
-use hyper_util::rt::{TokioExecutor, TokioTimer};
-
-let client = Client::builder(TokioExecutor::new())
-    .pool_timer(TokioTimer::new())
-    .pool_idle_timeout(Duration::from_secs(30))
-    .http2_only(true)
-    .build_http();
Source§

impl<C, B> Client<C, B>
where - C: Connect + Clone + Send + Sync + 'static, - B: Body + Send + 'static + Unpin, - B::Data: Send, - B::Error: Into<Box<dyn StdError + Send + Sync>>,

Source

pub fn get(&self, uri: Uri) -> ResponseFuture
where - B: Default,

Send a GET request to the supplied Uri.

-
§Note
-

This requires that the Body type have a Default implementation. -It should return an “empty” version of itself, such that -Body::is_end_stream is true.

-
§Example
-
use hyper::Uri;
-use hyper_util::client::legacy::Client;
-use hyper_util::rt::TokioExecutor;
-use bytes::Bytes;
-use http_body_util::Full;
-
-let client: Client<_, Full<Bytes>> = Client::builder(TokioExecutor::new()).build_http();
-
-let future = client.get(Uri::from_static("http://httpbin.org/ip"));
Source

pub fn request(&self, req: Request<B>) -> ResponseFuture

Send a constructed Request using this Client.

-
§Example
-
use hyper::{Method, Request};
-use hyper_util::client::legacy::Client;
-use http_body_util::Full;
-use hyper_util::rt::TokioExecutor;
-use bytes::Bytes;
-
-let client: Client<_, Full<Bytes>> = Client::builder(TokioExecutor::new()).build_http();
-
-let req: Request<Full<Bytes>> = Request::builder()
-    .method(Method::POST)
-    .uri("http://httpbin.org/post")
-    .body(Full::from("Hallo!"))
-    .expect("request builder");
-
-let future = client.request(req);

Trait Implementations§

Source§

impl<C: Clone, B> Clone for Client<C, B>

Source§

fn clone(&self) -> Client<C, B>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<C, B> Debug for Client<C, B>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<C, B> Service<Request<B>> for &Client<C, B>
where - C: Connect + Clone + Send + Sync + 'static, - B: Body + Send + 'static + Unpin, - B::Data: Send, - B::Error: Into<Box<dyn StdError + Send + Sync>>,

Source§

type Response = Response<Incoming>

Responses given by the service.
Source§

type Error = Error

Errors produced by the service.
Source§

type Future = ResponseFuture

The future response value.
Source§

fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, req: Request<B>) -> Self::Future

Process the request and return the response asynchronously. Read more
Source§

impl<C, B> Service<Request<B>> for Client<C, B>
where - C: Connect + Clone + Send + Sync + 'static, - B: Body + Send + 'static + Unpin, - B::Data: Send, - B::Error: Into<Box<dyn StdError + Send + Sync>>,

Source§

type Response = Response<Incoming>

Responses given by the service.
Source§

type Error = Error

Errors produced by the service.
Source§

type Future = ResponseFuture

The future response value.
Source§

fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, req: Request<B>) -> Self::Future

Process the request and return the response asynchronously. Read more

Auto Trait Implementations§

§

impl<C, B> Freeze for Client<C, B>
where - C: Freeze,

§

impl<C, B> !RefUnwindSafe for Client<C, B>

§

impl<C, B> Send for Client<C, B>
where - C: Send, - B: Send,

§

impl<C, B> Sync for Client<C, B>
where - C: Sync, - B: Send,

§

impl<C, B> Unpin for Client<C, B>
where - C: Unpin,

§

impl<C, B> !UnwindSafe for Client<C, B>

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/struct.Error.html b/core/target/doc/hyper_util/client/legacy/struct.Error.html deleted file mode 100644 index 45f80b17..00000000 --- a/core/target/doc/hyper_util/client/legacy/struct.Error.html +++ /dev/null @@ -1,20 +0,0 @@ -Error in hyper_util::client::legacy - Rust

Error

Struct Error 

Source
pub struct Error { /* private fields */ }
Expand description

Client errors

-

Implementations§

Source§

impl Error

Source

pub fn is_connect(&self) -> bool

Returns true if this was an error from Connect.

-
Source

pub fn connect_info(&self) -> Option<&Connected>

Returns the info of the client connection on which this error occurred.

-

Trait Implementations§

Source§

impl Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Error

Source§

fn source(&self) -> Option<&(dyn StdError + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToString for T
where - T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/legacy/struct.ResponseFuture.html b/core/target/doc/hyper_util/client/legacy/struct.ResponseFuture.html deleted file mode 100644 index 32858e51..00000000 --- a/core/target/doc/hyper_util/client/legacy/struct.ResponseFuture.html +++ /dev/null @@ -1,125 +0,0 @@ -ResponseFuture in hyper_util::client::legacy - Rust

ResponseFuture

Struct ResponseFuture 

Source
pub struct ResponseFuture { /* private fields */ }
Expand description

A Future that will resolve to an HTTP Response.

-

This is returned by Client::request (and Client::get).

-

Trait Implementations§

Source§

impl Debug for ResponseFuture

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Future for ResponseFuture

Source§

type Output = Result<Response<Incoming>, Error>

The type of value produced on completion.
Source§

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>

Attempts to resolve the future to a final value, registering -the current task for wakeup if the value is not yet available. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> FutureExt for T
where - T: Future + ?Sized,

§

fn map<U, F>(self, f: F) -> Map<Self, F>
where - F: FnOnce(Self::Output) -> U, - Self: Sized,

Map this future’s output to a different type, returning a new future of -the resulting type. Read more
§

fn map_into<U>(self) -> MapInto<Self, U>
where - Self::Output: Into<U>, - Self: Sized,

Map this future’s output to a different type, returning a new future of -the resulting type. Read more
§

fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
where - F: FnOnce(Self::Output) -> Fut, - Fut: Future, - Self: Sized,

Chain on a computation for when a future finished, passing the result of -the future to the provided closure f. Read more
§

fn left_future<B>(self) -> Either<Self, B>
where - B: Future<Output = Self::Output>, - Self: Sized,

Wrap this future in an Either future, making it the left-hand variant -of that Either. Read more
§

fn right_future<A>(self) -> Either<A, Self>
where - A: Future<Output = Self::Output>, - Self: Sized,

Wrap this future in an Either future, making it the right-hand variant -of that Either. Read more
§

fn into_stream(self) -> IntoStream<Self>
where - Self: Sized,

Convert this future into a single element stream. Read more
§

fn flatten(self) -> Flatten<Self>
where - Self::Output: Future, - Self: Sized,

Flatten the execution of this future when the output of this -future is itself another future. Read more
§

fn flatten_stream(self) -> FlattenStream<Self>
where - Self::Output: Stream, - Self: Sized,

Flatten the execution of this future when the successful result of this -future is a stream. Read more
§

fn fuse(self) -> Fuse<Self>
where - Self: Sized,

Fuse a future such that poll will never again be called once it has -completed. This method can be used to turn any Future into a -FusedFuture. Read more
§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where - F: FnOnce(&Self::Output), - Self: Sized,

Do something with the output of a future before passing it on. Read more
§

fn catch_unwind(self) -> CatchUnwind<Self>
where - Self: Sized + UnwindSafe,

Catches unwinding panics while polling the future. Read more
§

fn shared(self) -> Shared<Self>
where - Self: Sized, - Self::Output: Clone,

Create a cloneable handle to this future where all handles will resolve -to the same result. Read more
§

fn remote_handle(self) -> (Remote<Self>, RemoteHandle<Self::Output>)
where - Self: Sized,

Turn this future into a future that yields () on completion and sends -its output to another future on a separate task. Read more
§

fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
where - Self: Sized + Send + 'a,

Wrap the future in a Box, pinning it. Read more
§

fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
where - Self: Sized + 'a,

Wrap the future in a Box, pinning it. Read more
§

fn unit_error(self) -> UnitError<Self>
where - Self: Sized,

§

fn never_error(self) -> NeverError<Self>
where - Self: Sized,

§

fn poll_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Self::Output>
where - Self: Unpin,

A convenience for calling Future::poll on Unpin future types.
§

fn now_or_never(self) -> Option<Self::Output>
where - Self: Sized,

Evaluates and consumes the future, returning the resulting output if -the future is ready after the first call to Future::poll. Read more
§

impl<T> FutureExt for T
where - T: Future + ?Sized,

§

fn with_cancellation_token( - self, - cancellation_token: &CancellationToken, -) -> WithCancellationTokenFuture<'_, Self>
where - Self: Sized,

Similar to [CancellationToken::run_until_cancelled], -but with the advantage that it is easier to write fluent call chains. Read more
§

fn with_cancellation_token_owned( - self, - cancellation_token: CancellationToken, -) -> WithCancellationTokenFutureOwned<Self>
where - Self: Sized,

Similar to [CancellationToken::run_until_cancelled_owned], -but with the advantage that it is easier to write fluent call chains. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<F> IntoFuture for F
where - F: Future,

Source§

type Output = <F as Future>::Output

The output that the future will produce on completion.
Source§

type IntoFuture = F

Which kind of future are we turning this into?
Source§

fn into_future(self) -> <F as IntoFuture>::IntoFuture

Creates a future from a value. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<F, T, E> TryFuture for F
where - F: Future<Output = Result<T, E>> + ?Sized,

§

type Ok = T

The type of successful values yielded by this future
§

type Error = E

The type of failures yielded by this future
§

fn try_poll( - self: Pin<&mut F>, - cx: &mut Context<'_>, -) -> Poll<<F as Future>::Output>

Poll this TryFuture as if it were a Future. Read more
§

impl<Fut> TryFutureExt for Fut
where - Fut: TryFuture + ?Sized,

§

fn flatten_sink<Item>(self) -> FlattenSink<Self, Self::Ok>
where - Self::Ok: Sink<Item, Error = Self::Error>, - Self: Sized,

Flattens the execution of this future when the successful result of this -future is a [Sink]. Read more
§

fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>
where - F: FnOnce(Self::Ok) -> T, - Self: Sized,

Maps this future’s success value to a different value. Read more
§

fn map_ok_or_else<T, E, F>(self, e: E, f: F) -> MapOkOrElse<Self, F, E>
where - F: FnOnce(Self::Ok) -> T, - E: FnOnce(Self::Error) -> T, - Self: Sized,

Maps this future’s success value to a different value, and permits for error handling resulting in the same type. Read more
§

fn map_err<E, F>(self, f: F) -> MapErr<Self, F>
where - F: FnOnce(Self::Error) -> E, - Self: Sized,

Maps this future’s error value to a different value. Read more
§

fn err_into<E>(self) -> ErrInto<Self, E>
where - Self: Sized, - Self::Error: Into<E>,

Maps this future’s Error to a new error type -using the Into trait. Read more
§

fn ok_into<U>(self) -> OkInto<Self, U>
where - Self: Sized, - Self::Ok: Into<U>,

Maps this future’s Ok to a new type -using the Into trait.
§

fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>
where - F: FnOnce(Self::Ok) -> Fut, - Fut: TryFuture<Error = Self::Error>, - Self: Sized,

Executes another future after this one resolves successfully. The -success value is passed to a closure to create this subsequent future. Read more
§

fn or_else<Fut, F>(self, f: F) -> OrElse<Self, Fut, F>
where - F: FnOnce(Self::Error) -> Fut, - Fut: TryFuture<Ok = Self::Ok>, - Self: Sized,

Executes another future if this one resolves to an error. The -error value is passed to a closure to create this subsequent future. Read more
§

fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>
where - F: FnOnce(&Self::Ok), - Self: Sized,

Do something with the success value of a future before passing it on. Read more
§

fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
where - F: FnOnce(&Self::Error), - Self: Sized,

Do something with the error value of a future before passing it on. Read more
§

fn try_flatten(self) -> TryFlatten<Self, Self::Ok>
where - Self::Ok: TryFuture<Error = Self::Error>, - Self: Sized,

Flatten the execution of this future when the successful result of this -future is another future. Read more
§

fn try_flatten_stream(self) -> TryFlattenStream<Self>
where - Self::Ok: TryStream<Error = Self::Error>, - Self: Sized,

Flatten the execution of this future when the successful result of this -future is a stream. Read more
§

fn unwrap_or_else<F>(self, f: F) -> UnwrapOrElse<Self, F>
where - Self: Sized, - F: FnOnce(Self::Error) -> Self::Ok,

Unwraps this future’s output, producing a future with this future’s -Ok type as its -Output type. Read more
§

fn into_future(self) -> IntoFuture<Self>
where - Self: Sized,

Wraps a [TryFuture] into a type that implements -Future. Read more
§

fn try_poll_unpin( - &mut self, - cx: &mut Context<'_>, -) -> Poll<Result<Self::Ok, Self::Error>>
where - Self: Unpin,

A convenience method for calling [TryFuture::try_poll] on Unpin -future types.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/pool/cache/fn.builder.html b/core/target/doc/hyper_util/client/pool/cache/fn.builder.html deleted file mode 100644 index 1dcea286..00000000 --- a/core/target/doc/hyper_util/client/pool/cache/fn.builder.html +++ /dev/null @@ -1,2 +0,0 @@ -builder in hyper_util::client::pool::cache - Rust

builder

Function builder 

Source
pub fn builder() -> Builder<Ignore>
Expand description

Start a builder to construct a Cache pool.

-
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/pool/cache/index.html b/core/target/doc/hyper_util/client/pool/cache/index.html deleted file mode 100644 index e7e975a9..00000000 --- a/core/target/doc/hyper_util/client/pool/cache/index.html +++ /dev/null @@ -1,6 +0,0 @@ -hyper_util::client::pool::cache - Rust

Module cache

Module cache 

Source
Expand description

A cache of services

-

The cache is a single list of cached services, bundled with a MakeService. -Calling the cache returns either an existing service, or makes a new one. -The returned impl Service can be used to send requests, and when dropped, -it will try to be returned back to the cache.

-

Functions§

builder
Start a builder to construct a Cache pool.
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/pool/cache/internal/fn.builder.html b/core/target/doc/hyper_util/client/pool/cache/internal/fn.builder.html deleted file mode 100644 index 96ca8d12..00000000 --- a/core/target/doc/hyper_util/client/pool/cache/internal/fn.builder.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../../../../hyper_util/client/pool/cache/fn.builder.html...

- - - \ No newline at end of file diff --git a/core/target/doc/hyper_util/client/pool/cache/sidebar-items.js b/core/target/doc/hyper_util/client/pool/cache/sidebar-items.js deleted file mode 100644 index 7aa71845..00000000 --- a/core/target/doc/hyper_util/client/pool/cache/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["builder"]}; \ No newline at end of file diff --git a/core/target/doc/hyper_util/client/pool/index.html b/core/target/doc/hyper_util/client/pool/index.html deleted file mode 100644 index dd5ebdb3..00000000 --- a/core/target/doc/hyper_util/client/pool/index.html +++ /dev/null @@ -1,5 +0,0 @@ -hyper_util::client::pool - Rust

Module pool

Module pool 

Source
Expand description

Composable pool services

-

This module contains various concepts of a connection pool separated into -their own concerns. This allows for users to compose the layers, along with -any other layers, when constructing custom connection pools.

-

Modules§

cache
A cache of services
map
Map pool utilities
negotiate
Negotiate a pool of services
singleton
Singleton pools
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/pool/map/index.html b/core/target/doc/hyper_util/client/pool/map/index.html deleted file mode 100644 index e8f79371..00000000 --- a/core/target/doc/hyper_util/client/pool/map/index.html +++ /dev/null @@ -1,16 +0,0 @@ -hyper_util::client::pool::map - Rust

Module map

Module map 

Source
Expand description

Map pool utilities

-

The map isn’t a typical Service, but rather stand-alone type that can map -requests to a key and service factory. This is because the service is more -of a router, and cannot determine which inner service to check for -backpressure since it’s not know until the request is made.

-

The map implementation allows customization of extracting a key, and how to -construct a MakeService for that key.

-

§Example

-
let mut map = pool::map::Map::builder()
-    .keys(|uri| (uri.scheme().clone(), uri.authority().clone()))
-    .values(|_uri| {
-        some_http1_connector()
-    })
-    .build();
-
-let resp = map.service(req.uri()).call(req).await;

Structs§

Map
A map caching MakeServices per key.
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/pool/map/sidebar-items.js b/core/target/doc/hyper_util/client/pool/map/sidebar-items.js deleted file mode 100644 index 2ac04f0e..00000000 --- a/core/target/doc/hyper_util/client/pool/map/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"struct":["Map"]}; \ No newline at end of file diff --git a/core/target/doc/hyper_util/client/pool/map/struct.Map.html b/core/target/doc/hyper_util/client/pool/map/struct.Map.html deleted file mode 100644 index fc41f378..00000000 --- a/core/target/doc/hyper_util/client/pool/map/struct.Map.html +++ /dev/null @@ -1,42 +0,0 @@ -Map in hyper_util::client::pool::map - Rust

Map

Struct Map 

Source
pub struct Map<T, Req>
where - T: Target<Req>,
{ /* private fields */ }
Expand description

A map caching MakeServices per key.

-

Create one with the Map::builder().

-

Implementations§

Source§

impl Map<StartHere, StartHere>

Source

pub fn builder<Dst>() -> Builder<Dst, WantsKeyer, WantsServiceMaker>

Create a [Builder] to configure a new Map.

-
Source§

impl<T, Req> Map<T, Req>
where - T: Target<Req>, - T::Key: Eq + Hash,

Source

pub fn service(&mut self, req: &Req) -> &mut T::Service

Get a service after extracting the key from req.

-
Source

pub fn retain<F>(&mut self, predicate: F)
where - F: FnMut(&T::Key, &mut T::Service) -> bool,

Retains only the services specified by the predicate.

-
Source

pub fn clear(&mut self)

Clears the map, removing all key-value pairs.

-

Auto Trait Implementations§

§

impl<T, Req> Freeze for Map<T, Req>
where - T: Freeze,

§

impl<T, Req> RefUnwindSafe for Map<T, Req>
where - T: RefUnwindSafe, - <T as Target<Req>>::Key: RefUnwindSafe, - <T as Target<Req>>::Service: RefUnwindSafe,

§

impl<T, Req> Send for Map<T, Req>
where - T: Send, - <T as Target<Req>>::Key: Send, - <T as Target<Req>>::Service: Send,

§

impl<T, Req> Sync for Map<T, Req>
where - T: Sync, - <T as Target<Req>>::Key: Sync, - <T as Target<Req>>::Service: Sync,

§

impl<T, Req> Unpin for Map<T, Req>
where - T: Unpin, - <T as Target<Req>>::Key: Unpin, - <T as Target<Req>>::Service: Unpin,

§

impl<T, Req> UnwindSafe for Map<T, Req>
where - T: UnwindSafe, - <T as Target<Req>>::Key: UnwindSafe, - <T as Target<Req>>::Service: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/pool/negotiate/fn.builder.html b/core/target/doc/hyper_util/client/pool/negotiate/fn.builder.html deleted file mode 100644 index 96d9c706..00000000 --- a/core/target/doc/hyper_util/client/pool/negotiate/fn.builder.html +++ /dev/null @@ -1,2 +0,0 @@ -builder in hyper_util::client::pool::negotiate - Rust

builder

Function builder 

Source
pub fn builder() -> Builder<WantsConnect, WantsInspect, WantsFallback, WantsUpgrade>
Expand description

Start a builder to construct a Negotiate pool.

-
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/pool/negotiate/index.html b/core/target/doc/hyper_util/client/pool/negotiate/index.html deleted file mode 100644 index 785314cd..00000000 --- a/core/target/doc/hyper_util/client/pool/negotiate/index.html +++ /dev/null @@ -1,20 +0,0 @@ -hyper_util::client::pool::negotiate - Rust

Module negotiate

Module negotiate 

Source
Expand description

Negotiate a pool of services

-

The negotiate pool allows for a service that can decide between two service -types based on an intermediate return value. It differs from typical -routing since it doesn’t depend on the request, but the response.

-

The original use case is support ALPN upgrades to HTTP/2, with a fallback -to HTTP/1.

-

§Example

-
let mut pool = hyper_util::client::pool::negotiate::builder()
-    .connect(some_tls_connector)
-    .inspect(|c| c.negotiated_protocol() == b"h2")
-    .fallback(http1_layer)
-    .upgrade(http2_layer)
-    .build();
-
-// connect
-let mut svc = pool.call(http::Uri::from_static("https://hyper.rs")).await?;
-svc.ready().await;
-
-// http1 or http2 is now set up
-let resp = svc.call(some_http_req).await?;

Functions§

builder
Start a builder to construct a Negotiate pool.
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/pool/negotiate/internal/fn.builder.html b/core/target/doc/hyper_util/client/pool/negotiate/internal/fn.builder.html deleted file mode 100644 index 2fbb42a7..00000000 --- a/core/target/doc/hyper_util/client/pool/negotiate/internal/fn.builder.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../../../../hyper_util/client/pool/negotiate/fn.builder.html...

- - - \ No newline at end of file diff --git a/core/target/doc/hyper_util/client/pool/negotiate/sidebar-items.js b/core/target/doc/hyper_util/client/pool/negotiate/sidebar-items.js deleted file mode 100644 index 7aa71845..00000000 --- a/core/target/doc/hyper_util/client/pool/negotiate/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["builder"]}; \ No newline at end of file diff --git a/core/target/doc/hyper_util/client/pool/sidebar-items.js b/core/target/doc/hyper_util/client/pool/sidebar-items.js deleted file mode 100644 index 6c494eb5..00000000 --- a/core/target/doc/hyper_util/client/pool/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["cache","map","negotiate","singleton"]}; \ No newline at end of file diff --git a/core/target/doc/hyper_util/client/pool/singleton/index.html b/core/target/doc/hyper_util/client/pool/singleton/index.html deleted file mode 100644 index e373673b..00000000 --- a/core/target/doc/hyper_util/client/pool/singleton/index.html +++ /dev/null @@ -1,14 +0,0 @@ -hyper_util::client::pool::singleton - Rust

Module singleton

Module singleton 

Source
Expand description

Singleton pools

-

This ensures that only one active connection is made.

-

The singleton pool wraps a MakeService<T, Req> so that it only produces a -single Service<Req>. It bundles all concurrent calls to it, so that only -one connection is made. All calls to the singleton will return a clone of -the inner service once established.

-

This fits the HTTP/2 case well.

-

§Example

-
let mut pool = Singleton::new(some_make_svc);
-
-let svc1 = pool.call(some_dst).await?;
-
-let svc2 = pool.call(some_dst).await?;
-// svc1 == svc2

Structs§

Singleton
A singleton pool over an inner service.
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/pool/singleton/sidebar-items.js b/core/target/doc/hyper_util/client/pool/singleton/sidebar-items.js deleted file mode 100644 index 7bc6e50c..00000000 --- a/core/target/doc/hyper_util/client/pool/singleton/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"struct":["Singleton"]}; \ No newline at end of file diff --git a/core/target/doc/hyper_util/client/pool/singleton/struct.Singleton.html b/core/target/doc/hyper_util/client/pool/singleton/struct.Singleton.html deleted file mode 100644 index 1d4865d0..00000000 --- a/core/target/doc/hyper_util/client/pool/singleton/struct.Singleton.html +++ /dev/null @@ -1,45 +0,0 @@ -Singleton in hyper_util::client::pool::singleton - Rust

Singleton

Struct Singleton 

Source
pub struct Singleton<M, Dst>
where - M: Service<Dst>,
{ /* private fields */ }
Expand description

A singleton pool over an inner service.

-

The singleton wraps an inner service maker, bundling all calls to ensure -only one service is created. Once made, it returns clones of the made -service.

-

Implementations§

Source§

impl<M, Target> Singleton<M, Target>
where - M: Service<Target>, - M::Response: Clone,

Source

pub fn new(mk_svc: M) -> Self

Create a new singleton pool over an inner make service.

-
Source

pub fn retain<F>(&mut self, predicate: F)
where - F: FnMut(&mut M::Response) -> bool,

Retains the inner made service if specified by the predicate.

-
Source

pub fn is_empty(&self) -> bool

Returns whether this singleton pool is empty.

-

If this pool has created a shared instance, or is currently in the -process of creating one, this returns false.

-

Trait Implementations§

Source§

impl<M, Target> Clone for Singleton<M, Target>
where - M: Service<Target> + Clone,

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<M, Dst: Debug> Debug for Singleton<M, Dst>
where - M: Service<Dst> + Debug, - M::Response: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<M, Target> Service<Target> for Singleton<M, Target>
where - M: Service<Target>, - M::Response: Clone, - M::Error: Into<Box<dyn Error + Send + Sync>>,

Source§

type Response = Singled<<M as Service<Target>>::Response>

Responses given by the service.
Source§

type Error = SingletonError

Errors produced by the service.
Source§

type Future = SingletonFuture<<M as Service<Target>>::Future, <M as Service<Target>>::Response>

The future response value.
Source§

fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, dst: Target) -> Self::Future

Process the request and return the response asynchronously. Read more

Auto Trait Implementations§

§

impl<M, Dst> Freeze for Singleton<M, Dst>
where - M: Freeze,

§

impl<M, Dst> RefUnwindSafe for Singleton<M, Dst>
where - M: RefUnwindSafe,

§

impl<M, Dst> Send for Singleton<M, Dst>
where - M: Send, - <M as Service<Dst>>::Response: Send,

§

impl<M, Dst> Sync for Singleton<M, Dst>
where - M: Sync, - <M as Service<Dst>>::Response: Send,

§

impl<M, Dst> Unpin for Singleton<M, Dst>
where - M: Unpin,

§

impl<M, Dst> UnwindSafe for Singleton<M, Dst>
where - M: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/proxy/index.html b/core/target/doc/hyper_util/client/proxy/index.html deleted file mode 100644 index 08dfa52a..00000000 --- a/core/target/doc/hyper_util/client/proxy/index.html +++ /dev/null @@ -1,2 +0,0 @@ -hyper_util::client::proxy - Rust

Module proxy

Module proxy 

Source
Expand description

Proxy utilities

-

Modules§

matcher
Proxy matchers
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/proxy/matcher/index.html b/core/target/doc/hyper_util/client/proxy/matcher/index.html deleted file mode 100644 index ddf05595..00000000 --- a/core/target/doc/hyper_util/client/proxy/matcher/index.html +++ /dev/null @@ -1,10 +0,0 @@ -hyper_util::client::proxy::matcher - Rust

Module matcher

Module matcher 

Source
Expand description

Proxy matchers

-

This module contains different matchers to configure rules for when a proxy -should be used, and if so, with what arguments.

-

A Matcher can be constructed either using environment variables, or -a Matcher::builder().

-

Once constructed, the Matcher can be asked if it intercepts a Uri by -calling Matcher::intercept().

-

An Intercept includes the destination for the proxy, and any parsed -authentication to be used.

-

Structs§

Builder
A builder to create a Matcher.
Intercept
A matched proxy,
Matcher
A proxy matcher, usually built from environment variables.
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/proxy/matcher/sidebar-items.js b/core/target/doc/hyper_util/client/proxy/matcher/sidebar-items.js deleted file mode 100644 index bebddc87..00000000 --- a/core/target/doc/hyper_util/client/proxy/matcher/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"struct":["Builder","Intercept","Matcher"]}; \ No newline at end of file diff --git a/core/target/doc/hyper_util/client/proxy/matcher/struct.Builder.html b/core/target/doc/hyper_util/client/proxy/matcher/struct.Builder.html deleted file mode 100644 index e5196b77..00000000 --- a/core/target/doc/hyper_util/client/proxy/matcher/struct.Builder.html +++ /dev/null @@ -1,44 +0,0 @@ -Builder in hyper_util::client::proxy::matcher - Rust

Builder

Struct Builder 

Source
pub struct Builder { /* private fields */ }
Expand description

A builder to create a Matcher.

-

Construct with Matcher::builder().

-

Implementations§

Source§

impl Builder

Source

pub fn all<S>(self, val: S) -> Self
where - S: IntoValue,

Set the target proxy for all destinations.

-
Source

pub fn http<S>(self, val: S) -> Self
where - S: IntoValue,

Set the target proxy for HTTP destinations.

-
Source

pub fn https<S>(self, val: S) -> Self
where - S: IntoValue,

Set the target proxy for HTTPS destinations.

-
Source

pub fn no<S>(self, val: S) -> Self
where - S: IntoValue,

Set the “no” proxy filter.

-

The rules are as follows:

-
    -
  • Entries are expected to be comma-separated (whitespace between entries is ignored)
  • -
  • IP addresses (both IPv4 and IPv6) are allowed, as are optional subnet masks (by adding /size, -for example “192.168.1.0/24”).
  • -
  • An entry “*” matches all hostnames (this is the only wildcard allowed)
  • -
  • Any other entry is considered a domain name (and may contain a leading dot, for example google.com -and .google.com are equivalent) and would match both that domain AND all subdomains.
  • -
-

For example, if "NO_PROXY=google.com, 192.168.1.0/24" was set, all of the following would match -(and therefore would bypass the proxy):

-
    -
  • http://google.com/
  • -
  • http://www.google.com/
  • -
  • http://192.168.1.42/
  • -
-

The URL http://notgoogle.com/ would not match.

-
Source

pub fn build(self) -> Matcher

Construct a Matcher using the configured values.

-

Trait Implementations§

Source§

impl Default for Builder

Source§

fn default() -> Builder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/proxy/matcher/struct.Intercept.html b/core/target/doc/hyper_util/client/proxy/matcher/struct.Intercept.html deleted file mode 100644 index a1df20bc..00000000 --- a/core/target/doc/hyper_util/client/proxy/matcher/struct.Intercept.html +++ /dev/null @@ -1,41 +0,0 @@ -Intercept in hyper_util::client::proxy::matcher - Rust

Intercept

Struct Intercept 

Source
pub struct Intercept { /* private fields */ }
Expand description

A matched proxy,

-

This is returned by a matcher if a proxy should be used.

-

Implementations§

Source§

impl Intercept

Source

pub fn uri(&self) -> &Uri

Get the http::Uri for the target proxy.

-
Source

pub fn basic_auth(&self) -> Option<&HeaderValue>

Get any configured basic authorization.

-

This should usually be used with a Proxy-Authorization header, to -send in Basic format.

-
§Example
-
let m = Matcher::builder()
-    .all("https://Aladdin:opensesame@localhost:8887")
-    .build();
-
-let proxy = m.intercept(&uri).expect("example");
-let auth = proxy.basic_auth().expect("example");
-assert_eq!(auth, "Basic QWxhZGRpbjpvcGVuc2VzYW1l");
Source

pub fn raw_auth(&self) -> Option<(&str, &str)>

Get any configured raw authorization.

-

If not detected as another scheme, this is the username and password -that should be sent with whatever protocol the proxy handshake uses.

-
§Example
-
let m = Matcher::builder()
-    .all("socks5h://Aladdin:opensesame@localhost:8887")
-    .build();
-
-let proxy = m.intercept(&uri).expect("example");
-let auth = proxy.raw_auth().expect("example");
-assert_eq!(auth, ("Aladdin", "opensesame"));

Trait Implementations§

Source§

impl Clone for Intercept

Source§

fn clone(&self) -> Intercept

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Intercept

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/proxy/matcher/struct.Matcher.html b/core/target/doc/hyper_util/client/proxy/matcher/struct.Matcher.html deleted file mode 100644 index 6f9990af..00000000 --- a/core/target/doc/hyper_util/client/proxy/matcher/struct.Matcher.html +++ /dev/null @@ -1,38 +0,0 @@ -Matcher in hyper_util::client::proxy::matcher - Rust

Matcher

Struct Matcher 

Source
pub struct Matcher { /* private fields */ }
Expand description

A proxy matcher, usually built from environment variables.

-

Implementations§

Source§

impl Matcher

Source

pub fn from_env() -> Self

Create a matcher reading the current environment variables.

-

This checks for values in the following variables, treating them the -same as curl does:

-
    -
  • ALL_PROXY/all_proxy
  • -
  • HTTPS_PROXY/https_proxy
  • -
  • HTTP_PROXY/http_proxy
  • -
  • NO_PROXY/no_proxy
  • -
-
Source

pub fn from_system() -> Self

Create a matcher from the environment or system.

-

This checks the same environment variables as from_env(), and if not -set, checks the system configuration for values for the OS.

-

This constructor is always available, but if the client-proxy-system -feature is enabled, it will check more configuration. Use this -constructor if you want to allow users to optionally enable more, or -use from_env if you do not want the values to change based on an -enabled feature.

-
Source

pub fn builder() -> Builder

Start a builder to configure a matcher.

-
Source

pub fn intercept(&self, dst: &Uri) -> Option<Intercept>

Check if the destination should be intercepted by a proxy.

-

If the proxy rules match the destination, a new Uri will be returned -to connect to.

-

Trait Implementations§

Source§

impl Debug for Matcher

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/client/proxy/sidebar-items.js b/core/target/doc/hyper_util/client/proxy/sidebar-items.js deleted file mode 100644 index 625cb60e..00000000 --- a/core/target/doc/hyper_util/client/proxy/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["matcher"]}; \ No newline at end of file diff --git a/core/target/doc/hyper_util/client/sidebar-items.js b/core/target/doc/hyper_util/client/sidebar-items.js deleted file mode 100644 index 209ecaca..00000000 --- a/core/target/doc/hyper_util/client/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["legacy","pool","proxy"]}; \ No newline at end of file diff --git a/core/target/doc/hyper_util/index.html b/core/target/doc/hyper_util/index.html deleted file mode 100644 index ac675622..00000000 --- a/core/target/doc/hyper_util/index.html +++ /dev/null @@ -1,4 +0,0 @@ -hyper_util - Rust

Crate hyper_util

Crate hyper_util 

Source
Expand description

Utilities for working with hyper.

-

This crate is less-stable than hyper. However, -does respect Rust’s semantic version regarding breaking changes.

-

Modules§

client
HTTP client utilities
rt
Runtime utilities
server
Server utilities.
service
Service utilities.
\ No newline at end of file diff --git a/core/target/doc/hyper_util/rt/index.html b/core/target/doc/hyper_util/rt/index.html deleted file mode 100644 index e306dc21..00000000 --- a/core/target/doc/hyper_util/rt/index.html +++ /dev/null @@ -1,2 +0,0 @@ -hyper_util::rt - Rust

Module rt

Module rt 

Source
Expand description

Runtime utilities

-

Re-exports§

pub use self::tokio::TokioExecutor;
pub use self::tokio::TokioIo;
pub use self::tokio::TokioTimer;

Modules§

tokio
[tokio] runtime components integration for [hyper].
\ No newline at end of file diff --git a/core/target/doc/hyper_util/rt/sidebar-items.js b/core/target/doc/hyper_util/rt/sidebar-items.js deleted file mode 100644 index f6d7223d..00000000 --- a/core/target/doc/hyper_util/rt/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["tokio"]}; \ No newline at end of file diff --git a/core/target/doc/hyper_util/rt/tokio/index.html b/core/target/doc/hyper_util/rt/tokio/index.html deleted file mode 100644 index 8d3d47cb..00000000 --- a/core/target/doc/hyper_util/rt/tokio/index.html +++ /dev/null @@ -1,41 +0,0 @@ -hyper_util::rt::tokio - Rust

Module tokio

Module tokio 

Source
Expand description

[tokio] runtime components integration for [hyper].

-

[hyper::rt] exposes a set of traits to allow hyper to be agnostic to -its underlying asynchronous runtime. This submodule provides glue for -[tokio] users to bridge those types to [hyper]’s interfaces.

-

§IO

-

[hyper] abstracts over asynchronous readers and writers using Read -and Write, while [tokio] abstracts over this using AsyncRead -and AsyncWrite. This submodule provides a collection of IO adaptors -to bridge these two IO ecosystems together: TokioIo<I>, -WithHyperIo<I>, and WithTokioIo<I>.

-

To compare and constrast these IO adaptors and to help explain which -is the proper choice for your needs, here is a table showing which IO -traits these implement, given two types T and H which implement -Tokio’s and Hyper’s corresponding IO traits:

-
- - - - - - - - -
AsyncReadAsyncWriteReadWrite
Ttruetruefalsefalse
Hfalsefalsetruetrue
TokioIo<T>falsefalsetruetrue
TokioIo<H>truetruefalsefalse
WithHyperIo<T>truetruetruetrue
WithHyperIo<H>falsefalsefalsefalse
WithTokioIo<T>falsefalsefalsefalse
WithTokioIo<H>truetruetruetrue
-
-

For most situations, TokioIo<I> is the proper choice. This should be -constructed, wrapping some underlying [hyper] or [tokio] IO, at the -call-site of a function like [hyper::client::conn::http1::handshake].

-

TokioIo<I> switches across these ecosystems, but notably does not -preserve the existing IO trait implementations of its underlying IO. If -one wishes to extend IO with additional implementations, -WithHyperIo<I> and WithTokioIo<I> are the correct choice.

-

For example, a Tokio reader/writer can be wrapped in WithHyperIo<I>. -That will implement both sets of IO traits. Conversely, -WithTokioIo<I> will implement both sets of IO traits given a -reader/writer that implements Hyper’s Read and Write.

-

See [tokio::io] and Asynchronous IO for more -information.

-

Structs§

TokioExecutor
Future executor that utilises tokio threads.
TokioIo
A wrapper that implements Tokio’s IO traits for an inner type that -implements hyper’s IO traits, or vice versa (implements hyper’s IO -traits for a type that implements Tokio’s IO traits).
TokioTimer
A Timer that uses the tokio runtime.
WithHyperIo
Extends an underlying [tokio] I/O with [hyper] I/O implementations.
WithTokioIo
Extends an underlying [hyper] I/O with [tokio] I/O implementations.
\ No newline at end of file diff --git a/core/target/doc/hyper_util/rt/tokio/sidebar-items.js b/core/target/doc/hyper_util/rt/tokio/sidebar-items.js deleted file mode 100644 index 08b4ef57..00000000 --- a/core/target/doc/hyper_util/rt/tokio/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"struct":["TokioExecutor","TokioIo","TokioTimer","WithHyperIo","WithTokioIo"]}; \ No newline at end of file diff --git a/core/target/doc/hyper_util/rt/tokio/struct.TokioExecutor.html b/core/target/doc/hyper_util/rt/tokio/struct.TokioExecutor.html deleted file mode 100644 index 5d5750bd..00000000 --- a/core/target/doc/hyper_util/rt/tokio/struct.TokioExecutor.html +++ /dev/null @@ -1,32 +0,0 @@ -TokioExecutor in hyper_util::rt::tokio - Rust

TokioExecutor

Struct TokioExecutor 

Source
#[non_exhaustive]
pub struct TokioExecutor {}
Expand description

Future executor that utilises tokio threads.

-

Implementations§

Source§

impl TokioExecutor

Source

pub fn new() -> Self

Create new executor that relies on [tokio::spawn] to execute futures.

-

Trait Implementations§

Source§

impl Clone for TokioExecutor

Source§

fn clone(&self) -> TokioExecutor

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TokioExecutor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TokioExecutor

Source§

fn default() -> TokioExecutor

Returns the “default value” for a type. Read more
Source§

impl<Fut> Executor<Fut> for TokioExecutor
where - Fut: Future + Send + 'static, - Fut::Output: Send + 'static,

Source§

fn execute(&self, fut: Fut)

Place the future into the executor to be run.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<E, B, T> Http2ClientConnExec<B, T> for E
where - E: Clone + Executor<H2ClientFuture<B, T, E>> + Http2UpgradedExec<<B as Body>::Data>, - B: Body + 'static, - <B as Body>::Error: Into<Box<dyn Error + Sync + Send>>, - H2ClientFuture<B, T, E>: Future<Output = ()>, - T: Read + Write + Unpin,

§

fn execute_h2_future(&mut self, future: H2ClientFuture<B, T, E>)

§

impl<E, F, B> Http2ServerConnExec<F, B> for E
where - E: Clone + Executor<H2Stream<F, B, E>> + Http2UpgradedExec<<B as Body>::Data>, - H2Stream<F, B, E>: Future<Output = ()>, - B: Body,

§

fn execute_h2stream(&mut self, fut: H2Stream<F, B, E>)

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where - B: Body, - T: Http2ServerConnExec<A, B>,

\ No newline at end of file diff --git a/core/target/doc/hyper_util/rt/tokio/struct.TokioIo.html b/core/target/doc/hyper_util/rt/tokio/struct.TokioIo.html deleted file mode 100644 index c9a1666e..00000000 --- a/core/target/doc/hyper_util/rt/tokio/struct.TokioIo.html +++ /dev/null @@ -1,194 +0,0 @@ -TokioIo in hyper_util::rt::tokio - Rust

TokioIo

Struct TokioIo 

Source
pub struct TokioIo<T> { /* private fields */ }
Expand description

A wrapper that implements Tokio’s IO traits for an inner type that -implements hyper’s IO traits, or vice versa (implements hyper’s IO -traits for a type that implements Tokio’s IO traits).

-

Implementations§

Source§

impl<T> TokioIo<T>

Source

pub fn new(inner: T) -> Self

Wrap a type implementing Tokio’s or hyper’s IO traits.

-
Source

pub fn inner(&self) -> &T

Borrow the inner type.

-
Source

pub fn inner_mut(&mut self) -> &mut T

Mut borrow the inner type.

-
Source

pub fn into_inner(self) -> T

Consume this wrapper and get the inner type.

-

Trait Implementations§

Source§

impl<T> AsyncRead for TokioIo<T>
where - T: Read,

Source§

fn poll_read( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - tbuf: &mut ReadBuf<'_>, -) -> Poll<Result<(), Error>>

Attempts to read from the AsyncRead into buf. Read more
Source§

impl<T> AsyncWrite for TokioIo<T>
where - T: Write,

Source§

fn poll_write( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - buf: &[u8], -) -> Poll<Result<usize, Error>>

Attempt to write bytes from buf into the object. Read more
Source§

fn poll_flush( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Result<(), Error>>

Attempts to flush the object, ensuring that any buffered data reach -their destination. Read more
Source§

fn poll_shutdown( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Result<(), Error>>

Initiates or attempts to shut down this writer, returning success when -the I/O connection has completely shut down. Read more
Source§

fn is_write_vectored(&self) -> bool

Determines if this writer has an efficient poll_write_vectored -implementation. Read more
Source§

fn poll_write_vectored( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - bufs: &[IoSlice<'_>], -) -> Poll<Result<usize, Error>>

Like poll_write, except that it writes from a slice of buffers. Read more
Source§

impl<T> Connection for TokioIo<T>
where - T: Connection,

Source§

fn connected(&self) -> Connected

Return metadata describing the connection.
Source§

impl<T: Debug> Debug for TokioIo<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T> Read for TokioIo<T>
where - T: AsyncRead,

Source§

fn poll_read( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - buf: ReadBufCursor<'_>, -) -> Poll<Result<(), Error>>

Attempts to read bytes into the buf. Read more
Source§

impl<T> Write for TokioIo<T>
where - T: AsyncWrite,

Source§

fn poll_write( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - buf: &[u8], -) -> Poll<Result<usize, Error>>

Attempt to write bytes from buf into the destination. Read more
Source§

fn poll_flush( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Result<(), Error>>

Attempts to flush the object. Read more
Source§

fn poll_shutdown( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Result<(), Error>>

Attempts to shut down this writer.
Source§

fn is_write_vectored(&self) -> bool

Returns whether this writer has an efficient poll_write_vectored -implementation. Read more
Source§

fn poll_write_vectored( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - bufs: &[IoSlice<'_>], -) -> Poll<Result<usize, Error>>

Like poll_write, except that it writes from a slice of buffers.
Source§

impl<'__pin, T> Unpin for TokioIo<T>
where - PinnedFieldsOf<__Origin<'__pin, T>>: Unpin,

Auto Trait Implementations§

§

impl<T> Freeze for TokioIo<T>
where - T: Freeze,

§

impl<T> RefUnwindSafe for TokioIo<T>
where - T: RefUnwindSafe,

§

impl<T> Send for TokioIo<T>
where - T: Send,

§

impl<T> Sync for TokioIo<T>
where - T: Sync,

§

impl<T> UnwindSafe for TokioIo<T>
where - T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<R> AsyncReadExt for R
where - R: AsyncRead + ?Sized,

§

fn chain<R>(self, next: R) -> Chain<Self, R>
where - Self: Sized, - R: AsyncRead,

Creates a new AsyncRead instance that chains this stream with -next. Read more
§

fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self>
where - Self: Unpin,

Pulls some bytes from this source into the specified buffer, -returning how many bytes were read. Read more
§

fn read_buf<'a, B>(&'a mut self, buf: &'a mut B) -> ReadBuf<'a, Self, B>
where - Self: Unpin, - B: BufMut + ?Sized,

Pulls some bytes from this source into the specified buffer, -advancing the buffer’s internal cursor. Read more
§

fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self>
where - Self: Unpin,

Reads the exact number of bytes required to fill buf. Read more
§

fn read_u8(&mut self) -> ReadU8<&mut Self>
where - Self: Unpin,

Reads an unsigned 8 bit integer from the underlying reader. Read more
§

fn read_i8(&mut self) -> ReadI8<&mut Self>
where - Self: Unpin,

Reads a signed 8 bit integer from the underlying reader. Read more
§

fn read_u16(&mut self) -> ReadU16<&mut Self>
where - Self: Unpin,

Reads an unsigned 16-bit integer in big-endian order from the -underlying reader. Read more
§

fn read_i16(&mut self) -> ReadI16<&mut Self>
where - Self: Unpin,

Reads a signed 16-bit integer in big-endian order from the -underlying reader. Read more
§

fn read_u32(&mut self) -> ReadU32<&mut Self>
where - Self: Unpin,

Reads an unsigned 32-bit integer in big-endian order from the -underlying reader. Read more
§

fn read_i32(&mut self) -> ReadI32<&mut Self>
where - Self: Unpin,

Reads a signed 32-bit integer in big-endian order from the -underlying reader. Read more
§

fn read_u64(&mut self) -> ReadU64<&mut Self>
where - Self: Unpin,

Reads an unsigned 64-bit integer in big-endian order from the -underlying reader. Read more
§

fn read_i64(&mut self) -> ReadI64<&mut Self>
where - Self: Unpin,

Reads an signed 64-bit integer in big-endian order from the -underlying reader. Read more
§

fn read_u128(&mut self) -> ReadU128<&mut Self>
where - Self: Unpin,

Reads an unsigned 128-bit integer in big-endian order from the -underlying reader. Read more
§

fn read_i128(&mut self) -> ReadI128<&mut Self>
where - Self: Unpin,

Reads an signed 128-bit integer in big-endian order from the -underlying reader. Read more
§

fn read_f32(&mut self) -> ReadF32<&mut Self>
where - Self: Unpin,

Reads an 32-bit floating point type in big-endian order from the -underlying reader. Read more
§

fn read_f64(&mut self) -> ReadF64<&mut Self>
where - Self: Unpin,

Reads an 64-bit floating point type in big-endian order from the -underlying reader. Read more
§

fn read_u16_le(&mut self) -> ReadU16Le<&mut Self>
where - Self: Unpin,

Reads an unsigned 16-bit integer in little-endian order from the -underlying reader. Read more
§

fn read_i16_le(&mut self) -> ReadI16Le<&mut Self>
where - Self: Unpin,

Reads a signed 16-bit integer in little-endian order from the -underlying reader. Read more
§

fn read_u32_le(&mut self) -> ReadU32Le<&mut Self>
where - Self: Unpin,

Reads an unsigned 32-bit integer in little-endian order from the -underlying reader. Read more
§

fn read_i32_le(&mut self) -> ReadI32Le<&mut Self>
where - Self: Unpin,

Reads a signed 32-bit integer in little-endian order from the -underlying reader. Read more
§

fn read_u64_le(&mut self) -> ReadU64Le<&mut Self>
where - Self: Unpin,

Reads an unsigned 64-bit integer in little-endian order from the -underlying reader. Read more
§

fn read_i64_le(&mut self) -> ReadI64Le<&mut Self>
where - Self: Unpin,

Reads an signed 64-bit integer in little-endian order from the -underlying reader. Read more
§

fn read_u128_le(&mut self) -> ReadU128Le<&mut Self>
where - Self: Unpin,

Reads an unsigned 128-bit integer in little-endian order from the -underlying reader. Read more
§

fn read_i128_le(&mut self) -> ReadI128Le<&mut Self>
where - Self: Unpin,

Reads an signed 128-bit integer in little-endian order from the -underlying reader. Read more
§

fn read_f32_le(&mut self) -> ReadF32Le<&mut Self>
where - Self: Unpin,

Reads an 32-bit floating point type in little-endian order from the -underlying reader. Read more
§

fn read_f64_le(&mut self) -> ReadF64Le<&mut Self>
where - Self: Unpin,

Reads an 64-bit floating point type in little-endian order from the -underlying reader. Read more
§

fn read_to_end<'a>(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEnd<'a, Self>
where - Self: Unpin,

Reads all bytes until EOF in this source, placing them into buf. Read more
§

fn read_to_string<'a>( - &'a mut self, - dst: &'a mut String, -) -> ReadToString<'a, Self>
where - Self: Unpin,

Reads all bytes until EOF in this source, appending them to buf. Read more
§

fn take(self, limit: u64) -> Take<Self>
where - Self: Sized,

Creates an adaptor which reads at most limit bytes from it. Read more
§

impl<W> AsyncWriteExt for W
where - W: AsyncWrite + ?Sized,

§

fn write<'a>(&'a mut self, src: &'a [u8]) -> Write<'a, Self>
where - Self: Unpin,

Writes a buffer into this writer, returning how many bytes were -written. Read more
§

fn write_vectored<'a, 'b>( - &'a mut self, - bufs: &'a [IoSlice<'b>], -) -> WriteVectored<'a, 'b, Self>
where - Self: Unpin,

Like write, except that it writes from a slice of buffers. Read more
§

fn write_buf<'a, B>(&'a mut self, src: &'a mut B) -> WriteBuf<'a, Self, B>
where - Self: Sized + Unpin, - B: Buf,

Writes a buffer into this writer, advancing the buffer’s internal -cursor. Read more
§

fn write_all_buf<'a, B>( - &'a mut self, - src: &'a mut B, -) -> WriteAllBuf<'a, Self, B>
where - Self: Sized + Unpin, - B: Buf,

Attempts to write an entire buffer into this writer. Read more
§

fn write_all<'a>(&'a mut self, src: &'a [u8]) -> WriteAll<'a, Self>
where - Self: Unpin,

Attempts to write an entire buffer into this writer. Read more
§

fn write_u8(&mut self, n: u8) -> WriteU8<&mut Self>
where - Self: Unpin,

Writes an unsigned 8-bit integer to the underlying writer. Read more
§

fn write_i8(&mut self, n: i8) -> WriteI8<&mut Self>
where - Self: Unpin,

Writes a signed 8-bit integer to the underlying writer. Read more
§

fn write_u16(&mut self, n: u16) -> WriteU16<&mut Self>
where - Self: Unpin,

Writes an unsigned 16-bit integer in big-endian order to the -underlying writer. Read more
§

fn write_i16(&mut self, n: i16) -> WriteI16<&mut Self>
where - Self: Unpin,

Writes a signed 16-bit integer in big-endian order to the -underlying writer. Read more
§

fn write_u32(&mut self, n: u32) -> WriteU32<&mut Self>
where - Self: Unpin,

Writes an unsigned 32-bit integer in big-endian order to the -underlying writer. Read more
§

fn write_i32(&mut self, n: i32) -> WriteI32<&mut Self>
where - Self: Unpin,

Writes a signed 32-bit integer in big-endian order to the -underlying writer. Read more
§

fn write_u64(&mut self, n: u64) -> WriteU64<&mut Self>
where - Self: Unpin,

Writes an unsigned 64-bit integer in big-endian order to the -underlying writer. Read more
§

fn write_i64(&mut self, n: i64) -> WriteI64<&mut Self>
where - Self: Unpin,

Writes an signed 64-bit integer in big-endian order to the -underlying writer. Read more
§

fn write_u128(&mut self, n: u128) -> WriteU128<&mut Self>
where - Self: Unpin,

Writes an unsigned 128-bit integer in big-endian order to the -underlying writer. Read more
§

fn write_i128(&mut self, n: i128) -> WriteI128<&mut Self>
where - Self: Unpin,

Writes an signed 128-bit integer in big-endian order to the -underlying writer. Read more
§

fn write_f32(&mut self, n: f32) -> WriteF32<&mut Self>
where - Self: Unpin,

Writes an 32-bit floating point type in big-endian order to the -underlying writer. Read more
§

fn write_f64(&mut self, n: f64) -> WriteF64<&mut Self>
where - Self: Unpin,

Writes an 64-bit floating point type in big-endian order to the -underlying writer. Read more
§

fn write_u16_le(&mut self, n: u16) -> WriteU16Le<&mut Self>
where - Self: Unpin,

Writes an unsigned 16-bit integer in little-endian order to the -underlying writer. Read more
§

fn write_i16_le(&mut self, n: i16) -> WriteI16Le<&mut Self>
where - Self: Unpin,

Writes a signed 16-bit integer in little-endian order to the -underlying writer. Read more
§

fn write_u32_le(&mut self, n: u32) -> WriteU32Le<&mut Self>
where - Self: Unpin,

Writes an unsigned 32-bit integer in little-endian order to the -underlying writer. Read more
§

fn write_i32_le(&mut self, n: i32) -> WriteI32Le<&mut Self>
where - Self: Unpin,

Writes a signed 32-bit integer in little-endian order to the -underlying writer. Read more
§

fn write_u64_le(&mut self, n: u64) -> WriteU64Le<&mut Self>
where - Self: Unpin,

Writes an unsigned 64-bit integer in little-endian order to the -underlying writer. Read more
§

fn write_i64_le(&mut self, n: i64) -> WriteI64Le<&mut Self>
where - Self: Unpin,

Writes an signed 64-bit integer in little-endian order to the -underlying writer. Read more
§

fn write_u128_le(&mut self, n: u128) -> WriteU128Le<&mut Self>
where - Self: Unpin,

Writes an unsigned 128-bit integer in little-endian order to the -underlying writer. Read more
§

fn write_i128_le(&mut self, n: i128) -> WriteI128Le<&mut Self>
where - Self: Unpin,

Writes an signed 128-bit integer in little-endian order to the -underlying writer. Read more
§

fn write_f32_le(&mut self, n: f32) -> WriteF32Le<&mut Self>
where - Self: Unpin,

Writes an 32-bit floating point type in little-endian order to the -underlying writer. Read more
§

fn write_f64_le(&mut self, n: f64) -> WriteF64Le<&mut Self>
where - Self: Unpin,

Writes an 64-bit floating point type in little-endian order to the -underlying writer. Read more
§

fn flush(&mut self) -> Flush<'_, Self>
where - Self: Unpin,

Flushes this output stream, ensuring that all intermediately buffered -contents reach their destination. Read more
§

fn shutdown(&mut self) -> Shutdown<'_, Self>
where - Self: Unpin,

Shuts down the output stream, ensuring that the value can be dropped -cleanly. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/rt/tokio/struct.TokioTimer.html b/core/target/doc/hyper_util/rt/tokio/struct.TokioTimer.html deleted file mode 100644 index 53f8174c..00000000 --- a/core/target/doc/hyper_util/rt/tokio/struct.TokioTimer.html +++ /dev/null @@ -1,20 +0,0 @@ -TokioTimer in hyper_util::rt::tokio - Rust

TokioTimer

Struct TokioTimer 

Source
#[non_exhaustive]
pub struct TokioTimer;
Expand description

A Timer that uses the tokio runtime.

-

Implementations§

Source§

impl TokioTimer

Source

pub fn new() -> Self

Create a new TokioTimer

-

Trait Implementations§

Source§

impl Clone for TokioTimer

Source§

fn clone(&self) -> TokioTimer

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TokioTimer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TokioTimer

Source§

fn default() -> TokioTimer

Returns the “default value” for a type. Read more
Source§

impl Timer for TokioTimer

Source§

fn sleep(&self, duration: Duration) -> Pin<Box<dyn Sleep>>

Return a future that resolves in duration time.
Source§

fn sleep_until(&self, deadline: Instant) -> Pin<Box<dyn Sleep>>

Return a future that resolves at deadline.
Source§

fn reset(&self, sleep: &mut Pin<Box<dyn Sleep>>, new_deadline: Instant)

Reset a future to resolve at new_deadline instead.
Source§

fn now(&self) -> Instant

Return an Instant representing the current time. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/rt/tokio/struct.WithHyperIo.html b/core/target/doc/hyper_util/rt/tokio/struct.WithHyperIo.html deleted file mode 100644 index 7422bc83..00000000 --- a/core/target/doc/hyper_util/rt/tokio/struct.WithHyperIo.html +++ /dev/null @@ -1,197 +0,0 @@ -WithHyperIo in hyper_util::rt::tokio - Rust

WithHyperIo

Struct WithHyperIo 

Source
pub struct WithHyperIo<I> { /* private fields */ }
Expand description

Extends an underlying [tokio] I/O with [hyper] I/O implementations.

-

This implements [Read] and [Write] given an inner type that implements [AsyncRead] -and [AsyncWrite], respectively.

-

Implementations§

Source§

impl<I> WithHyperIo<I>

Source

pub fn new(inner: I) -> Self

Wraps the inner I/O in an WithHyperIo<I>

-
Source

pub fn inner(&self) -> &I

Returns a reference to the inner type.

-
Source

pub fn inner_mut(&mut self) -> &mut I

Returns a mutable reference to the inner type.

-
Source

pub fn into_inner(self) -> I

Consumes this wrapper and returns the inner type.

-

Trait Implementations§

Source§

impl<I> AsyncRead for WithHyperIo<I>
where - I: AsyncRead,

WithHyperIo<I> exposes its inner I’s AsyncRead implementation.

-
Source§

fn poll_read( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - buf: &mut ReadBuf<'_>, -) -> Poll<Result<(), Error>>

Attempts to read from the AsyncRead into buf. Read more
Source§

impl<I> AsyncWrite for WithHyperIo<I>
where - I: AsyncWrite,

WithHyperIo<I> exposes its inner I’s AsyncWrite implementation.

-
Source§

fn poll_write( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - buf: &[u8], -) -> Poll<Result<usize, Error>>

Attempt to write bytes from buf into the object. Read more
Source§

fn poll_flush( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Result<(), Error>>

Attempts to flush the object, ensuring that any buffered data reach -their destination. Read more
Source§

fn poll_shutdown( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Result<(), Error>>

Initiates or attempts to shut down this writer, returning success when -the I/O connection has completely shut down. Read more
Source§

fn is_write_vectored(&self) -> bool

Determines if this writer has an efficient poll_write_vectored -implementation. Read more
Source§

fn poll_write_vectored( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - bufs: &[IoSlice<'_>], -) -> Poll<Result<usize, Error>>

Like poll_write, except that it writes from a slice of buffers. Read more
Source§

impl<I: Debug> Debug for WithHyperIo<I>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<I> Read for WithHyperIo<I>
where - I: AsyncRead,

Source§

fn poll_read( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - buf: ReadBufCursor<'_>, -) -> Poll<Result<(), Error>>

Attempts to read bytes into the buf. Read more
Source§

impl<I> Write for WithHyperIo<I>
where - I: AsyncWrite,

Source§

fn poll_write( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - buf: &[u8], -) -> Poll<Result<usize, Error>>

Attempt to write bytes from buf into the destination. Read more
Source§

fn poll_flush( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Result<(), Error>>

Attempts to flush the object. Read more
Source§

fn poll_shutdown( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Result<(), Error>>

Attempts to shut down this writer.
Source§

fn is_write_vectored(&self) -> bool

Returns whether this writer has an efficient poll_write_vectored -implementation. Read more
Source§

fn poll_write_vectored( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - bufs: &[IoSlice<'_>], -) -> Poll<Result<usize, Error>>

Like poll_write, except that it writes from a slice of buffers.
Source§

impl<'__pin, I> Unpin for WithHyperIo<I>
where - PinnedFieldsOf<__Origin<'__pin, I>>: Unpin,

Auto Trait Implementations§

§

impl<I> Freeze for WithHyperIo<I>
where - I: Freeze,

§

impl<I> RefUnwindSafe for WithHyperIo<I>
where - I: RefUnwindSafe,

§

impl<I> Send for WithHyperIo<I>
where - I: Send,

§

impl<I> Sync for WithHyperIo<I>
where - I: Sync,

§

impl<I> UnwindSafe for WithHyperIo<I>
where - I: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<R> AsyncReadExt for R
where - R: AsyncRead + ?Sized,

§

fn chain<R>(self, next: R) -> Chain<Self, R>
where - Self: Sized, - R: AsyncRead,

Creates a new AsyncRead instance that chains this stream with -next. Read more
§

fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self>
where - Self: Unpin,

Pulls some bytes from this source into the specified buffer, -returning how many bytes were read. Read more
§

fn read_buf<'a, B>(&'a mut self, buf: &'a mut B) -> ReadBuf<'a, Self, B>
where - Self: Unpin, - B: BufMut + ?Sized,

Pulls some bytes from this source into the specified buffer, -advancing the buffer’s internal cursor. Read more
§

fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self>
where - Self: Unpin,

Reads the exact number of bytes required to fill buf. Read more
§

fn read_u8(&mut self) -> ReadU8<&mut Self>
where - Self: Unpin,

Reads an unsigned 8 bit integer from the underlying reader. Read more
§

fn read_i8(&mut self) -> ReadI8<&mut Self>
where - Self: Unpin,

Reads a signed 8 bit integer from the underlying reader. Read more
§

fn read_u16(&mut self) -> ReadU16<&mut Self>
where - Self: Unpin,

Reads an unsigned 16-bit integer in big-endian order from the -underlying reader. Read more
§

fn read_i16(&mut self) -> ReadI16<&mut Self>
where - Self: Unpin,

Reads a signed 16-bit integer in big-endian order from the -underlying reader. Read more
§

fn read_u32(&mut self) -> ReadU32<&mut Self>
where - Self: Unpin,

Reads an unsigned 32-bit integer in big-endian order from the -underlying reader. Read more
§

fn read_i32(&mut self) -> ReadI32<&mut Self>
where - Self: Unpin,

Reads a signed 32-bit integer in big-endian order from the -underlying reader. Read more
§

fn read_u64(&mut self) -> ReadU64<&mut Self>
where - Self: Unpin,

Reads an unsigned 64-bit integer in big-endian order from the -underlying reader. Read more
§

fn read_i64(&mut self) -> ReadI64<&mut Self>
where - Self: Unpin,

Reads an signed 64-bit integer in big-endian order from the -underlying reader. Read more
§

fn read_u128(&mut self) -> ReadU128<&mut Self>
where - Self: Unpin,

Reads an unsigned 128-bit integer in big-endian order from the -underlying reader. Read more
§

fn read_i128(&mut self) -> ReadI128<&mut Self>
where - Self: Unpin,

Reads an signed 128-bit integer in big-endian order from the -underlying reader. Read more
§

fn read_f32(&mut self) -> ReadF32<&mut Self>
where - Self: Unpin,

Reads an 32-bit floating point type in big-endian order from the -underlying reader. Read more
§

fn read_f64(&mut self) -> ReadF64<&mut Self>
where - Self: Unpin,

Reads an 64-bit floating point type in big-endian order from the -underlying reader. Read more
§

fn read_u16_le(&mut self) -> ReadU16Le<&mut Self>
where - Self: Unpin,

Reads an unsigned 16-bit integer in little-endian order from the -underlying reader. Read more
§

fn read_i16_le(&mut self) -> ReadI16Le<&mut Self>
where - Self: Unpin,

Reads a signed 16-bit integer in little-endian order from the -underlying reader. Read more
§

fn read_u32_le(&mut self) -> ReadU32Le<&mut Self>
where - Self: Unpin,

Reads an unsigned 32-bit integer in little-endian order from the -underlying reader. Read more
§

fn read_i32_le(&mut self) -> ReadI32Le<&mut Self>
where - Self: Unpin,

Reads a signed 32-bit integer in little-endian order from the -underlying reader. Read more
§

fn read_u64_le(&mut self) -> ReadU64Le<&mut Self>
where - Self: Unpin,

Reads an unsigned 64-bit integer in little-endian order from the -underlying reader. Read more
§

fn read_i64_le(&mut self) -> ReadI64Le<&mut Self>
where - Self: Unpin,

Reads an signed 64-bit integer in little-endian order from the -underlying reader. Read more
§

fn read_u128_le(&mut self) -> ReadU128Le<&mut Self>
where - Self: Unpin,

Reads an unsigned 128-bit integer in little-endian order from the -underlying reader. Read more
§

fn read_i128_le(&mut self) -> ReadI128Le<&mut Self>
where - Self: Unpin,

Reads an signed 128-bit integer in little-endian order from the -underlying reader. Read more
§

fn read_f32_le(&mut self) -> ReadF32Le<&mut Self>
where - Self: Unpin,

Reads an 32-bit floating point type in little-endian order from the -underlying reader. Read more
§

fn read_f64_le(&mut self) -> ReadF64Le<&mut Self>
where - Self: Unpin,

Reads an 64-bit floating point type in little-endian order from the -underlying reader. Read more
§

fn read_to_end<'a>(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEnd<'a, Self>
where - Self: Unpin,

Reads all bytes until EOF in this source, placing them into buf. Read more
§

fn read_to_string<'a>( - &'a mut self, - dst: &'a mut String, -) -> ReadToString<'a, Self>
where - Self: Unpin,

Reads all bytes until EOF in this source, appending them to buf. Read more
§

fn take(self, limit: u64) -> Take<Self>
where - Self: Sized,

Creates an adaptor which reads at most limit bytes from it. Read more
§

impl<W> AsyncWriteExt for W
where - W: AsyncWrite + ?Sized,

§

fn write<'a>(&'a mut self, src: &'a [u8]) -> Write<'a, Self>
where - Self: Unpin,

Writes a buffer into this writer, returning how many bytes were -written. Read more
§

fn write_vectored<'a, 'b>( - &'a mut self, - bufs: &'a [IoSlice<'b>], -) -> WriteVectored<'a, 'b, Self>
where - Self: Unpin,

Like write, except that it writes from a slice of buffers. Read more
§

fn write_buf<'a, B>(&'a mut self, src: &'a mut B) -> WriteBuf<'a, Self, B>
where - Self: Sized + Unpin, - B: Buf,

Writes a buffer into this writer, advancing the buffer’s internal -cursor. Read more
§

fn write_all_buf<'a, B>( - &'a mut self, - src: &'a mut B, -) -> WriteAllBuf<'a, Self, B>
where - Self: Sized + Unpin, - B: Buf,

Attempts to write an entire buffer into this writer. Read more
§

fn write_all<'a>(&'a mut self, src: &'a [u8]) -> WriteAll<'a, Self>
where - Self: Unpin,

Attempts to write an entire buffer into this writer. Read more
§

fn write_u8(&mut self, n: u8) -> WriteU8<&mut Self>
where - Self: Unpin,

Writes an unsigned 8-bit integer to the underlying writer. Read more
§

fn write_i8(&mut self, n: i8) -> WriteI8<&mut Self>
where - Self: Unpin,

Writes a signed 8-bit integer to the underlying writer. Read more
§

fn write_u16(&mut self, n: u16) -> WriteU16<&mut Self>
where - Self: Unpin,

Writes an unsigned 16-bit integer in big-endian order to the -underlying writer. Read more
§

fn write_i16(&mut self, n: i16) -> WriteI16<&mut Self>
where - Self: Unpin,

Writes a signed 16-bit integer in big-endian order to the -underlying writer. Read more
§

fn write_u32(&mut self, n: u32) -> WriteU32<&mut Self>
where - Self: Unpin,

Writes an unsigned 32-bit integer in big-endian order to the -underlying writer. Read more
§

fn write_i32(&mut self, n: i32) -> WriteI32<&mut Self>
where - Self: Unpin,

Writes a signed 32-bit integer in big-endian order to the -underlying writer. Read more
§

fn write_u64(&mut self, n: u64) -> WriteU64<&mut Self>
where - Self: Unpin,

Writes an unsigned 64-bit integer in big-endian order to the -underlying writer. Read more
§

fn write_i64(&mut self, n: i64) -> WriteI64<&mut Self>
where - Self: Unpin,

Writes an signed 64-bit integer in big-endian order to the -underlying writer. Read more
§

fn write_u128(&mut self, n: u128) -> WriteU128<&mut Self>
where - Self: Unpin,

Writes an unsigned 128-bit integer in big-endian order to the -underlying writer. Read more
§

fn write_i128(&mut self, n: i128) -> WriteI128<&mut Self>
where - Self: Unpin,

Writes an signed 128-bit integer in big-endian order to the -underlying writer. Read more
§

fn write_f32(&mut self, n: f32) -> WriteF32<&mut Self>
where - Self: Unpin,

Writes an 32-bit floating point type in big-endian order to the -underlying writer. Read more
§

fn write_f64(&mut self, n: f64) -> WriteF64<&mut Self>
where - Self: Unpin,

Writes an 64-bit floating point type in big-endian order to the -underlying writer. Read more
§

fn write_u16_le(&mut self, n: u16) -> WriteU16Le<&mut Self>
where - Self: Unpin,

Writes an unsigned 16-bit integer in little-endian order to the -underlying writer. Read more
§

fn write_i16_le(&mut self, n: i16) -> WriteI16Le<&mut Self>
where - Self: Unpin,

Writes a signed 16-bit integer in little-endian order to the -underlying writer. Read more
§

fn write_u32_le(&mut self, n: u32) -> WriteU32Le<&mut Self>
where - Self: Unpin,

Writes an unsigned 32-bit integer in little-endian order to the -underlying writer. Read more
§

fn write_i32_le(&mut self, n: i32) -> WriteI32Le<&mut Self>
where - Self: Unpin,

Writes a signed 32-bit integer in little-endian order to the -underlying writer. Read more
§

fn write_u64_le(&mut self, n: u64) -> WriteU64Le<&mut Self>
where - Self: Unpin,

Writes an unsigned 64-bit integer in little-endian order to the -underlying writer. Read more
§

fn write_i64_le(&mut self, n: i64) -> WriteI64Le<&mut Self>
where - Self: Unpin,

Writes an signed 64-bit integer in little-endian order to the -underlying writer. Read more
§

fn write_u128_le(&mut self, n: u128) -> WriteU128Le<&mut Self>
where - Self: Unpin,

Writes an unsigned 128-bit integer in little-endian order to the -underlying writer. Read more
§

fn write_i128_le(&mut self, n: i128) -> WriteI128Le<&mut Self>
where - Self: Unpin,

Writes an signed 128-bit integer in little-endian order to the -underlying writer. Read more
§

fn write_f32_le(&mut self, n: f32) -> WriteF32Le<&mut Self>
where - Self: Unpin,

Writes an 32-bit floating point type in little-endian order to the -underlying writer. Read more
§

fn write_f64_le(&mut self, n: f64) -> WriteF64Le<&mut Self>
where - Self: Unpin,

Writes an 64-bit floating point type in little-endian order to the -underlying writer. Read more
§

fn flush(&mut self) -> Flush<'_, Self>
where - Self: Unpin,

Flushes this output stream, ensuring that all intermediately buffered -contents reach their destination. Read more
§

fn shutdown(&mut self) -> Shutdown<'_, Self>
where - Self: Unpin,

Shuts down the output stream, ensuring that the value can be dropped -cleanly. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/rt/tokio/struct.WithTokioIo.html b/core/target/doc/hyper_util/rt/tokio/struct.WithTokioIo.html deleted file mode 100644 index c92a0c44..00000000 --- a/core/target/doc/hyper_util/rt/tokio/struct.WithTokioIo.html +++ /dev/null @@ -1,197 +0,0 @@ -WithTokioIo in hyper_util::rt::tokio - Rust

WithTokioIo

Struct WithTokioIo 

Source
pub struct WithTokioIo<I> { /* private fields */ }
Expand description

Extends an underlying [hyper] I/O with [tokio] I/O implementations.

-

This implements [AsyncRead] and [AsyncWrite] given an inner type that implements -[Read] and [Write], respectively.

-

Implementations§

Source§

impl<I> WithTokioIo<I>

Source

pub fn new(inner: I) -> Self

Wraps the inner I/O in an WithTokioIo<I>

-
Source

pub fn inner(&self) -> &I

Returns a reference to the inner type.

-
Source

pub fn inner_mut(&mut self) -> &mut I

Returns a mutable reference to the inner type.

-
Source

pub fn into_inner(self) -> I

Consumes this wrapper and returns the inner type.

-

Trait Implementations§

Source§

impl<I> AsyncRead for WithTokioIo<I>
where - I: Read,

Source§

fn poll_read( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - tbuf: &mut ReadBuf<'_>, -) -> Poll<Result<(), Error>>

Attempts to read from the AsyncRead into buf. Read more
Source§

impl<I> AsyncWrite for WithTokioIo<I>
where - I: Write,

Source§

fn poll_write( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - buf: &[u8], -) -> Poll<Result<usize, Error>>

Attempt to write bytes from buf into the object. Read more
Source§

fn poll_flush( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Result<(), Error>>

Attempts to flush the object, ensuring that any buffered data reach -their destination. Read more
Source§

fn poll_shutdown( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Result<(), Error>>

Initiates or attempts to shut down this writer, returning success when -the I/O connection has completely shut down. Read more
Source§

fn is_write_vectored(&self) -> bool

Determines if this writer has an efficient poll_write_vectored -implementation. Read more
Source§

fn poll_write_vectored( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - bufs: &[IoSlice<'_>], -) -> Poll<Result<usize, Error>>

Like poll_write, except that it writes from a slice of buffers. Read more
Source§

impl<I: Debug> Debug for WithTokioIo<I>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<I> Read for WithTokioIo<I>
where - I: Read,

WithTokioIo<I> exposes its inner I’s Read implementation.

-
Source§

fn poll_read( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - buf: ReadBufCursor<'_>, -) -> Poll<Result<(), Error>>

Attempts to read bytes into the buf. Read more
Source§

impl<I> Write for WithTokioIo<I>
where - I: Write,

WithTokioIo<I> exposes its inner I’s Write implementation.

-
Source§

fn poll_write( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - buf: &[u8], -) -> Poll<Result<usize, Error>>

Attempt to write bytes from buf into the destination. Read more
Source§

fn poll_flush( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Result<(), Error>>

Attempts to flush the object. Read more
Source§

fn poll_shutdown( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Result<(), Error>>

Attempts to shut down this writer.
Source§

fn is_write_vectored(&self) -> bool

Returns whether this writer has an efficient poll_write_vectored -implementation. Read more
Source§

fn poll_write_vectored( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - bufs: &[IoSlice<'_>], -) -> Poll<Result<usize, Error>>

Like poll_write, except that it writes from a slice of buffers.
Source§

impl<'__pin, I> Unpin for WithTokioIo<I>
where - PinnedFieldsOf<__Origin<'__pin, I>>: Unpin,

Auto Trait Implementations§

§

impl<I> Freeze for WithTokioIo<I>
where - I: Freeze,

§

impl<I> RefUnwindSafe for WithTokioIo<I>
where - I: RefUnwindSafe,

§

impl<I> Send for WithTokioIo<I>
where - I: Send,

§

impl<I> Sync for WithTokioIo<I>
where - I: Sync,

§

impl<I> UnwindSafe for WithTokioIo<I>
where - I: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<R> AsyncReadExt for R
where - R: AsyncRead + ?Sized,

§

fn chain<R>(self, next: R) -> Chain<Self, R>
where - Self: Sized, - R: AsyncRead,

Creates a new AsyncRead instance that chains this stream with -next. Read more
§

fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self>
where - Self: Unpin,

Pulls some bytes from this source into the specified buffer, -returning how many bytes were read. Read more
§

fn read_buf<'a, B>(&'a mut self, buf: &'a mut B) -> ReadBuf<'a, Self, B>
where - Self: Unpin, - B: BufMut + ?Sized,

Pulls some bytes from this source into the specified buffer, -advancing the buffer’s internal cursor. Read more
§

fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self>
where - Self: Unpin,

Reads the exact number of bytes required to fill buf. Read more
§

fn read_u8(&mut self) -> ReadU8<&mut Self>
where - Self: Unpin,

Reads an unsigned 8 bit integer from the underlying reader. Read more
§

fn read_i8(&mut self) -> ReadI8<&mut Self>
where - Self: Unpin,

Reads a signed 8 bit integer from the underlying reader. Read more
§

fn read_u16(&mut self) -> ReadU16<&mut Self>
where - Self: Unpin,

Reads an unsigned 16-bit integer in big-endian order from the -underlying reader. Read more
§

fn read_i16(&mut self) -> ReadI16<&mut Self>
where - Self: Unpin,

Reads a signed 16-bit integer in big-endian order from the -underlying reader. Read more
§

fn read_u32(&mut self) -> ReadU32<&mut Self>
where - Self: Unpin,

Reads an unsigned 32-bit integer in big-endian order from the -underlying reader. Read more
§

fn read_i32(&mut self) -> ReadI32<&mut Self>
where - Self: Unpin,

Reads a signed 32-bit integer in big-endian order from the -underlying reader. Read more
§

fn read_u64(&mut self) -> ReadU64<&mut Self>
where - Self: Unpin,

Reads an unsigned 64-bit integer in big-endian order from the -underlying reader. Read more
§

fn read_i64(&mut self) -> ReadI64<&mut Self>
where - Self: Unpin,

Reads an signed 64-bit integer in big-endian order from the -underlying reader. Read more
§

fn read_u128(&mut self) -> ReadU128<&mut Self>
where - Self: Unpin,

Reads an unsigned 128-bit integer in big-endian order from the -underlying reader. Read more
§

fn read_i128(&mut self) -> ReadI128<&mut Self>
where - Self: Unpin,

Reads an signed 128-bit integer in big-endian order from the -underlying reader. Read more
§

fn read_f32(&mut self) -> ReadF32<&mut Self>
where - Self: Unpin,

Reads an 32-bit floating point type in big-endian order from the -underlying reader. Read more
§

fn read_f64(&mut self) -> ReadF64<&mut Self>
where - Self: Unpin,

Reads an 64-bit floating point type in big-endian order from the -underlying reader. Read more
§

fn read_u16_le(&mut self) -> ReadU16Le<&mut Self>
where - Self: Unpin,

Reads an unsigned 16-bit integer in little-endian order from the -underlying reader. Read more
§

fn read_i16_le(&mut self) -> ReadI16Le<&mut Self>
where - Self: Unpin,

Reads a signed 16-bit integer in little-endian order from the -underlying reader. Read more
§

fn read_u32_le(&mut self) -> ReadU32Le<&mut Self>
where - Self: Unpin,

Reads an unsigned 32-bit integer in little-endian order from the -underlying reader. Read more
§

fn read_i32_le(&mut self) -> ReadI32Le<&mut Self>
where - Self: Unpin,

Reads a signed 32-bit integer in little-endian order from the -underlying reader. Read more
§

fn read_u64_le(&mut self) -> ReadU64Le<&mut Self>
where - Self: Unpin,

Reads an unsigned 64-bit integer in little-endian order from the -underlying reader. Read more
§

fn read_i64_le(&mut self) -> ReadI64Le<&mut Self>
where - Self: Unpin,

Reads an signed 64-bit integer in little-endian order from the -underlying reader. Read more
§

fn read_u128_le(&mut self) -> ReadU128Le<&mut Self>
where - Self: Unpin,

Reads an unsigned 128-bit integer in little-endian order from the -underlying reader. Read more
§

fn read_i128_le(&mut self) -> ReadI128Le<&mut Self>
where - Self: Unpin,

Reads an signed 128-bit integer in little-endian order from the -underlying reader. Read more
§

fn read_f32_le(&mut self) -> ReadF32Le<&mut Self>
where - Self: Unpin,

Reads an 32-bit floating point type in little-endian order from the -underlying reader. Read more
§

fn read_f64_le(&mut self) -> ReadF64Le<&mut Self>
where - Self: Unpin,

Reads an 64-bit floating point type in little-endian order from the -underlying reader. Read more
§

fn read_to_end<'a>(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEnd<'a, Self>
where - Self: Unpin,

Reads all bytes until EOF in this source, placing them into buf. Read more
§

fn read_to_string<'a>( - &'a mut self, - dst: &'a mut String, -) -> ReadToString<'a, Self>
where - Self: Unpin,

Reads all bytes until EOF in this source, appending them to buf. Read more
§

fn take(self, limit: u64) -> Take<Self>
where - Self: Sized,

Creates an adaptor which reads at most limit bytes from it. Read more
§

impl<W> AsyncWriteExt for W
where - W: AsyncWrite + ?Sized,

§

fn write<'a>(&'a mut self, src: &'a [u8]) -> Write<'a, Self>
where - Self: Unpin,

Writes a buffer into this writer, returning how many bytes were -written. Read more
§

fn write_vectored<'a, 'b>( - &'a mut self, - bufs: &'a [IoSlice<'b>], -) -> WriteVectored<'a, 'b, Self>
where - Self: Unpin,

Like write, except that it writes from a slice of buffers. Read more
§

fn write_buf<'a, B>(&'a mut self, src: &'a mut B) -> WriteBuf<'a, Self, B>
where - Self: Sized + Unpin, - B: Buf,

Writes a buffer into this writer, advancing the buffer’s internal -cursor. Read more
§

fn write_all_buf<'a, B>( - &'a mut self, - src: &'a mut B, -) -> WriteAllBuf<'a, Self, B>
where - Self: Sized + Unpin, - B: Buf,

Attempts to write an entire buffer into this writer. Read more
§

fn write_all<'a>(&'a mut self, src: &'a [u8]) -> WriteAll<'a, Self>
where - Self: Unpin,

Attempts to write an entire buffer into this writer. Read more
§

fn write_u8(&mut self, n: u8) -> WriteU8<&mut Self>
where - Self: Unpin,

Writes an unsigned 8-bit integer to the underlying writer. Read more
§

fn write_i8(&mut self, n: i8) -> WriteI8<&mut Self>
where - Self: Unpin,

Writes a signed 8-bit integer to the underlying writer. Read more
§

fn write_u16(&mut self, n: u16) -> WriteU16<&mut Self>
where - Self: Unpin,

Writes an unsigned 16-bit integer in big-endian order to the -underlying writer. Read more
§

fn write_i16(&mut self, n: i16) -> WriteI16<&mut Self>
where - Self: Unpin,

Writes a signed 16-bit integer in big-endian order to the -underlying writer. Read more
§

fn write_u32(&mut self, n: u32) -> WriteU32<&mut Self>
where - Self: Unpin,

Writes an unsigned 32-bit integer in big-endian order to the -underlying writer. Read more
§

fn write_i32(&mut self, n: i32) -> WriteI32<&mut Self>
where - Self: Unpin,

Writes a signed 32-bit integer in big-endian order to the -underlying writer. Read more
§

fn write_u64(&mut self, n: u64) -> WriteU64<&mut Self>
where - Self: Unpin,

Writes an unsigned 64-bit integer in big-endian order to the -underlying writer. Read more
§

fn write_i64(&mut self, n: i64) -> WriteI64<&mut Self>
where - Self: Unpin,

Writes an signed 64-bit integer in big-endian order to the -underlying writer. Read more
§

fn write_u128(&mut self, n: u128) -> WriteU128<&mut Self>
where - Self: Unpin,

Writes an unsigned 128-bit integer in big-endian order to the -underlying writer. Read more
§

fn write_i128(&mut self, n: i128) -> WriteI128<&mut Self>
where - Self: Unpin,

Writes an signed 128-bit integer in big-endian order to the -underlying writer. Read more
§

fn write_f32(&mut self, n: f32) -> WriteF32<&mut Self>
where - Self: Unpin,

Writes an 32-bit floating point type in big-endian order to the -underlying writer. Read more
§

fn write_f64(&mut self, n: f64) -> WriteF64<&mut Self>
where - Self: Unpin,

Writes an 64-bit floating point type in big-endian order to the -underlying writer. Read more
§

fn write_u16_le(&mut self, n: u16) -> WriteU16Le<&mut Self>
where - Self: Unpin,

Writes an unsigned 16-bit integer in little-endian order to the -underlying writer. Read more
§

fn write_i16_le(&mut self, n: i16) -> WriteI16Le<&mut Self>
where - Self: Unpin,

Writes a signed 16-bit integer in little-endian order to the -underlying writer. Read more
§

fn write_u32_le(&mut self, n: u32) -> WriteU32Le<&mut Self>
where - Self: Unpin,

Writes an unsigned 32-bit integer in little-endian order to the -underlying writer. Read more
§

fn write_i32_le(&mut self, n: i32) -> WriteI32Le<&mut Self>
where - Self: Unpin,

Writes a signed 32-bit integer in little-endian order to the -underlying writer. Read more
§

fn write_u64_le(&mut self, n: u64) -> WriteU64Le<&mut Self>
where - Self: Unpin,

Writes an unsigned 64-bit integer in little-endian order to the -underlying writer. Read more
§

fn write_i64_le(&mut self, n: i64) -> WriteI64Le<&mut Self>
where - Self: Unpin,

Writes an signed 64-bit integer in little-endian order to the -underlying writer. Read more
§

fn write_u128_le(&mut self, n: u128) -> WriteU128Le<&mut Self>
where - Self: Unpin,

Writes an unsigned 128-bit integer in little-endian order to the -underlying writer. Read more
§

fn write_i128_le(&mut self, n: i128) -> WriteI128Le<&mut Self>
where - Self: Unpin,

Writes an signed 128-bit integer in little-endian order to the -underlying writer. Read more
§

fn write_f32_le(&mut self, n: f32) -> WriteF32Le<&mut Self>
where - Self: Unpin,

Writes an 32-bit floating point type in little-endian order to the -underlying writer. Read more
§

fn write_f64_le(&mut self, n: f64) -> WriteF64Le<&mut Self>
where - Self: Unpin,

Writes an 64-bit floating point type in little-endian order to the -underlying writer. Read more
§

fn flush(&mut self) -> Flush<'_, Self>
where - Self: Unpin,

Flushes this output stream, ensuring that all intermediately buffered -contents reach their destination. Read more
§

fn shutdown(&mut self) -> Shutdown<'_, Self>
where - Self: Unpin,

Shuts down the output stream, ensuring that the value can be dropped -cleanly. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/rt/tokio/with_hyper_io/struct.WithHyperIo.html b/core/target/doc/hyper_util/rt/tokio/with_hyper_io/struct.WithHyperIo.html deleted file mode 100644 index 75399431..00000000 --- a/core/target/doc/hyper_util/rt/tokio/with_hyper_io/struct.WithHyperIo.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../../../hyper_util/rt/tokio/struct.WithHyperIo.html...

- - - \ No newline at end of file diff --git a/core/target/doc/hyper_util/rt/tokio/with_tokio_io/struct.WithTokioIo.html b/core/target/doc/hyper_util/rt/tokio/with_tokio_io/struct.WithTokioIo.html deleted file mode 100644 index 2335a562..00000000 --- a/core/target/doc/hyper_util/rt/tokio/with_tokio_io/struct.WithTokioIo.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../../../hyper_util/rt/tokio/struct.WithTokioIo.html...

- - - \ No newline at end of file diff --git a/core/target/doc/hyper_util/server/conn/auto/index.html b/core/target/doc/hyper_util/server/conn/auto/index.html deleted file mode 100644 index 8762189e..00000000 --- a/core/target/doc/hyper_util/server/conn/auto/index.html +++ /dev/null @@ -1,4 +0,0 @@ -hyper_util::server::conn::auto - Rust

Module auto

Module auto 

Source
Expand description

Http1 or Http2 connection.

-

Modules§

upgrade
Upgrade utilities.

Structs§

Builder
Http1 or Http2 connection builder.
Connection
A Future representing an HTTP/1 connection, returned from -Builder::serve_connection.
Http1Builder
Http1 part of builder.
Http2Builder
Http2 part of builder.
UpgradeableConnection
An upgradable Connection, returned by -Builder::serve_upgradable_connection.

Traits§

HttpServerConnExec
Exactly equivalent to [Http2ServerConnExec].
\ No newline at end of file diff --git a/core/target/doc/hyper_util/server/conn/auto/sidebar-items.js b/core/target/doc/hyper_util/server/conn/auto/sidebar-items.js deleted file mode 100644 index 2e3c18e0..00000000 --- a/core/target/doc/hyper_util/server/conn/auto/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["upgrade"],"struct":["Builder","Connection","Http1Builder","Http2Builder","UpgradeableConnection"],"trait":["HttpServerConnExec"]}; \ No newline at end of file diff --git a/core/target/doc/hyper_util/server/conn/auto/struct.Builder.html b/core/target/doc/hyper_util/server/conn/auto/struct.Builder.html deleted file mode 100644 index 7ccea236..00000000 --- a/core/target/doc/hyper_util/server/conn/auto/struct.Builder.html +++ /dev/null @@ -1,92 +0,0 @@ -Builder in hyper_util::server::conn::auto - Rust

Builder

Struct Builder 

Source
pub struct Builder<E> { /* private fields */ }
Expand description

Http1 or Http2 connection builder.

-

Implementations§

Source§

impl<E> Builder<E>

Source

pub fn new(executor: E) -> Self

Create a new auto connection builder.

-

executor parameter should be a type that implements -Executor trait.

-
§Example
-
use hyper_util::{
-    rt::TokioExecutor,
-    server::conn::auto,
-};
-
-auto::Builder::new(TokioExecutor::new());
Source

pub fn http1(&mut self) -> Http1Builder<'_, E>

Http1 configuration.

-
Source

pub fn http2(&mut self) -> Http2Builder<'_, E>

Http2 configuration.

-
Source

pub fn http2_only(self) -> Self

Only accepts HTTP/2

-

Does not do anything if used with serve_connection_with_upgrades

-
Source

pub fn http1_only(self) -> Self

Only accepts HTTP/1

-

Does not do anything if used with serve_connection_with_upgrades

-
Source

pub fn is_http1_available(&self) -> bool

Returns true if this builder can serve an HTTP/1.1-based connection.

-
Source

pub fn is_http2_available(&self) -> bool

Returns true if this builder can serve an HTTP/2-based connection.

-
Source

pub fn title_case_headers(self, enabled: bool) -> Self

Set whether HTTP/1 connections will write header names as title case at -the socket level.

-

This setting only affects HTTP/1 connections. HTTP/2 connections are -not affected by this setting.

-

Default is false.

-
§Example
-
use hyper_util::{
-    rt::TokioExecutor,
-    server::conn::auto,
-};
-
-auto::Builder::new(TokioExecutor::new())
-    .title_case_headers(true);
Source

pub fn preserve_header_case(self, enabled: bool) -> Self

Set whether HTTP/1 connections will preserve the original case of header names.

-

This setting only affects HTTP/1 connections. HTTP/2 connections are -not affected by this setting.

-

Default is false.

-
§Example
-
use hyper_util::{
-    rt::TokioExecutor,
-    server::conn::auto,
-};
-
-auto::Builder::new(TokioExecutor::new())
-    .preserve_header_case(true);
Source

pub fn serve_connection<I, S, B>( - &self, - io: I, - service: S, -) -> Connection<'_, I, S, E>
where - S: Service<Request<Incoming>, Response = Response<B>>, - S::Future: 'static, - S::Error: Into<Box<dyn StdError + Send + Sync>>, - B: Body + 'static, - B::Error: Into<Box<dyn StdError + Send + Sync>>, - I: Read + Write + Unpin + 'static, - E: HttpServerConnExec<S::Future, B>,

Bind a connection together with a [Service].

-
Source

pub fn serve_connection_with_upgrades<I, S, B>( - &self, - io: I, - service: S, -) -> UpgradeableConnection<'_, I, S, E>
where - S: Service<Request<Incoming>, Response = Response<B>>, - S::Future: 'static, - S::Error: Into<Box<dyn StdError + Send + Sync>>, - B: Body + 'static, - B::Error: Into<Box<dyn StdError + Send + Sync>>, - I: Read + Write + Unpin + Send + 'static, - E: HttpServerConnExec<S::Future, B>,

Bind a connection together with a [Service], with the ability to -handle HTTP upgrades. This requires that the IO object implements -Send.

-

Note that if you ever want to use [hyper::upgrade::Upgraded::downcast] -with this crate, you’ll need to use hyper_util::server::conn::auto::upgrade::downcast -instead. See the documentation of the latter to understand why.

-

Trait Implementations§

Source§

impl<E: Clone> Clone for Builder<E>

Source§

fn clone(&self) -> Builder<E>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<E: Debug> Debug for Builder<E>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<E: Default> Default for Builder<E>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<E> Freeze for Builder<E>
where - E: Freeze,

§

impl<E> !RefUnwindSafe for Builder<E>

§

impl<E> Send for Builder<E>
where - E: Send,

§

impl<E> Sync for Builder<E>
where - E: Sync,

§

impl<E> Unpin for Builder<E>
where - E: Unpin,

§

impl<E> !UnwindSafe for Builder<E>

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/server/conn/auto/struct.Connection.html b/core/target/doc/hyper_util/server/conn/auto/struct.Connection.html deleted file mode 100644 index a68809c8..00000000 --- a/core/target/doc/hyper_util/server/conn/auto/struct.Connection.html +++ /dev/null @@ -1,169 +0,0 @@ -Connection in hyper_util::server::conn::auto - Rust

Connection

Struct Connection 

Source
pub struct Connection<'a, I, S, E>
where - S: HttpService<Incoming>,
{ /* private fields */ }
Expand description

A Future representing an HTTP/1 connection, returned from -Builder::serve_connection.

-

To drive HTTP on this connection this future must be polled, typically with -.await. If it isn’t polled, no progress will be made on this connection.

-

Implementations§

Source§

impl<I, S, E, B> Connection<'_, I, S, E>
where - S: HttpService<Incoming, ResBody = B>, - S::Error: Into<Box<dyn StdError + Send + Sync>>, - I: Read + Write + Unpin, - B: Body + 'static, - B::Error: Into<Box<dyn StdError + Send + Sync>>, - E: HttpServerConnExec<S::Future, B>,

Source

pub fn graceful_shutdown(self: Pin<&mut Self>)

Start a graceful shutdown process for this connection.

-

This Connection should continue to be polled until shutdown can finish.

-
§Note
-

This should only be called while the Connection future is still pending. If called after -Connection::poll has resolved, this does nothing.

-
Source

pub fn into_owned(self) -> Connection<'static, I, S, E>
where - Builder<E>: Clone,

Make this Connection static, instead of borrowing from Builder.

-

Trait Implementations§

Source§

impl<I, S, E, B> Future for Connection<'_, I, S, E>
where - S: Service<Request<Incoming>, Response = Response<B>>, - S::Future: 'static, - S::Error: Into<Box<dyn StdError + Send + Sync>>, - B: Body + 'static, - B::Error: Into<Box<dyn StdError + Send + Sync>>, - I: Read + Write + Unpin + 'static, - E: HttpServerConnExec<S::Future, B>,

Source§

type Output = Result<(), Box<dyn Error + Sync + Send>>

The type of value produced on completion.
Source§

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>

Attempts to resolve the future to a final value, registering -the current task for wakeup if the value is not yet available. Read more
Source§

impl<I, B, S, E> GracefulConnection for Connection<'_, I, S, E>
where - S: Service<Request<Incoming>, Response = Response<B>>, - S::Error: Into<Box<dyn Error + Send + Sync>>, - S::Future: 'static, - I: Read + Write + Unpin + 'static, - B: Body + 'static, - B::Error: Into<Box<dyn Error + Send + Sync>>, - E: Http2ServerConnExec<S::Future, B>,

Available on crate feature server-auto only.
Source§

type Error = Box<dyn Error + Sync + Send>

The error type returned by the connection when used as a future.
Source§

fn graceful_shutdown(self: Pin<&mut Self>)

Start a graceful shutdown process for this connection.
Source§

impl<'__pin, 'a, I, S, E> Unpin for Connection<'a, I, S, E>
where - PinnedFieldsOf<__Origin<'__pin, 'a, I, S, E>>: Unpin, - S: HttpService<Incoming>,

Auto Trait Implementations§

§

impl<'a, I, S, E> !Freeze for Connection<'a, I, S, E>

§

impl<'a, I, S, E> !RefUnwindSafe for Connection<'a, I, S, E>

§

impl<'a, I, S, E> Send for Connection<'a, I, S, E>
where - S: Send, - I: Send, - E: Send + Sync, - <S as HttpService<Incoming>>::ResBody: Send, - <S as HttpService<Incoming>>::Future: Send, - <<S as HttpService<Incoming>>::ResBody as Body>::Data: Send,

§

impl<'a, I, S, E> Sync for Connection<'a, I, S, E>
where - S: Sync, - I: Sync, - E: Sync, - <S as HttpService<Incoming>>::ResBody: Sync, - <S as HttpService<Incoming>>::Future: Sync, - <<S as HttpService<Incoming>>::ResBody as Body>::Data: Sync + Send,

§

impl<'a, I, S, E> !UnwindSafe for Connection<'a, I, S, E>

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> FutureExt for T
where - T: Future + ?Sized,

§

fn map<U, F>(self, f: F) -> Map<Self, F>
where - F: FnOnce(Self::Output) -> U, - Self: Sized,

Map this future’s output to a different type, returning a new future of -the resulting type. Read more
§

fn map_into<U>(self) -> MapInto<Self, U>
where - Self::Output: Into<U>, - Self: Sized,

Map this future’s output to a different type, returning a new future of -the resulting type. Read more
§

fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
where - F: FnOnce(Self::Output) -> Fut, - Fut: Future, - Self: Sized,

Chain on a computation for when a future finished, passing the result of -the future to the provided closure f. Read more
§

fn left_future<B>(self) -> Either<Self, B>
where - B: Future<Output = Self::Output>, - Self: Sized,

Wrap this future in an Either future, making it the left-hand variant -of that Either. Read more
§

fn right_future<A>(self) -> Either<A, Self>
where - A: Future<Output = Self::Output>, - Self: Sized,

Wrap this future in an Either future, making it the right-hand variant -of that Either. Read more
§

fn into_stream(self) -> IntoStream<Self>
where - Self: Sized,

Convert this future into a single element stream. Read more
§

fn flatten(self) -> Flatten<Self>
where - Self::Output: Future, - Self: Sized,

Flatten the execution of this future when the output of this -future is itself another future. Read more
§

fn flatten_stream(self) -> FlattenStream<Self>
where - Self::Output: Stream, - Self: Sized,

Flatten the execution of this future when the successful result of this -future is a stream. Read more
§

fn fuse(self) -> Fuse<Self>
where - Self: Sized,

Fuse a future such that poll will never again be called once it has -completed. This method can be used to turn any Future into a -FusedFuture. Read more
§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where - F: FnOnce(&Self::Output), - Self: Sized,

Do something with the output of a future before passing it on. Read more
§

fn catch_unwind(self) -> CatchUnwind<Self>
where - Self: Sized + UnwindSafe,

Catches unwinding panics while polling the future. Read more
§

fn shared(self) -> Shared<Self>
where - Self: Sized, - Self::Output: Clone,

Create a cloneable handle to this future where all handles will resolve -to the same result. Read more
§

fn remote_handle(self) -> (Remote<Self>, RemoteHandle<Self::Output>)
where - Self: Sized,

Turn this future into a future that yields () on completion and sends -its output to another future on a separate task. Read more
§

fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
where - Self: Sized + Send + 'a,

Wrap the future in a Box, pinning it. Read more
§

fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
where - Self: Sized + 'a,

Wrap the future in a Box, pinning it. Read more
§

fn unit_error(self) -> UnitError<Self>
where - Self: Sized,

§

fn never_error(self) -> NeverError<Self>
where - Self: Sized,

§

fn poll_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Self::Output>
where - Self: Unpin,

A convenience for calling Future::poll on Unpin future types.
§

fn now_or_never(self) -> Option<Self::Output>
where - Self: Sized,

Evaluates and consumes the future, returning the resulting output if -the future is ready after the first call to Future::poll. Read more
§

impl<T> FutureExt for T
where - T: Future + ?Sized,

§

fn with_cancellation_token( - self, - cancellation_token: &CancellationToken, -) -> WithCancellationTokenFuture<'_, Self>
where - Self: Sized,

Similar to [CancellationToken::run_until_cancelled], -but with the advantage that it is easier to write fluent call chains. Read more
§

fn with_cancellation_token_owned( - self, - cancellation_token: CancellationToken, -) -> WithCancellationTokenFutureOwned<Self>
where - Self: Sized,

Similar to [CancellationToken::run_until_cancelled_owned], -but with the advantage that it is easier to write fluent call chains. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<F> IntoFuture for F
where - F: Future,

Source§

type Output = <F as Future>::Output

The output that the future will produce on completion.
Source§

type IntoFuture = F

Which kind of future are we turning this into?
Source§

fn into_future(self) -> <F as IntoFuture>::IntoFuture

Creates a future from a value. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<F, T, E> TryFuture for F
where - F: Future<Output = Result<T, E>> + ?Sized,

§

type Ok = T

The type of successful values yielded by this future
§

type Error = E

The type of failures yielded by this future
§

fn try_poll( - self: Pin<&mut F>, - cx: &mut Context<'_>, -) -> Poll<<F as Future>::Output>

Poll this TryFuture as if it were a Future. Read more
§

impl<Fut> TryFutureExt for Fut
where - Fut: TryFuture + ?Sized,

§

fn flatten_sink<Item>(self) -> FlattenSink<Self, Self::Ok>
where - Self::Ok: Sink<Item, Error = Self::Error>, - Self: Sized,

Flattens the execution of this future when the successful result of this -future is a [Sink]. Read more
§

fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>
where - F: FnOnce(Self::Ok) -> T, - Self: Sized,

Maps this future’s success value to a different value. Read more
§

fn map_ok_or_else<T, E, F>(self, e: E, f: F) -> MapOkOrElse<Self, F, E>
where - F: FnOnce(Self::Ok) -> T, - E: FnOnce(Self::Error) -> T, - Self: Sized,

Maps this future’s success value to a different value, and permits for error handling resulting in the same type. Read more
§

fn map_err<E, F>(self, f: F) -> MapErr<Self, F>
where - F: FnOnce(Self::Error) -> E, - Self: Sized,

Maps this future’s error value to a different value. Read more
§

fn err_into<E>(self) -> ErrInto<Self, E>
where - Self: Sized, - Self::Error: Into<E>,

Maps this future’s Error to a new error type -using the Into trait. Read more
§

fn ok_into<U>(self) -> OkInto<Self, U>
where - Self: Sized, - Self::Ok: Into<U>,

Maps this future’s Ok to a new type -using the Into trait.
§

fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>
where - F: FnOnce(Self::Ok) -> Fut, - Fut: TryFuture<Error = Self::Error>, - Self: Sized,

Executes another future after this one resolves successfully. The -success value is passed to a closure to create this subsequent future. Read more
§

fn or_else<Fut, F>(self, f: F) -> OrElse<Self, Fut, F>
where - F: FnOnce(Self::Error) -> Fut, - Fut: TryFuture<Ok = Self::Ok>, - Self: Sized,

Executes another future if this one resolves to an error. The -error value is passed to a closure to create this subsequent future. Read more
§

fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>
where - F: FnOnce(&Self::Ok), - Self: Sized,

Do something with the success value of a future before passing it on. Read more
§

fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
where - F: FnOnce(&Self::Error), - Self: Sized,

Do something with the error value of a future before passing it on. Read more
§

fn try_flatten(self) -> TryFlatten<Self, Self::Ok>
where - Self::Ok: TryFuture<Error = Self::Error>, - Self: Sized,

Flatten the execution of this future when the successful result of this -future is another future. Read more
§

fn try_flatten_stream(self) -> TryFlattenStream<Self>
where - Self::Ok: TryStream<Error = Self::Error>, - Self: Sized,

Flatten the execution of this future when the successful result of this -future is a stream. Read more
§

fn unwrap_or_else<F>(self, f: F) -> UnwrapOrElse<Self, F>
where - Self: Sized, - F: FnOnce(Self::Error) -> Self::Ok,

Unwraps this future’s output, producing a future with this future’s -Ok type as its -Output type. Read more
§

fn into_future(self) -> IntoFuture<Self>
where - Self: Sized,

Wraps a [TryFuture] into a type that implements -Future. Read more
§

fn try_poll_unpin( - &mut self, - cx: &mut Context<'_>, -) -> Poll<Result<Self::Ok, Self::Error>>
where - Self: Unpin,

A convenience method for calling [TryFuture::try_poll] on Unpin -future types.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/server/conn/auto/struct.Http1Builder.html b/core/target/doc/hyper_util/server/conn/auto/struct.Http1Builder.html deleted file mode 100644 index ae3af512..00000000 --- a/core/target/doc/hyper_util/server/conn/auto/struct.Http1Builder.html +++ /dev/null @@ -1,112 +0,0 @@ -Http1Builder in hyper_util::server::conn::auto - Rust

Http1Builder

Struct Http1Builder 

Source
pub struct Http1Builder<'a, E> { /* private fields */ }
Expand description

Http1 part of builder.

-

Implementations§

Source§

impl<E> Http1Builder<'_, E>

Source

pub fn http2(&mut self) -> Http2Builder<'_, E>

Http2 configuration.

-
Source

pub fn auto_date_header(&mut self, enabled: bool) -> &mut Self

Set whether the date header should be included in HTTP responses.

-

Note that including the date header is recommended by RFC 7231.

-

Default is true.

-
Source

pub fn half_close(&mut self, val: bool) -> &mut Self

Set whether HTTP/1 connections should support half-closures.

-

Clients can chose to shutdown their write-side while waiting -for the server to respond. Setting this to true will -prevent closing the connection immediately if read -detects an EOF in the middle of a request.

-

Default is false.

-
Source

pub fn keep_alive(&mut self, val: bool) -> &mut Self

Enables or disables HTTP/1 keep-alive.

-

Default is true.

-
Source

pub fn title_case_headers(&mut self, enabled: bool) -> &mut Self

Set whether HTTP/1 connections will write header names as title case at -the socket level.

-

Note that this setting does not affect HTTP/2.

-

Default is false.

-
Source

pub fn ignore_invalid_headers(&mut self, enabled: bool) -> &mut Self

Set whether HTTP/1 connections will silently ignored malformed header lines.

-

If this is enabled and a header line does not start with a valid header -name, or does not include a colon at all, the line will be silently ignored -and no error will be reported.

-

Default is false.

-
Source

pub fn preserve_header_case(&mut self, enabled: bool) -> &mut Self

Set whether to support preserving original header cases.

-

Currently, this will record the original cases received, and store them -in a private extension on the Request. It will also look for and use -such an extension in any provided Response.

-

Since the relevant extension is still private, there is no way to -interact with the original cases. The only effect this can have now is -to forward the cases in a proxy-like fashion.

-

Note that this setting does not affect HTTP/2.

-

Default is false.

-
Source

pub fn max_headers(&mut self, val: usize) -> &mut Self

Set the maximum number of headers.

-

When a request is received, the parser will reserve a buffer to store headers for optimal -performance.

-

If server receives more headers than the buffer size, it responds to the client with -“431 Request Header Fields Too Large”.

-

The headers is allocated on the stack by default, which has higher performance. After -setting this value, headers will be allocated in heap memory, that is, heap memory -allocation will occur for each request, and there will be a performance drop of about 5%.

-

Note that this setting does not affect HTTP/2.

-

Default is 100.

-
Source

pub fn header_read_timeout( - &mut self, - read_timeout: impl Into<Option<Duration>>, -) -> &mut Self

Set a timeout for reading client request headers. If a client does not -transmit the entire header within this time, the connection is closed.

-

Requires a [Timer] set by Http1Builder::timer to take effect. Panics if header_read_timeout is configured -without a [Timer].

-

Pass None to disable.

-

Default is currently 30 seconds, but do not depend on that.

-
Source

pub fn writev(&mut self, val: bool) -> &mut Self

Set whether HTTP/1 connections should try to use vectored writes, -or always flatten into a single buffer.

-

Note that setting this to false may mean more copies of body data, -but may also improve performance when an IO transport doesn’t -support vectored writes well, such as most TLS implementations.

-

Setting this to true will force hyper to use queued strategy -which may eliminate unnecessary cloning on some TLS backends

-

Default is auto. In this mode hyper will try to guess which -mode to use

-
Source

pub fn max_buf_size(&mut self, max: usize) -> &mut Self

Set the maximum buffer size for the connection.

-

Default is ~400kb.

-
§Panics
-

The minimum value allowed is 8192. This method panics if the passed max is less than the minimum.

-
Source

pub fn pipeline_flush(&mut self, enabled: bool) -> &mut Self

Aggregates flushes to better support pipelined responses.

-

Experimental, may have bugs.

-

Default is false.

-
Source

pub fn timer<M>(&mut self, timer: M) -> &mut Self
where - M: Timer + Send + Sync + 'static,

Set the timer used in background tasks.

-
Source

pub async fn serve_connection<I, S, B>( - &self, - io: I, - service: S, -) -> Result<(), Box<dyn Error + Send + Sync>>
where - S: Service<Request<Incoming>, Response = Response<B>>, - S::Future: 'static, - S::Error: Into<Box<dyn StdError + Send + Sync>>, - B: Body + 'static, - B::Error: Into<Box<dyn StdError + Send + Sync>>, - I: Read + Write + Unpin + 'static, - E: HttpServerConnExec<S::Future, B>,

Bind a connection together with a [Service].

-
Source

pub fn serve_connection_with_upgrades<I, S, B>( - &self, - io: I, - service: S, -) -> UpgradeableConnection<'_, I, S, E>
where - S: Service<Request<Incoming>, Response = Response<B>>, - S::Future: 'static, - S::Error: Into<Box<dyn StdError + Send + Sync>>, - B: Body + 'static, - B::Error: Into<Box<dyn StdError + Send + Sync>>, - I: Read + Write + Unpin + Send + 'static, - E: HttpServerConnExec<S::Future, B>,

Bind a connection together with a [Service], with the ability to -handle HTTP upgrades. This requires that the IO object implements -Send.

-

Auto Trait Implementations§

§

impl<'a, E> Freeze for Http1Builder<'a, E>

§

impl<'a, E> !RefUnwindSafe for Http1Builder<'a, E>

§

impl<'a, E> Send for Http1Builder<'a, E>
where - E: Send,

§

impl<'a, E> Sync for Http1Builder<'a, E>
where - E: Sync,

§

impl<'a, E> Unpin for Http1Builder<'a, E>

§

impl<'a, E> !UnwindSafe for Http1Builder<'a, E>

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/server/conn/auto/struct.Http2Builder.html b/core/target/doc/hyper_util/server/conn/auto/struct.Http2Builder.html deleted file mode 100644 index dcd0784f..00000000 --- a/core/target/doc/hyper_util/server/conn/auto/struct.Http2Builder.html +++ /dev/null @@ -1,110 +0,0 @@ -Http2Builder in hyper_util::server::conn::auto - Rust

Http2Builder

Struct Http2Builder 

Source
pub struct Http2Builder<'a, E> { /* private fields */ }
Expand description

Http2 part of builder.

-

Implementations§

Source§

impl<E> Http2Builder<'_, E>

Source

pub fn http1(&mut self) -> Http1Builder<'_, E>

Http1 configuration.

-
Source

pub fn max_pending_accept_reset_streams( - &mut self, - max: impl Into<Option<usize>>, -) -> &mut Self

Configures the maximum number of pending reset streams allowed before a GOAWAY will be sent.

-

This will default to the default value set by the h2 crate. -As of v0.4.0, it is 20.

-

See https://github.com/hyperium/hyper/issues/2877 for more information.

-
Source

pub fn max_local_error_reset_streams( - &mut self, - max: impl Into<Option<usize>>, -) -> &mut Self

Configures the maximum number of local reset streams allowed before a GOAWAY will be sent.

-

If not set, hyper will use a default, currently of 1024.

-

If None is supplied, hyper will not apply any limit. -This is not advised, as it can potentially expose servers to DOS vulnerabilities.

-

See https://rustsec.org/advisories/RUSTSEC-2024-0003.html for more information.

-
Source

pub fn initial_stream_window_size( - &mut self, - sz: impl Into<Option<u32>>, -) -> &mut Self

Sets the SETTINGS_INITIAL_WINDOW_SIZE option for HTTP2 -stream-level flow control.

-

Passing None will do nothing.

-

If not set, hyper will use a default.

-
Source

pub fn initial_connection_window_size( - &mut self, - sz: impl Into<Option<u32>>, -) -> &mut Self

Sets the max connection-level flow control for HTTP2.

-

Passing None will do nothing.

-

If not set, hyper will use a default.

-
Source

pub fn adaptive_window(&mut self, enabled: bool) -> &mut Self

Sets whether to use an adaptive flow control.

-

Enabling this will override the limits set in -http2_initial_stream_window_size and -http2_initial_connection_window_size.

-
Source

pub fn max_frame_size(&mut self, sz: impl Into<Option<u32>>) -> &mut Self

Sets the maximum frame size to use for HTTP2.

-

Passing None will do nothing.

-

If not set, hyper will use a default.

-
Source

pub fn max_concurrent_streams( - &mut self, - max: impl Into<Option<u32>>, -) -> &mut Self

Sets the SETTINGS_MAX_CONCURRENT_STREAMS option for HTTP2 -connections.

-

Default is 200. Passing None will remove any limit.

-
Source

pub fn keep_alive_interval( - &mut self, - interval: impl Into<Option<Duration>>, -) -> &mut Self

Sets an interval for HTTP2 Ping frames should be sent to keep a -connection alive.

-

Pass None to disable HTTP2 keep-alive.

-

Default is currently disabled.

-
§Cargo Feature
Source

pub fn keep_alive_timeout(&mut self, timeout: Duration) -> &mut Self

Sets a timeout for receiving an acknowledgement of the keep-alive ping.

-

If the ping is not acknowledged within the timeout, the connection will -be closed. Does nothing if http2_keep_alive_interval is disabled.

-

Default is 20 seconds.

-
§Cargo Feature
Source

pub fn max_send_buf_size(&mut self, max: usize) -> &mut Self

Set the maximum write buffer size for each HTTP/2 stream.

-

Default is currently ~400KB, but may change.

-
§Panics
-

The value must be no larger than u32::MAX.

-
Source

pub fn enable_connect_protocol(&mut self) -> &mut Self

Source

pub fn max_header_list_size(&mut self, max: u32) -> &mut Self

Sets the max size of received header frames.

-

Default is currently ~16MB, but may change.

-
Source

pub fn timer<M>(&mut self, timer: M) -> &mut Self
where - M: Timer + Send + Sync + 'static,

Set the timer used in background tasks.

-
Source

pub fn auto_date_header(&mut self, enabled: bool) -> &mut Self

Set whether the date header should be included in HTTP responses.

-

Note that including the date header is recommended by RFC 7231.

-

Default is true.

-
Source

pub async fn serve_connection<I, S, B>( - &self, - io: I, - service: S, -) -> Result<(), Box<dyn Error + Send + Sync>>
where - S: Service<Request<Incoming>, Response = Response<B>>, - S::Future: 'static, - S::Error: Into<Box<dyn StdError + Send + Sync>>, - B: Body + 'static, - B::Error: Into<Box<dyn StdError + Send + Sync>>, - I: Read + Write + Unpin + 'static, - E: HttpServerConnExec<S::Future, B>,

Bind a connection together with a [Service].

-
Source

pub fn serve_connection_with_upgrades<I, S, B>( - &self, - io: I, - service: S, -) -> UpgradeableConnection<'_, I, S, E>
where - S: Service<Request<Incoming>, Response = Response<B>>, - S::Future: 'static, - S::Error: Into<Box<dyn StdError + Send + Sync>>, - B: Body + 'static, - B::Error: Into<Box<dyn StdError + Send + Sync>>, - I: Read + Write + Unpin + Send + 'static, - E: HttpServerConnExec<S::Future, B>,

Bind a connection together with a [Service], with the ability to -handle HTTP upgrades. This requires that the IO object implements -Send.

-

Auto Trait Implementations§

§

impl<'a, E> Freeze for Http2Builder<'a, E>

§

impl<'a, E> !RefUnwindSafe for Http2Builder<'a, E>

§

impl<'a, E> Send for Http2Builder<'a, E>
where - E: Send,

§

impl<'a, E> Sync for Http2Builder<'a, E>
where - E: Sync,

§

impl<'a, E> Unpin for Http2Builder<'a, E>

§

impl<'a, E> !UnwindSafe for Http2Builder<'a, E>

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/server/conn/auto/struct.UpgradeableConnection.html b/core/target/doc/hyper_util/server/conn/auto/struct.UpgradeableConnection.html deleted file mode 100644 index 1ddeab7d..00000000 --- a/core/target/doc/hyper_util/server/conn/auto/struct.UpgradeableConnection.html +++ /dev/null @@ -1,169 +0,0 @@ -UpgradeableConnection in hyper_util::server::conn::auto - Rust

UpgradeableConnection

Struct UpgradeableConnection 

Source
pub struct UpgradeableConnection<'a, I, S, E>
where - S: HttpService<Incoming>,
{ /* private fields */ }
Expand description

An upgradable Connection, returned by -Builder::serve_upgradable_connection.

-

To drive HTTP on this connection this future must be polled, typically with -.await. If it isn’t polled, no progress will be made on this connection.

-

Implementations§

Source§

impl<I, S, E, B> UpgradeableConnection<'_, I, S, E>
where - S: HttpService<Incoming, ResBody = B>, - S::Error: Into<Box<dyn StdError + Send + Sync>>, - I: Read + Write + Unpin, - B: Body + 'static, - B::Error: Into<Box<dyn StdError + Send + Sync>>, - E: HttpServerConnExec<S::Future, B>,

Source

pub fn graceful_shutdown(self: Pin<&mut Self>)

Start a graceful shutdown process for this connection.

-

This UpgradeableConnection should continue to be polled until shutdown can finish.

-
§Note
-

This should only be called while the Connection future is still nothing. pending. If -called after UpgradeableConnection::poll has resolved, this does nothing.

-
Source

pub fn into_owned(self) -> UpgradeableConnection<'static, I, S, E>
where - Builder<E>: Clone,

Make this Connection static, instead of borrowing from Builder.

-

Trait Implementations§

Source§

impl<I, S, E, B> Future for UpgradeableConnection<'_, I, S, E>
where - S: Service<Request<Incoming>, Response = Response<B>>, - S::Future: 'static, - S::Error: Into<Box<dyn StdError + Send + Sync>>, - B: Body + 'static, - B::Error: Into<Box<dyn StdError + Send + Sync>>, - I: Read + Write + Unpin + Send + 'static, - E: HttpServerConnExec<S::Future, B>,

Source§

type Output = Result<(), Box<dyn Error + Sync + Send>>

The type of value produced on completion.
Source§

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>

Attempts to resolve the future to a final value, registering -the current task for wakeup if the value is not yet available. Read more
Source§

impl<I, B, S, E> GracefulConnection for UpgradeableConnection<'_, I, S, E>
where - S: Service<Request<Incoming>, Response = Response<B>>, - S::Error: Into<Box<dyn Error + Send + Sync>>, - S::Future: 'static, - I: Read + Write + Unpin + Send + 'static, - B: Body + 'static, - B::Error: Into<Box<dyn Error + Send + Sync>>, - E: Http2ServerConnExec<S::Future, B>,

Available on crate feature server-auto only.
Source§

type Error = Box<dyn Error + Sync + Send>

The error type returned by the connection when used as a future.
Source§

fn graceful_shutdown(self: Pin<&mut Self>)

Start a graceful shutdown process for this connection.
Source§

impl<'__pin, 'a, I, S, E> Unpin for UpgradeableConnection<'a, I, S, E>
where - PinnedFieldsOf<__Origin<'__pin, 'a, I, S, E>>: Unpin, - S: HttpService<Incoming>,

Auto Trait Implementations§

§

impl<'a, I, S, E> !Freeze for UpgradeableConnection<'a, I, S, E>

§

impl<'a, I, S, E> !RefUnwindSafe for UpgradeableConnection<'a, I, S, E>

§

impl<'a, I, S, E> Send for UpgradeableConnection<'a, I, S, E>
where - S: Send, - I: Send, - E: Send + Sync, - <S as HttpService<Incoming>>::ResBody: Send, - <S as HttpService<Incoming>>::Future: Send, - <<S as HttpService<Incoming>>::ResBody as Body>::Data: Send,

§

impl<'a, I, S, E> Sync for UpgradeableConnection<'a, I, S, E>
where - S: Sync, - I: Sync, - E: Sync, - <S as HttpService<Incoming>>::ResBody: Sync, - <S as HttpService<Incoming>>::Future: Sync, - <<S as HttpService<Incoming>>::ResBody as Body>::Data: Sync + Send,

§

impl<'a, I, S, E> !UnwindSafe for UpgradeableConnection<'a, I, S, E>

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> FutureExt for T
where - T: Future + ?Sized,

§

fn map<U, F>(self, f: F) -> Map<Self, F>
where - F: FnOnce(Self::Output) -> U, - Self: Sized,

Map this future’s output to a different type, returning a new future of -the resulting type. Read more
§

fn map_into<U>(self) -> MapInto<Self, U>
where - Self::Output: Into<U>, - Self: Sized,

Map this future’s output to a different type, returning a new future of -the resulting type. Read more
§

fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
where - F: FnOnce(Self::Output) -> Fut, - Fut: Future, - Self: Sized,

Chain on a computation for when a future finished, passing the result of -the future to the provided closure f. Read more
§

fn left_future<B>(self) -> Either<Self, B>
where - B: Future<Output = Self::Output>, - Self: Sized,

Wrap this future in an Either future, making it the left-hand variant -of that Either. Read more
§

fn right_future<A>(self) -> Either<A, Self>
where - A: Future<Output = Self::Output>, - Self: Sized,

Wrap this future in an Either future, making it the right-hand variant -of that Either. Read more
§

fn into_stream(self) -> IntoStream<Self>
where - Self: Sized,

Convert this future into a single element stream. Read more
§

fn flatten(self) -> Flatten<Self>
where - Self::Output: Future, - Self: Sized,

Flatten the execution of this future when the output of this -future is itself another future. Read more
§

fn flatten_stream(self) -> FlattenStream<Self>
where - Self::Output: Stream, - Self: Sized,

Flatten the execution of this future when the successful result of this -future is a stream. Read more
§

fn fuse(self) -> Fuse<Self>
where - Self: Sized,

Fuse a future such that poll will never again be called once it has -completed. This method can be used to turn any Future into a -FusedFuture. Read more
§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where - F: FnOnce(&Self::Output), - Self: Sized,

Do something with the output of a future before passing it on. Read more
§

fn catch_unwind(self) -> CatchUnwind<Self>
where - Self: Sized + UnwindSafe,

Catches unwinding panics while polling the future. Read more
§

fn shared(self) -> Shared<Self>
where - Self: Sized, - Self::Output: Clone,

Create a cloneable handle to this future where all handles will resolve -to the same result. Read more
§

fn remote_handle(self) -> (Remote<Self>, RemoteHandle<Self::Output>)
where - Self: Sized,

Turn this future into a future that yields () on completion and sends -its output to another future on a separate task. Read more
§

fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
where - Self: Sized + Send + 'a,

Wrap the future in a Box, pinning it. Read more
§

fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
where - Self: Sized + 'a,

Wrap the future in a Box, pinning it. Read more
§

fn unit_error(self) -> UnitError<Self>
where - Self: Sized,

§

fn never_error(self) -> NeverError<Self>
where - Self: Sized,

§

fn poll_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Self::Output>
where - Self: Unpin,

A convenience for calling Future::poll on Unpin future types.
§

fn now_or_never(self) -> Option<Self::Output>
where - Self: Sized,

Evaluates and consumes the future, returning the resulting output if -the future is ready after the first call to Future::poll. Read more
§

impl<T> FutureExt for T
where - T: Future + ?Sized,

§

fn with_cancellation_token( - self, - cancellation_token: &CancellationToken, -) -> WithCancellationTokenFuture<'_, Self>
where - Self: Sized,

Similar to [CancellationToken::run_until_cancelled], -but with the advantage that it is easier to write fluent call chains. Read more
§

fn with_cancellation_token_owned( - self, - cancellation_token: CancellationToken, -) -> WithCancellationTokenFutureOwned<Self>
where - Self: Sized,

Similar to [CancellationToken::run_until_cancelled_owned], -but with the advantage that it is easier to write fluent call chains. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<F> IntoFuture for F
where - F: Future,

Source§

type Output = <F as Future>::Output

The output that the future will produce on completion.
Source§

type IntoFuture = F

Which kind of future are we turning this into?
Source§

fn into_future(self) -> <F as IntoFuture>::IntoFuture

Creates a future from a value. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<F, T, E> TryFuture for F
where - F: Future<Output = Result<T, E>> + ?Sized,

§

type Ok = T

The type of successful values yielded by this future
§

type Error = E

The type of failures yielded by this future
§

fn try_poll( - self: Pin<&mut F>, - cx: &mut Context<'_>, -) -> Poll<<F as Future>::Output>

Poll this TryFuture as if it were a Future. Read more
§

impl<Fut> TryFutureExt for Fut
where - Fut: TryFuture + ?Sized,

§

fn flatten_sink<Item>(self) -> FlattenSink<Self, Self::Ok>
where - Self::Ok: Sink<Item, Error = Self::Error>, - Self: Sized,

Flattens the execution of this future when the successful result of this -future is a [Sink]. Read more
§

fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>
where - F: FnOnce(Self::Ok) -> T, - Self: Sized,

Maps this future’s success value to a different value. Read more
§

fn map_ok_or_else<T, E, F>(self, e: E, f: F) -> MapOkOrElse<Self, F, E>
where - F: FnOnce(Self::Ok) -> T, - E: FnOnce(Self::Error) -> T, - Self: Sized,

Maps this future’s success value to a different value, and permits for error handling resulting in the same type. Read more
§

fn map_err<E, F>(self, f: F) -> MapErr<Self, F>
where - F: FnOnce(Self::Error) -> E, - Self: Sized,

Maps this future’s error value to a different value. Read more
§

fn err_into<E>(self) -> ErrInto<Self, E>
where - Self: Sized, - Self::Error: Into<E>,

Maps this future’s Error to a new error type -using the Into trait. Read more
§

fn ok_into<U>(self) -> OkInto<Self, U>
where - Self: Sized, - Self::Ok: Into<U>,

Maps this future’s Ok to a new type -using the Into trait.
§

fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>
where - F: FnOnce(Self::Ok) -> Fut, - Fut: TryFuture<Error = Self::Error>, - Self: Sized,

Executes another future after this one resolves successfully. The -success value is passed to a closure to create this subsequent future. Read more
§

fn or_else<Fut, F>(self, f: F) -> OrElse<Self, Fut, F>
where - F: FnOnce(Self::Error) -> Fut, - Fut: TryFuture<Ok = Self::Ok>, - Self: Sized,

Executes another future if this one resolves to an error. The -error value is passed to a closure to create this subsequent future. Read more
§

fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>
where - F: FnOnce(&Self::Ok), - Self: Sized,

Do something with the success value of a future before passing it on. Read more
§

fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
where - F: FnOnce(&Self::Error), - Self: Sized,

Do something with the error value of a future before passing it on. Read more
§

fn try_flatten(self) -> TryFlatten<Self, Self::Ok>
where - Self::Ok: TryFuture<Error = Self::Error>, - Self: Sized,

Flatten the execution of this future when the successful result of this -future is another future. Read more
§

fn try_flatten_stream(self) -> TryFlattenStream<Self>
where - Self::Ok: TryStream<Error = Self::Error>, - Self: Sized,

Flatten the execution of this future when the successful result of this -future is a stream. Read more
§

fn unwrap_or_else<F>(self, f: F) -> UnwrapOrElse<Self, F>
where - Self: Sized, - F: FnOnce(Self::Error) -> Self::Ok,

Unwraps this future’s output, producing a future with this future’s -Ok type as its -Output type. Read more
§

fn into_future(self) -> IntoFuture<Self>
where - Self: Sized,

Wraps a [TryFuture] into a type that implements -Future. Read more
§

fn try_poll_unpin( - &mut self, - cx: &mut Context<'_>, -) -> Poll<Result<Self::Ok, Self::Error>>
where - Self: Unpin,

A convenience method for calling [TryFuture::try_poll] on Unpin -future types.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/server/conn/auto/trait.HttpServerConnExec.html b/core/target/doc/hyper_util/server/conn/auto/trait.HttpServerConnExec.html deleted file mode 100644 index d4fbe375..00000000 --- a/core/target/doc/hyper_util/server/conn/auto/trait.HttpServerConnExec.html +++ /dev/null @@ -1,2 +0,0 @@ -HttpServerConnExec in hyper_util::server::conn::auto - Rust

HttpServerConnExec

Trait HttpServerConnExec 

Source
pub trait HttpServerConnExec<A, B: Body>: Http2ServerConnExec<A, B> { }
Expand description

Exactly equivalent to [Http2ServerConnExec].

-

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<A, B: Body, T: Http2ServerConnExec<A, B>> HttpServerConnExec<A, B> for T

Available on crate feature http2 only.
\ No newline at end of file diff --git a/core/target/doc/hyper_util/server/conn/auto/upgrade/fn.downcast.html b/core/target/doc/hyper_util/server/conn/auto/upgrade/fn.downcast.html deleted file mode 100644 index 2f232110..00000000 --- a/core/target/doc/hyper_util/server/conn/auto/upgrade/fn.downcast.html +++ /dev/null @@ -1,9 +0,0 @@ -downcast in hyper_util::server::conn::auto::upgrade - Rust

downcast

Function downcast 

Source
pub fn downcast<T>(upgraded: Upgraded) -> Result<Parts<T>, Upgraded>
where - T: Read + Write + Unpin + 'static,
Expand description

Tries to downcast the internal trait object to the type passed.

-

On success, returns the downcasted parts. On error, returns the Upgraded back. -This is a kludge to work around the fact that the machinery provided by -hyper_util::server::conn::auto wraps the inner T with a private type -that is not reachable from outside the crate.

-

This kludge will be removed when this machinery is added back to the main -hyper code.

-
\ No newline at end of file diff --git a/core/target/doc/hyper_util/server/conn/auto/upgrade/index.html b/core/target/doc/hyper_util/server/conn/auto/upgrade/index.html deleted file mode 100644 index 96520ca7..00000000 --- a/core/target/doc/hyper_util/server/conn/auto/upgrade/index.html +++ /dev/null @@ -1,2 +0,0 @@ -hyper_util::server::conn::auto::upgrade - Rust

Module upgrade

Module upgrade 

Source
Expand description

Upgrade utilities.

-

Structs§

Parts
The deconstructed parts of an [Upgraded] type.

Functions§

downcast
Tries to downcast the internal trait object to the type passed.
\ No newline at end of file diff --git a/core/target/doc/hyper_util/server/conn/auto/upgrade/sidebar-items.js b/core/target/doc/hyper_util/server/conn/auto/upgrade/sidebar-items.js deleted file mode 100644 index 9fab4100..00000000 --- a/core/target/doc/hyper_util/server/conn/auto/upgrade/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"fn":["downcast"],"struct":["Parts"]}; \ No newline at end of file diff --git a/core/target/doc/hyper_util/server/conn/auto/upgrade/struct.Parts.html b/core/target/doc/hyper_util/server/conn/auto/upgrade/struct.Parts.html deleted file mode 100644 index 7076254c..00000000 --- a/core/target/doc/hyper_util/server/conn/auto/upgrade/struct.Parts.html +++ /dev/null @@ -1,34 +0,0 @@ -Parts in hyper_util::server::conn::auto::upgrade - Rust

Parts

Struct Parts 

Source
#[non_exhaustive]
pub struct Parts<T> { - pub io: T, - pub read_buf: Bytes, -}
Expand description

The deconstructed parts of an [Upgraded] type.

-

Includes the original IO type, and a read buffer of bytes that the -HTTP state machine may have already read before completing an upgrade.

-

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§io: T

The original IO object used before the upgrade.

-
§read_buf: Bytes

A buffer of bytes that have been read but not processed as HTTP.

-

For instance, if the Connection is used for an HTTP upgrade request, -it is possible the server sent back the first bytes of the new protocol -along with the response upgrade.

-

You will want to check for any existing bytes if you plan to continue -communicating on the IO object.

-

Trait Implementations§

Source§

impl<T: Debug> Debug for Parts<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> !Freeze for Parts<T>

§

impl<T> RefUnwindSafe for Parts<T>
where - T: RefUnwindSafe,

§

impl<T> Send for Parts<T>
where - T: Send,

§

impl<T> Sync for Parts<T>
where - T: Sync,

§

impl<T> Unpin for Parts<T>
where - T: Unpin,

§

impl<T> UnwindSafe for Parts<T>
where - T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/server/conn/index.html b/core/target/doc/hyper_util/server/conn/index.html deleted file mode 100644 index 52ec8493..00000000 --- a/core/target/doc/hyper_util/server/conn/index.html +++ /dev/null @@ -1,2 +0,0 @@ -hyper_util::server::conn - Rust

Module conn

Module conn 

Source
Expand description

Connection utilities.

-

Modules§

auto
Http1 or Http2 connection.
\ No newline at end of file diff --git a/core/target/doc/hyper_util/server/conn/sidebar-items.js b/core/target/doc/hyper_util/server/conn/sidebar-items.js deleted file mode 100644 index 9c5a75e3..00000000 --- a/core/target/doc/hyper_util/server/conn/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["auto"]}; \ No newline at end of file diff --git a/core/target/doc/hyper_util/server/graceful/index.html b/core/target/doc/hyper_util/server/graceful/index.html deleted file mode 100644 index a3562539..00000000 --- a/core/target/doc/hyper_util/server/graceful/index.html +++ /dev/null @@ -1,7 +0,0 @@ -hyper_util::server::graceful - Rust

Module graceful

Module graceful 

Source
Expand description

Utility to gracefully shutdown a server.

-

This module provides a GracefulShutdown type, -which can be used to gracefully shutdown a server.

-

See https://github.com/hyperium/hyper-util/blob/master/examples/server_graceful.rs -for an example of how to use this.

-

Structs§

GracefulShutdown
A graceful shutdown utility
Watcher
A watcher side of the graceful shutdown.

Traits§

GracefulConnection
An internal utility trait as an umbrella target for all (hyper) connection -types that the GracefulShutdown can watch.
\ No newline at end of file diff --git a/core/target/doc/hyper_util/server/graceful/sidebar-items.js b/core/target/doc/hyper_util/server/graceful/sidebar-items.js deleted file mode 100644 index 7264c5b8..00000000 --- a/core/target/doc/hyper_util/server/graceful/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"struct":["GracefulShutdown","Watcher"],"trait":["GracefulConnection"]}; \ No newline at end of file diff --git a/core/target/doc/hyper_util/server/graceful/struct.GracefulShutdown.html b/core/target/doc/hyper_util/server/graceful/struct.GracefulShutdown.html deleted file mode 100644 index 66940bf2..00000000 --- a/core/target/doc/hyper_util/server/graceful/struct.GracefulShutdown.html +++ /dev/null @@ -1,29 +0,0 @@ -GracefulShutdown in hyper_util::server::graceful - Rust

GracefulShutdown

Struct GracefulShutdown 

Source
pub struct GracefulShutdown { /* private fields */ }
Expand description

A graceful shutdown utility

-

Implementations§

Source§

impl GracefulShutdown

Source

pub fn new() -> Self

Create a new graceful shutdown helper.

-
Source

pub fn watch<C: GracefulConnection>( - &self, - conn: C, -) -> impl Future<Output = C::Output>

Wrap a future for graceful shutdown watching.

-
Source

pub fn watcher(&self) -> Watcher

Create an owned type that can watch a connection.

-

This method allows created an owned type that can be sent onto another -task before calling Watcher::watch().

-
Source

pub async fn shutdown(self)

Signal shutdown for all watched connections.

-

This returns a Future which will complete once all watched -connections have shutdown.

-
Source

pub fn count(&self) -> usize

Returns the number of the watching connections.

-

Trait Implementations§

Source§

impl Debug for GracefulShutdown

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for GracefulShutdown

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/server/graceful/struct.Watcher.html b/core/target/doc/hyper_util/server/graceful/struct.Watcher.html deleted file mode 100644 index f081eeed..00000000 --- a/core/target/doc/hyper_util/server/graceful/struct.Watcher.html +++ /dev/null @@ -1,23 +0,0 @@ -Watcher in hyper_util::server::graceful - Rust

Watcher

Struct Watcher 

Source
pub struct Watcher { /* private fields */ }
Expand description

A watcher side of the graceful shutdown.

-

This type can only watch a connection, it cannot trigger a shutdown.

-

Call GracefulShutdown::watcher() to construct one of these.

-

Implementations§

Source§

impl Watcher

Source

pub fn watch<C: GracefulConnection>( - self, - conn: C, -) -> impl Future<Output = C::Output>

Wrap a future for graceful shutdown watching.

-

Trait Implementations§

Source§

impl Debug for Watcher

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/server/graceful/trait.GracefulConnection.html b/core/target/doc/hyper_util/server/graceful/trait.GracefulConnection.html deleted file mode 100644 index 319ca554..00000000 --- a/core/target/doc/hyper_util/server/graceful/trait.GracefulConnection.html +++ /dev/null @@ -1,35 +0,0 @@ -GracefulConnection in hyper_util::server::graceful - Rust

GracefulConnection

Trait GracefulConnection 

Source
pub trait GracefulConnection: Future<Output = Result<(), Self::Error>> + Sealed {
-    type Error;
-
-    // Required method
-    fn graceful_shutdown(self: Pin<&mut Self>);
-}
Expand description

An internal utility trait as an umbrella target for all (hyper) connection -types that the GracefulShutdown can watch.

-

Required Associated Types§

Source

type Error

The error type returned by the connection when used as a future.

-

Required Methods§

Source

fn graceful_shutdown(self: Pin<&mut Self>)

Start a graceful shutdown process for this connection.

-

Implementations on Foreign Types§

Source§

impl<I, B, S> GracefulConnection for Connection<I, S>
where - S: HttpService<Incoming, ResBody = B>, - S::Error: Into<Box<dyn Error + Send + Sync>>, - I: Read + Write + Unpin + 'static, - B: Body + 'static, - B::Error: Into<Box<dyn Error + Send + Sync>>,

Available on crate feature http1 only.
Source§

type Error = Error

Source§

fn graceful_shutdown(self: Pin<&mut Self>)

Source§

impl<I, B, S, E> GracefulConnection for Connection<I, S, E>
where - S: HttpService<Incoming, ResBody = B>, - S::Error: Into<Box<dyn Error + Send + Sync>>, - I: Read + Write + Unpin + 'static, - B: Body + 'static, - B::Error: Into<Box<dyn Error + Send + Sync>>, - E: Http2ServerConnExec<S::Future, B>,

Available on crate feature http2 only.
Source§

type Error = Error

Source§

fn graceful_shutdown(self: Pin<&mut Self>)

Implementors§

Source§

impl<I, B, S, E> GracefulConnection for hyper_util::server::conn::auto::Connection<'_, I, S, E>
where - S: Service<Request<Incoming>, Response = Response<B>>, - S::Error: Into<Box<dyn Error + Send + Sync>>, - S::Future: 'static, - I: Read + Write + Unpin + 'static, - B: Body + 'static, - B::Error: Into<Box<dyn Error + Send + Sync>>, - E: Http2ServerConnExec<S::Future, B>,

Available on crate feature server-auto only.
Source§

type Error = Box<dyn Error + Sync + Send>

Source§

impl<I, B, S, E> GracefulConnection for UpgradeableConnection<'_, I, S, E>
where - S: Service<Request<Incoming>, Response = Response<B>>, - S::Error: Into<Box<dyn Error + Send + Sync>>, - S::Future: 'static, - I: Read + Write + Unpin + Send + 'static, - B: Body + 'static, - B::Error: Into<Box<dyn Error + Send + Sync>>, - E: Http2ServerConnExec<S::Future, B>,

Available on crate feature server-auto only.
Source§

type Error = Box<dyn Error + Sync + Send>

\ No newline at end of file diff --git a/core/target/doc/hyper_util/server/index.html b/core/target/doc/hyper_util/server/index.html deleted file mode 100644 index 0fa65cbc..00000000 --- a/core/target/doc/hyper_util/server/index.html +++ /dev/null @@ -1,2 +0,0 @@ -hyper_util::server - Rust

Module server

Module server 

Source
Expand description

Server utilities.

-

Modules§

conn
Connection utilities.
graceful
Utility to gracefully shutdown a server.
\ No newline at end of file diff --git a/core/target/doc/hyper_util/server/sidebar-items.js b/core/target/doc/hyper_util/server/sidebar-items.js deleted file mode 100644 index 5e04a993..00000000 --- a/core/target/doc/hyper_util/server/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["conn","graceful"]}; \ No newline at end of file diff --git a/core/target/doc/hyper_util/service/glue/struct.TowerToHyperService.html b/core/target/doc/hyper_util/service/glue/struct.TowerToHyperService.html deleted file mode 100644 index facb5528..00000000 --- a/core/target/doc/hyper_util/service/glue/struct.TowerToHyperService.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../../hyper_util/service/struct.TowerToHyperService.html...

- - - \ No newline at end of file diff --git a/core/target/doc/hyper_util/service/glue/struct.TowerToHyperServiceFuture.html b/core/target/doc/hyper_util/service/glue/struct.TowerToHyperServiceFuture.html deleted file mode 100644 index 764688b1..00000000 --- a/core/target/doc/hyper_util/service/glue/struct.TowerToHyperServiceFuture.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

Redirecting to ../../../hyper_util/service/struct.TowerToHyperServiceFuture.html...

- - - \ No newline at end of file diff --git a/core/target/doc/hyper_util/service/index.html b/core/target/doc/hyper_util/service/index.html deleted file mode 100644 index d2d0585c..00000000 --- a/core/target/doc/hyper_util/service/index.html +++ /dev/null @@ -1,14 +0,0 @@ -hyper_util::service - Rust

Module service

Module service 

Source
Expand description

Service utilities.

-

[hyper::service] provides a Service trait, representing an asynchronous -function from a Request to a Response. This provides an interface allowing middleware for -network application to be written in a modular and reusable way.

-

This submodule provides an assortment of utilities for working with Services. -See the module-level documentation of [hyper::service] for more information.

-

§Tower

-

While [hyper] uses its own notion of a Service internally, many other -libraries use a library such as tower to provide the fundamental model of an -asynchronous function.

-

The TowerToHyperService type provided by this submodule can be used to bridge these -ecosystems together. By wrapping a tower::Service in TowerToHyperService, -it can be passed into [hyper] interfaces that expect a [hyper::service::Service].

-

Structs§

TowerToHyperService
A tower Service converted into a hyper Service.
TowerToHyperServiceFuture
Response future for TowerToHyperService.
\ No newline at end of file diff --git a/core/target/doc/hyper_util/service/sidebar-items.js b/core/target/doc/hyper_util/service/sidebar-items.js deleted file mode 100644 index dd2342b5..00000000 --- a/core/target/doc/hyper_util/service/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"struct":["TowerToHyperService","TowerToHyperServiceFuture"]}; \ No newline at end of file diff --git a/core/target/doc/hyper_util/service/struct.TowerToHyperService.html b/core/target/doc/hyper_util/service/struct.TowerToHyperService.html deleted file mode 100644 index 23f2cd91..00000000 --- a/core/target/doc/hyper_util/service/struct.TowerToHyperService.html +++ /dev/null @@ -1,34 +0,0 @@ -TowerToHyperService in hyper_util::service - Rust

TowerToHyperService

Struct TowerToHyperService 

Source
pub struct TowerToHyperService<S> { /* private fields */ }
Expand description

A tower Service converted into a hyper Service.

-

This wraps an inner tower service S in a [hyper::service::Service] implementation. See -the module-level documentation of service for more information about using -tower services and middleware with [hyper].

-

Implementations§

Source§

impl<S> TowerToHyperService<S>

Source

pub fn new(tower_service: S) -> Self

Create a new TowerToHyperService from a tower service.

-

Trait Implementations§

Source§

impl<S: Clone> Clone for TowerToHyperService<S>

Source§

fn clone(&self) -> TowerToHyperService<S>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<S: Debug> Debug for TowerToHyperService<S>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<S, R> Service<R> for TowerToHyperService<S>
where - S: Service<R> + Clone,

Source§

type Response = <S as Service<R>>::Response

Responses given by the service.
Source§

type Error = <S as Service<R>>::Error

Errors produced by the service. Read more
Source§

type Future = TowerToHyperServiceFuture<S, R>

The future response value.
Source§

fn call(&self, req: R) -> Self::Future

Process the request and return the response asynchronously. -call takes &self instead of mut &self because: Read more
Source§

impl<S: Copy> Copy for TowerToHyperService<S>

Auto Trait Implementations§

§

impl<S> Freeze for TowerToHyperService<S>
where - S: Freeze,

§

impl<S> RefUnwindSafe for TowerToHyperService<S>
where - S: RefUnwindSafe,

§

impl<S> Send for TowerToHyperService<S>
where - S: Send,

§

impl<S> Sync for TowerToHyperService<S>
where - S: Sync,

§

impl<S> Unpin for TowerToHyperService<S>
where - S: Unpin,

§

impl<S> UnwindSafe for TowerToHyperService<S>
where - S: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T, B1, B2> HttpService<B1> for T
where - T: Service<Request<B1>, Response = Response<B2>>, - B2: Body, - <T as Service<Request<B1>>>::Error: Into<Box<dyn Error + Sync + Send>>,

§

type ResBody = B2

The [Body] body of the [Response].
§

type Error = <T as Service<Request<B1>>>::Error

The error type that can occur within this [Service]. Read more
§

type Future = <T as Service<Request<B1>>>::Future

The Future returned by this [Service].
§

fn call(&mut self, req: Request<B1>) -> <T as HttpService<B1>>::Future

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/service/struct.TowerToHyperServiceFuture.html b/core/target/doc/hyper_util/service/struct.TowerToHyperServiceFuture.html deleted file mode 100644 index 41f6c8f2..00000000 --- a/core/target/doc/hyper_util/service/struct.TowerToHyperServiceFuture.html +++ /dev/null @@ -1,145 +0,0 @@ -TowerToHyperServiceFuture in hyper_util::service - Rust

TowerToHyperServiceFuture

Struct TowerToHyperServiceFuture 

Source
pub struct TowerToHyperServiceFuture<S, R>
where - S: Service<R>,
{ /* private fields */ }
Expand description

Response future for TowerToHyperService.

-

This future is acquired by [call][hyper::service::Service::call]ing a -TowerToHyperService.

-

Trait Implementations§

Source§

impl<S, R> Future for TowerToHyperServiceFuture<S, R>
where - S: Service<R>,

Source§

type Output = Result<<S as Service<R>>::Response, <S as Service<R>>::Error>

The type of value produced on completion.
Source§

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>

Attempts to resolve the future to a final value, registering -the current task for wakeup if the value is not yet available. Read more
Source§

impl<'__pin, S, R> Unpin for TowerToHyperServiceFuture<S, R>
where - PinnedFieldsOf<__Origin<'__pin, S, R>>: Unpin, - S: Service<R>,

Auto Trait Implementations§

§

impl<S, R> Freeze for TowerToHyperServiceFuture<S, R>
where - S: Freeze, - <S as Service<R>>::Future: Freeze, - R: Freeze,

§

impl<S, R> RefUnwindSafe for TowerToHyperServiceFuture<S, R>
where - S: RefUnwindSafe, - <S as Service<R>>::Future: RefUnwindSafe, - R: RefUnwindSafe,

§

impl<S, R> Send for TowerToHyperServiceFuture<S, R>
where - S: Send, - <S as Service<R>>::Future: Send, - R: Send,

§

impl<S, R> Sync for TowerToHyperServiceFuture<S, R>
where - S: Sync, - <S as Service<R>>::Future: Sync, - R: Sync,

§

impl<S, R> UnwindSafe for TowerToHyperServiceFuture<S, R>
where - S: UnwindSafe, - <S as Service<R>>::Future: UnwindSafe, - R: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> FutureExt for T
where - T: Future + ?Sized,

§

fn map<U, F>(self, f: F) -> Map<Self, F>
where - F: FnOnce(Self::Output) -> U, - Self: Sized,

Map this future’s output to a different type, returning a new future of -the resulting type. Read more
§

fn map_into<U>(self) -> MapInto<Self, U>
where - Self::Output: Into<U>, - Self: Sized,

Map this future’s output to a different type, returning a new future of -the resulting type. Read more
§

fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
where - F: FnOnce(Self::Output) -> Fut, - Fut: Future, - Self: Sized,

Chain on a computation for when a future finished, passing the result of -the future to the provided closure f. Read more
§

fn left_future<B>(self) -> Either<Self, B>
where - B: Future<Output = Self::Output>, - Self: Sized,

Wrap this future in an Either future, making it the left-hand variant -of that Either. Read more
§

fn right_future<A>(self) -> Either<A, Self>
where - A: Future<Output = Self::Output>, - Self: Sized,

Wrap this future in an Either future, making it the right-hand variant -of that Either. Read more
§

fn into_stream(self) -> IntoStream<Self>
where - Self: Sized,

Convert this future into a single element stream. Read more
§

fn flatten(self) -> Flatten<Self>
where - Self::Output: Future, - Self: Sized,

Flatten the execution of this future when the output of this -future is itself another future. Read more
§

fn flatten_stream(self) -> FlattenStream<Self>
where - Self::Output: Stream, - Self: Sized,

Flatten the execution of this future when the successful result of this -future is a stream. Read more
§

fn fuse(self) -> Fuse<Self>
where - Self: Sized,

Fuse a future such that poll will never again be called once it has -completed. This method can be used to turn any Future into a -FusedFuture. Read more
§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where - F: FnOnce(&Self::Output), - Self: Sized,

Do something with the output of a future before passing it on. Read more
§

fn catch_unwind(self) -> CatchUnwind<Self>
where - Self: Sized + UnwindSafe,

Catches unwinding panics while polling the future. Read more
§

fn shared(self) -> Shared<Self>
where - Self: Sized, - Self::Output: Clone,

Create a cloneable handle to this future where all handles will resolve -to the same result. Read more
§

fn remote_handle(self) -> (Remote<Self>, RemoteHandle<Self::Output>)
where - Self: Sized,

Turn this future into a future that yields () on completion and sends -its output to another future on a separate task. Read more
§

fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
where - Self: Sized + Send + 'a,

Wrap the future in a Box, pinning it. Read more
§

fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
where - Self: Sized + 'a,

Wrap the future in a Box, pinning it. Read more
§

fn unit_error(self) -> UnitError<Self>
where - Self: Sized,

§

fn never_error(self) -> NeverError<Self>
where - Self: Sized,

§

fn poll_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Self::Output>
where - Self: Unpin,

A convenience for calling Future::poll on Unpin future types.
§

fn now_or_never(self) -> Option<Self::Output>
where - Self: Sized,

Evaluates and consumes the future, returning the resulting output if -the future is ready after the first call to Future::poll. Read more
§

impl<T> FutureExt for T
where - T: Future + ?Sized,

§

fn with_cancellation_token( - self, - cancellation_token: &CancellationToken, -) -> WithCancellationTokenFuture<'_, Self>
where - Self: Sized,

Similar to [CancellationToken::run_until_cancelled], -but with the advantage that it is easier to write fluent call chains. Read more
§

fn with_cancellation_token_owned( - self, - cancellation_token: CancellationToken, -) -> WithCancellationTokenFutureOwned<Self>
where - Self: Sized,

Similar to [CancellationToken::run_until_cancelled_owned], -but with the advantage that it is easier to write fluent call chains. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
Source§

impl<F> IntoFuture for F
where - F: Future,

Source§

type Output = <F as Future>::Output

The output that the future will produce on completion.
Source§

type IntoFuture = F

Which kind of future are we turning this into?
Source§

fn into_future(self) -> <F as IntoFuture>::IntoFuture

Creates a future from a value. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<F, T, E> TryFuture for F
where - F: Future<Output = Result<T, E>> + ?Sized,

§

type Ok = T

The type of successful values yielded by this future
§

type Error = E

The type of failures yielded by this future
§

fn try_poll( - self: Pin<&mut F>, - cx: &mut Context<'_>, -) -> Poll<<F as Future>::Output>

Poll this TryFuture as if it were a Future. Read more
§

impl<Fut> TryFutureExt for Fut
where - Fut: TryFuture + ?Sized,

§

fn flatten_sink<Item>(self) -> FlattenSink<Self, Self::Ok>
where - Self::Ok: Sink<Item, Error = Self::Error>, - Self: Sized,

Flattens the execution of this future when the successful result of this -future is a [Sink]. Read more
§

fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>
where - F: FnOnce(Self::Ok) -> T, - Self: Sized,

Maps this future’s success value to a different value. Read more
§

fn map_ok_or_else<T, E, F>(self, e: E, f: F) -> MapOkOrElse<Self, F, E>
where - F: FnOnce(Self::Ok) -> T, - E: FnOnce(Self::Error) -> T, - Self: Sized,

Maps this future’s success value to a different value, and permits for error handling resulting in the same type. Read more
§

fn map_err<E, F>(self, f: F) -> MapErr<Self, F>
where - F: FnOnce(Self::Error) -> E, - Self: Sized,

Maps this future’s error value to a different value. Read more
§

fn err_into<E>(self) -> ErrInto<Self, E>
where - Self: Sized, - Self::Error: Into<E>,

Maps this future’s Error to a new error type -using the Into trait. Read more
§

fn ok_into<U>(self) -> OkInto<Self, U>
where - Self: Sized, - Self::Ok: Into<U>,

Maps this future’s Ok to a new type -using the Into trait.
§

fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>
where - F: FnOnce(Self::Ok) -> Fut, - Fut: TryFuture<Error = Self::Error>, - Self: Sized,

Executes another future after this one resolves successfully. The -success value is passed to a closure to create this subsequent future. Read more
§

fn or_else<Fut, F>(self, f: F) -> OrElse<Self, Fut, F>
where - F: FnOnce(Self::Error) -> Fut, - Fut: TryFuture<Ok = Self::Ok>, - Self: Sized,

Executes another future if this one resolves to an error. The -error value is passed to a closure to create this subsequent future. Read more
§

fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>
where - F: FnOnce(&Self::Ok), - Self: Sized,

Do something with the success value of a future before passing it on. Read more
§

fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
where - F: FnOnce(&Self::Error), - Self: Sized,

Do something with the error value of a future before passing it on. Read more
§

fn try_flatten(self) -> TryFlatten<Self, Self::Ok>
where - Self::Ok: TryFuture<Error = Self::Error>, - Self: Sized,

Flatten the execution of this future when the successful result of this -future is another future. Read more
§

fn try_flatten_stream(self) -> TryFlattenStream<Self>
where - Self::Ok: TryStream<Error = Self::Error>, - Self: Sized,

Flatten the execution of this future when the successful result of this -future is a stream. Read more
§

fn unwrap_or_else<F>(self, f: F) -> UnwrapOrElse<Self, F>
where - Self: Sized, - F: FnOnce(Self::Error) -> Self::Ok,

Unwraps this future’s output, producing a future with this future’s -Ok type as its -Output type. Read more
§

fn into_future(self) -> IntoFuture<Self>
where - Self: Sized,

Wraps a [TryFuture] into a type that implements -Future. Read more
§

fn try_poll_unpin( - &mut self, - cx: &mut Context<'_>, -) -> Poll<Result<Self::Ok, Self::Error>>
where - Self: Unpin,

A convenience method for calling [TryFuture::try_poll] on Unpin -future types.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/core/target/doc/hyper_util/sidebar-items.js b/core/target/doc/hyper_util/sidebar-items.js deleted file mode 100644 index 7d73b75b..00000000 --- a/core/target/doc/hyper_util/sidebar-items.js +++ /dev/null @@ -1 +0,0 @@ -window.SIDEBAR_ITEMS = {"mod":["client","rt","server","service"]}; \ No newline at end of file diff --git a/core/target/doc/search.index/00c15b9222be.js b/core/target/doc/search.index/00c15b9222be.js deleted file mode 100644 index cdf4f05d..00000000 --- a/core/target/doc/search.index/00c15b9222be.js +++ /dev/null @@ -1 +0,0 @@ -rn_("YUAAABIBSQFKAUsBAQMCA4cDUUIAAAEECwQSBBsELgQ1BIcBAIegQAAAA+agoAAABESgEAAAAi2wMAPJAFSwUAQRACYQYQc7MAAAAQAAEwAGAG4AAAAMAQEANwEBACUCAADYAgEAbQMLAA==") \ No newline at end of file diff --git a/core/target/doc/search.index/06aab5b70ed1.js b/core/target/doc/search.index/06aab5b70ed1.js deleted file mode 100644 index 693cd7fb..00000000 --- a/core/target/doc/search.index/06aab5b70ed1.js +++ /dev/null @@ -1 +0,0 @@ -rn_("IUcAADsEPAQ9BAUBwAAAFYwDwgMmoAPDA8QDb3IFAcAAAAWmAxWLA8EDZXlPA4awMAL1AAGwEAFTAEagcAAABACRAA0=") \ No newline at end of file diff --git a/core/target/doc/search.index/0a7c51c86cc8.js b/core/target/doc/search.index/0a7c51c86cc8.js deleted file mode 100644 index 40cc3dd9..00000000 --- a/core/target/doc/search.index/0a7c51c86cc8.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQHAAAADNgQxUgKgA8MDxANpchUBQAAAkagBqQGqAcIBwwHEAcUBxgGdA54DAzgDZWgWARcBYwCEsDAECQABoUAAAARFGQEA81oDAABCACwA") \ No newline at end of file diff --git a/core/target/doc/search.index/0c3d650c923b.js b/core/target/doc/search.index/0c3d650c923b.js deleted file mode 100644 index 4a738917..00000000 --- a/core/target/doc/search.index/0c3d650c923b.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQBCAAAZ8QMHBGPHASsCsIADywBZaXUhRAAAJQLYAtkCIUIAAFcB3AHdAbMAhKEAAAAENTCABPQPAAAANwABAIAC") \ No newline at end of file diff --git a/core/target/doc/search.index/0ed27b6ba1d7.js b/core/target/doc/search.index/0ed27b6ba1d7.js deleted file mode 100644 index bd785024..00000000 --- a/core/target/doc/search.index/0ed27b6ba1d7.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQBGAAAFLwRmEASPAIWgMAAABCiwEAOLADaAAVcIUAGgMAAAA1qAAQsBAQA7MAAAAQAANAACAGABAADlATMAm4SggAAAA8qxYAQ/AAMAKQE=") \ No newline at end of file diff --git a/core/target/doc/search.index/1129947ba669.js b/core/target/doc/search.index/1129947ba669.js deleted file mode 100644 index 68f822eb..00000000 --- a/core/target/doc/search.index/1129947ba669.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQHCAAAZBQQGBAKKA2Vp8wABZQE9AQAABQHBAAABIAISkAORA2ZtAYKFoVAAAARAoIAAAAQdoNAAAAQzoYAAAARCoKAAAAQrpIACBQLIAAAHMQQGLgQINgRpdHcBhgOhMAAABEGg0AAABDmg8AAABD5jbXMFAcAAAAwkBAcKBGR2lwMAiKBgAAADnqDQAAAEDrAwA1gAAaDQAAAEDwdVAvI7AQAAAQBHCgAJoKAAAAPrROZXQo2toHAAAAPIoIAAAAOooGAAAAQqoBAAAAFZMDEyYmNpcnN19MAAAAABAHcCawA=") \ No newline at end of file diff --git a/core/target/doc/search.index/12341145492a.js b/core/target/doc/search.index/12341145492a.js deleted file mode 100644 index 987a850e..00000000 --- a/core/target/doc/search.index/12341145492a.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQHAAAAMIgQ1OAQ/BEAEQgRldAUCwAAACyEEENkB2gEJAwRjZnUbA6AgAAAEJaEAAAAELGVpeQEFADswAAABAAAZAAIApwMAAMwDGAArAoACygHAAW51BQBLAAABHARlAgQFAUgAAAcpBAYlBGlyvQMFAcAAACQBBAsELgQHvANtbgkCoSAAAAQ1oCAAAAI2YW8JAqGgAAAERaBAAAADVW14BQHAAAASEQQ3BAH/AmFkGwKwEAGdAAFkaQEAjVDB50gudaDQAAAEG1Q4I/pBykv4cN24MxOS9gCPWwqqY353fHx7ZdeKz7AgAdcAAaBgAAADm0lkNR3ParBQA5AAAR7mTH/EBQye4ZUIDZX9A/NFAAAAAQEYAA==") \ No newline at end of file diff --git a/core/target/doc/search.index/16036d2fc5a5.js b/core/target/doc/search.index/16036d2fc5a5.js deleted file mode 100644 index 794e5dfc..00000000 --- a/core/target/doc/search.index/16036d2fc5a5.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQHBAAAXOgRBBCk7BDwEPQRudCMBArBwBBEAJm13OjAAAAEAAAAAAAgAEAAAAPkC+gLuA+8D8APxAwQEBwQjBCsCoCAAAAOibm8hQQAAxALPAtACNwAAhaAQAAADqKBwAAAEKqBgAAAEGxDBBPSsAQAAHgABAJgB") \ No newline at end of file diff --git a/core/target/doc/search.index/184ea8ef09e2.js b/core/target/doc/search.index/184ea8ef09e2.js deleted file mode 100644 index 0942f1ce..00000000 --- a/core/target/doc/search.index/184ea8ef09e2.js +++ /dev/null @@ -1 +0,0 @@ -rn_("FQFCAAAJBARX5QPzA/QD9QP2A/cDY3MvAjACEwACoaAAAAREZnMBvAMAAC8AhbDwBD8AA7AQARgAAaBAAAAEMLAAAZoAAZQARA==") \ No newline at end of file diff --git a/core/target/doc/search.index/1e123f0a752f.js b/core/target/doc/search.index/1e123f0a752f.js deleted file mode 100644 index 111297d2..00000000 --- a/core/target/doc/search.index/1e123f0a752f.js +++ /dev/null @@ -1 +0,0 @@ -rn_("UUAAACcEOAQ5BD8EQARCBAEAA6BAAAAD5qCgAAAERLAwA8kAVGVpczswAAABAAATAAYAbgAAAAwBAQA3AQEAJQIAANgCAQBtAwsAYwCEoDAAAAMAsJAENAAKEgASOjAAAAEAAAAAAA8AEAAAAFwBowEfAswC+AKtA64DrwOwA7EDsgOzA7QDxQPqA+wD") \ No newline at end of file diff --git a/core/target/doc/search.index/1e60a030b40d.js b/core/target/doc/search.index/1e60a030b40d.js deleted file mode 100644 index 8935c0da..00000000 --- a/core/target/doc/search.index/1e60a030b40d.js +++ /dev/null @@ -1 +0,0 @@ -rn_("FQBBAAAbPwRCBHLIAtQCFQFAAAAJBARX5QPzA/QD9QP2A/cDY3MvAjACE4ECoDAAAAQvbHSXAACFoDAAAAOjoKAAAAQsoaAAAAREoIgCOjAAAAEAAAAAAAsAEAAAAEgBogGyAbgBuQHiAeMB5AHlAooDvAMQBA==") \ No newline at end of file diff --git a/core/target/doc/search.index/21111064e1bc.js b/core/target/doc/search.index/21111064e1bc.js deleted file mode 100644 index 01790a66..00000000 --- a/core/target/doc/search.index/21111064e1bc.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQBCAAADnwNh1QJRQwAAWwNcA10DXgNfA2AD+wJudHFFAAD+ApIDkwOUA5UDlgOXA5gDYwCEoJAAAAPssEADYQABKEEAOzAAAAEAAIIABQBrAAAAwgAzAMABAACHAjMAOQMYAAUDQAAAE8gC1AIDvAMSMQIyAiITBCkEMQRjZm524AEbAqAQAAABrXJ4JwEAh6BwAAAEDqBQAAADxqAQAAADnKCwAAAEQKBgAAAEJzRBAzswAAABAAAUAAgANAEAAFIBAACWAQIAsQEAACgCAADoAggA+wIBAFIDAgA=") \ No newline at end of file diff --git a/core/target/doc/search.index/26fda4a14956.js b/core/target/doc/search.index/26fda4a14956.js deleted file mode 100644 index c92b9bf9..00000000 --- a/core/target/doc/search.index/26fda4a14956.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQHBAAAXOgRBBCk7BDwEPQRudCMBArBwBBEAJm13OjAAAAEAAAAAAAoAEAAAAFgBHAL5AvoC7gPvA/AD8QMEBAcEIwQ=") \ No newline at end of file diff --git a/core/target/doc/search.index/282ca8a3edda.js b/core/target/doc/search.index/282ca8a3edda.js deleted file mode 100644 index f59a5826..00000000 --- a/core/target/doc/search.index/282ca8a3edda.js +++ /dev/null @@ -1 +0,0 @@ -rn_("kUIAACgC6ALpAuoC6wLsAu0C7gLvAvACJQBAAAAKRQRpDAQNBC0EIUMAAB8EIAQyBPMEAmNz8ugDAAABAAUBwAAABfIDBeoDZnN7BKAgAAADozJlaXQ=") \ No newline at end of file diff --git a/core/target/doc/search.index/2aa8e41c21f9.js b/core/target/doc/search.index/2aa8e41c21f9.js deleted file mode 100644 index e9649870..00000000 --- a/core/target/doc/search.index/2aa8e41c21f9.js +++ /dev/null @@ -1 +0,0 @@ -rn_("IUcAADsEPAQ9BAUBwAAAFYwDwgMmoAPDA8QDb3IFAcAAAAWmAxWLA8EDZXkJAqEQAAAENbAgAvUAAXB1VwwAiLAQAVMARqCQAAAD56AgAAACNqBwAAAEAJFIDfQ0AgAAwQABAA0A") \ No newline at end of file diff --git a/core/target/doc/search.index/2b477c01b1fc.js b/core/target/doc/search.index/2b477c01b1fc.js deleted file mode 100644 index 205c2729..00000000 --- a/core/target/doc/search.index/2b477c01b1fc.js +++ /dev/null @@ -1 +0,0 @@ -rn_("AYIDsTAEOgAHoNAAAAQ5sPAENAAKY21z8wABaTswAAABAAAaAAMAAAEAAKcDAADMAxgAAQIAOzAAAAEAABkAAgCnAwAAzAMYAPsCbnQ=") \ No newline at end of file diff --git a/core/target/doc/search.index/2bcb446586c9.js b/core/target/doc/search.index/2bcb446586c9.js deleted file mode 100644 index 96e980b0..00000000 --- a/core/target/doc/search.index/2bcb446586c9.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQHBAAAAugEAuwE0NSsCoFAAAAL/ZXMFAEIAAAEcBGUCBPMDAWUBZgMAABOBA7AgAtYAAaEAAAAEOGFkZTsDoBAAAAQqYWtv") \ No newline at end of file diff --git a/core/target/doc/search.index/2c8a03fc6ffa.js b/core/target/doc/search.index/2c8a03fc6ffa.js deleted file mode 100644 index 05ed541b..00000000 --- a/core/target/doc/search.index/2c8a03fc6ffa.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQHAAAAZQwRFBBEhBCIEbnoFAEUAAAUvBGYQBDMAA6AQAAADqWVpbzowAAABAAAAAAANABAAAAAeAlICjQOOA5kDoAOmA8MDxAP4AwwEDQQmBC0E") \ No newline at end of file diff --git a/core/target/doc/search.index/2d535aa9e97f.js b/core/target/doc/search.index/2d535aa9e97f.js deleted file mode 100644 index a2cd2344..00000000 --- a/core/target/doc/search.index/2d535aa9e97f.js +++ /dev/null @@ -1 +0,0 @@ -rn_("IUkAAD8EQARCBPUCQQAAAwADUCcEOAQ5BD8EQARCBBk0BD4EYnN3XAGjAR8CzAL4Aq0DrgOvA7ADsQOyA7MDtAPFA+oD7AOfAIWgsAAABCGwAAHZAAGgkAAABAMlAAo=") \ No newline at end of file diff --git a/core/target/doc/search.index/2ffcca7d372e.js b/core/target/doc/search.index/2ffcca7d372e.js deleted file mode 100644 index 9447607f..00000000 --- a/core/target/doc/search.index/2ffcca7d372e.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQHCAAAZBQQGBAKKA2Vp8wABZQE9AQAAAYKFoVAAAARAoIAAAAQdoNAAAAQzoYAAAARCoKAAAAQrpIACBQLIAAAHMQQGLgQINgRpdHcBhgOhMAAABEGg0AAABDmg8AAABD5jbXMFAcAAAAwkBAcKBGR2lwMAiKBgAAADnqDQAAAEDrAwA1gAAaDQAAAEDwdVAvI7AQAAAQBHBAAHoKAAAAPrROZXQo2toHAAAAPIoIAAAAOooDAAAAIgMDEyYmNpc/TAAAAAAQB3AmsASwOgEAAAAsWgUAAABBtlaXA=") \ No newline at end of file diff --git a/core/target/doc/search.index/316c61ec58a2.js b/core/target/doc/search.index/316c61ec58a2.js deleted file mode 100644 index 52c9ab7d..00000000 --- a/core/target/doc/search.index/316c61ec58a2.js +++ /dev/null @@ -1 +0,0 @@ -rn_("QUAAAEEBQgFDAUQBRQEFAEEAAABVA3M2ASMAAqBgAAAC/WVyOjAAAAEAAAAAAAgAEAAAAPYApgGtAdwC3QLeAr4DvwPAAwUBwwAAFv8DKwQGOQRicwUBwAAACSgEAWQDZGUFAcUAABceBDMEEJkD+ANscwUAQAAABaEDdRUBIUEAAB0CqgOrAwUBwQAABfIDBeoDZnPzAAFoAdYBAADzgQJlb/MAAXX0BQQAAAEACAABAPsCY2QFAckAAAtABAYnBHJzBQHAAAAipwErAqwDFaUDCARvdefmAIygYAAABDCwgAPJAFShUAAABDixgAQ/AAO3iUYBDAAAAA==") \ No newline at end of file diff --git a/core/target/doc/search.index/31a48b9916b9.js b/core/target/doc/search.index/31a48b9916b9.js deleted file mode 100644 index 9114d24d..00000000 --- a/core/target/doc/search.index/31a48b9916b9.js +++ /dev/null @@ -1 +0,0 @@ -rn_("AQIAOzAAAAEAADQAAgDCAgAABAMzAPMAAW07MAAAAQAANAACAFEBAABiATMAZQBAAAALOARyBgEHAQgBCQEKAeYD5wP7AnJ3BQHBAAALQAQGJwRycysDoIAAAAQSoJAAAAQ4YW5z8wACZW/zVwEAAIUAAQA=") \ No newline at end of file diff --git a/core/target/doc/search.index/3509e153ae80.js b/core/target/doc/search.index/3509e153ae80.js deleted file mode 100644 index f2a7e99d..00000000 --- a/core/target/doc/search.index/3509e153ae80.js +++ /dev/null @@ -1 +0,0 @@ -rn_("AYKFoVAAAARAoIAAAAQdoNAAAAQzoYAAAARCoKAAAAQrpIACBQLIAAAHMQQGLgQINgRpdHcBhgOhMAAABEGg0AAABDmg8AAABD5jbXMFAcAAAAwkBAcKBGR2lwMAiKBgAAADnqDQAAAEDrAwA1gAAaDQAAAEDwdVAvI7AQAAAQA=") \ No newline at end of file diff --git a/core/target/doc/search.index/358cc0461779.js b/core/target/doc/search.index/358cc0461779.js deleted file mode 100644 index a5899f1d..00000000 --- a/core/target/doc/search.index/358cc0461779.js +++ /dev/null @@ -1 +0,0 @@ -rn_("IUEAAB0CqgOrAwUBwQAABfIDBeoDZnPzAAFoAdYBAADzgQJlbwUAQQAAsfkD+gP7A/wD/QP+AxQEFQQWBBcEGAQZBGWoAwUBwQAAFzoEQQQpOwQ8BD0EbnQjAQKwcAQRACZtdzowAAABAAAAAAAIABAAAAD5AvoC7gPvA/AD8QMEBAcEIwQrAqAgAAADom5vQUEAAMMCxALOAs8C0AJ3AACFoHAAAAQqoGAAAAQbEMEEOzAAAAEAAAYAAwCrAQEAyAEDAGMDAABVAEIAACs7BDwEPQR37gPvA/AD8QMHBCMEE4UCoHAAAAQqaXAhSQAADAQNBC0E9wAAxaCgAAAEIUAAEA71EgAAAPMDAQAIAAEA") \ No newline at end of file diff --git a/core/target/doc/search.index/3743813a0d45.js b/core/target/doc/search.index/3743813a0d45.js deleted file mode 100644 index 5a6cdd56..00000000 --- a/core/target/doc/search.index/3743813a0d45.js +++ /dev/null @@ -1 +0,0 @@ -rn_("dQBFAAAAOQRzrQOuA68DsAOxA7IDswO0AxUAQAAAMzQEOgQ+BEEEc8sDJAQrAqDAAAAEGnB3BQHCAAAGIgQT/wMrBGZz0wCEsUAEPwADAkECAXEAAAA=") \ No newline at end of file diff --git a/core/target/doc/search.index/38b431fea788.js b/core/target/doc/search.index/38b431fea788.js deleted file mode 100644 index 99be47b6..00000000 --- a/core/target/doc/search.index/38b431fea788.js +++ /dev/null @@ -1 +0,0 @@ -rn_("FQBAAAAALARztgHhARUAQAAAARwEZQIEAwQVAUQAAAXHAzDrA0MERARFBGZzJgInAgUAQAAANjgEPwRABEIEc0YBIUwAAB8EIAQyBPsCcnRHDgCJoZAAAAREoDAAAAG3sCADyQBUsEADiAB4sCABWgABE8EOOjAAAAEAAAAAAAoAEAAAAAEBOALrAxwEJQQ7BDwEPQRDBEQERQQ=") \ No newline at end of file diff --git a/core/target/doc/search.index/3a1c46cf6fa7.js b/core/target/doc/search.index/3a1c46cf6fa7.js deleted file mode 100644 index 409faad5..00000000 --- a/core/target/doc/search.index/3a1c46cf6fa7.js +++ /dev/null @@ -1 +0,0 @@ -rn_("FQBBAAAQjQOOA3MkAp8DJQFAAAAStQPtAxXoA+kDZGjNAtoC2wIVAEEAAEG0AcEB3gHfARsCZU8BUAElAEAAABXFA+wDc2YAEQQ3BH8BhqAgAAACHKAgAAACxRVBBA==") \ No newline at end of file diff --git a/core/target/doc/search.index/4476cfc59623.js b/core/target/doc/search.index/4476cfc59623.js deleted file mode 100644 index ea083f1b..00000000 --- a/core/target/doc/search.index/4476cfc59623.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQHFAAALQAQGJwRycwUAQAAACiwEbOUCRwIAh6AgAAACLKBgAAADrKBAAAACIaAwAAACwaBAAAAC9xNAGfJyAAAALwM=") \ No newline at end of file diff --git a/core/target/doc/search.index/44e657428dad.js b/core/target/doc/search.index/44e657428dad.js deleted file mode 100644 index 0b1af078..00000000 --- a/core/target/doc/search.index/44e657428dad.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQHCAAAGCAQG+ANiaAGDAqIgAAAERaHwAAAERG9zGwKgcAAABAlsdpcAAImgYAAAA52h4AAABEOgMAAAA1ehEAAABDKg8AAABDCg8AAABC2gUAAAA6QD0RXyOQEAAAEA") \ No newline at end of file diff --git a/core/target/doc/search.index/4791ce6edfee.js b/core/target/doc/search.index/4791ce6edfee.js deleted file mode 100644 index 906a2211..00000000 --- a/core/target/doc/search.index/4791ce6edfee.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQHDAAAW/wMrBAY5BGJzBQHFAAAXHgQzBBCZA/gDbHMFAckAAAtABAYnBHJzrwiIsGADpQBjsIADyQBUoKAAAAQooVAAAAQ4sYAEPwADpokC") \ No newline at end of file diff --git a/core/target/doc/search.index/4a01cc2e44be.js b/core/target/doc/search.index/4a01cc2e44be.js deleted file mode 100644 index 248fcb2a..00000000 --- a/core/target/doc/search.index/4a01cc2e44be.js +++ /dev/null @@ -1 +0,0 @@ -rn_("FQBAAAAbPwRCBHLIAtQCFQNEAAAnEwQpBDEEBiUEFgsELgQINgRpcnR3ZQO9A1MAhKBQAAAEKKBAAAADnBEADPIRAQAANgA=") \ No newline at end of file diff --git a/core/target/doc/search.index/4aff6b7cb92e.js b/core/target/doc/search.index/4aff6b7cb92e.js deleted file mode 100644 index 7da9c1b2..00000000 --- a/core/target/doc/search.index/4aff6b7cb92e.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQHAAAARsAEuAgSPA3R5gwCEsHADjQABoCAAAAItoCAAAAIhEgECOzAAAAEAAG8ABABoAAAAgwA5AL8BAABTAjMA") \ No newline at end of file diff --git a/core/target/doc/search.index/4bb670e691ba.js b/core/target/doc/search.index/4bb670e691ba.js deleted file mode 100644 index 768ed574..00000000 --- a/core/target/doc/search.index/4bb670e691ba.js +++ /dev/null @@ -1 +0,0 @@ -rn_("4UIAAFQBxgLLAv4CkgOTA5QDlQOWA5cDmAPGA8cD8gMvBBUBQAAAGegD6QMgHQKqA6sDZHJzAHQAMUAAADQC9QL2AgMDBQHBAAAF8gMF6gNmc/MAAWgB1gEAAMFDAAA3ArYDtwO4A7kDugO7A+UD8wP0A/UD9gP3A3cFAIewEANaAG6gIAAAAVmYwQg7MAAAAQAARAAOAEgAAAALAQAAWQEAANcBAQDCAgAA0QICAAQDMwCQAwEAAQQAAAsEAAASBAAAGwQAAC4EAAA1BAAA") \ No newline at end of file diff --git a/core/target/doc/search.index/4e6bb825fd4b.js b/core/target/doc/search.index/4e6bb825fd4b.js deleted file mode 100644 index d197616f..00000000 --- a/core/target/doc/search.index/4e6bb825fd4b.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQHAAAAZQwRFBBEhBCIEbnoFAEUAAAUvBGYQBPMAAmVpOjAAAAEAAAAAAAoAEAAAAFICmQOgA6YDwwPEA/gDDAQNBCYELQQ=") \ No newline at end of file diff --git a/core/target/doc/search.index/4ec532547185.js b/core/target/doc/search.index/4ec532547185.js deleted file mode 100644 index fbec84e4..00000000 --- a/core/target/doc/search.index/4ec532547185.js +++ /dev/null @@ -1 +0,0 @@ -rn_("AQABoWAAAARFaTswAAABAAAMAAMAWgEBAK4BAADMAQkAUUcAAOUD8wP0A/UD9gP3A8MAhKCQAAAEBLAAAGkAVAQIBvIvAgAAAQA=") \ No newline at end of file diff --git a/core/target/doc/search.index/4f6ce61c59c1.js b/core/target/doc/search.index/4f6ce61c59c1.js deleted file mode 100644 index f438474a..00000000 --- a/core/target/doc/search.index/4f6ce61c59c1.js +++ /dev/null @@ -1 +0,0 @@ -rn_("AQADsBADtQA4oHAAAAQsoFAAAAOhaHJ1OzAAAAEAADMADgAQAQAAFQEAAJ8BAACzAQAAvAEAANsBAAAqAgAAOQIYAMMCAQDOAgIAYQMBAGQDAAD5AwUAFAQFAA==") \ No newline at end of file diff --git a/core/target/doc/search.index/52e05a501735.js b/core/target/doc/search.index/52e05a501735.js deleted file mode 100644 index 20ab1d75..00000000 --- a/core/target/doc/search.index/52e05a501735.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQHAAAAHNgQUywMkBGhpIUcAABMEKQQxBJMAhKBgAAAEJbBgBAsAIwABFfJlAwAAWABBRAAA+wL8AlIDUwNUA/sCYWU=") \ No newline at end of file diff --git a/core/target/doc/search.index/55ce0e7c0993.js b/core/target/doc/search.index/55ce0e7c0993.js deleted file mode 100644 index e19c8fc8..00000000 --- a/core/target/doc/search.index/55ce0e7c0993.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQHBAAAXOgRBBCk7BDwEPQRudBUBQAAABccDMOsDQwREBEUEZnMmAicC8wABZQH9AgAAMUIAAAUEBgQOBA8EIQECsHAEEQAmA213OjAAAAEAAAAAAAgAEAAAAPkC+gLuA+8D8APxAwQEBwQjBCsCoCAAAAOibm8hQQAAxALPAtACNwABhaAQAAADqKBwAAAEKqBgAAAEGxDBBPSsAQAAHgABAJgB+wJjePMAAWXygAAAAAEAIUEAAFcDWANZAwEHADswAAABAAAZAAIApwMAAMwDGAABAwA7MAAAAQAAGAABADkDGADzAAJpdDswAAABAAAZAAIAAgEAABsBGAAFAcYAAAtABAYnBHJzdQsAiAABBLBwBBEAJgUMoDAAAAGtDhQ4FjowAAABAAAAAAAOABAAAABYAZwBHALKAuYC5wL5AvoC7gPvA/AD8QMEBAcEIwQ=") \ No newline at end of file diff --git a/core/target/doc/search.index/5a34dc480ffc.js b/core/target/doc/search.index/5a34dc480ffc.js deleted file mode 100644 index f6f1960f..00000000 --- a/core/target/doc/search.index/5a34dc480ffc.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQHBAAABjwMTzAL4AmVyVQBCAAAjvgO/A8ADbrsCvAK9Ar4CvwLAAgUARgAABS8EZhAEKwOwEAOLADagMAAAA1ppc3UBAQA7MAAAAQAANAACAGABAADlATMA+wJpcvsCZW8VAkEAAAasAwPBAgT3AmJyd3IAoQMBAwA7MAAAAQAANAACAMABAACHAjMAAQIAOzAAAAEAADQAAgC/AQAAUwIzABsCoEAAAALLcnUFAsAAAAs1BAGmAQ01BGJ4eccPAIqg8AAABCygkAAAA8WwIAEBATegMAAAA8g8oQ46MAAAAQAAAAAAHgAQAAAACwBlAAUBNQFBAUIBQwFEAUUBmgGbAacBrwG3ASsCMwIAA1cDWANZA3kDegN7A3wDfQN+A38DgAObA6wDGgQ=") \ No newline at end of file diff --git a/core/target/doc/search.index/5a8e8157513c.js b/core/target/doc/search.index/5a8e8157513c.js deleted file mode 100644 index 81a1b40b..00000000 --- a/core/target/doc/search.index/5a8e8157513c.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQHAAAACZANAQQFCAUMBRAFFAWl5AQIAOzAAAAEAADQAAgDCAgAABAMzAPMAAW07MAAAAQAANAACAFEBAABiATMAZQBAAAALOARyBgEHAQgBCQEKAeYD5wMFAcAAABGwAS4CBI8DdHkjAAKgIAAAAi1lczswAAABAABvAAQAaAAAAIMAOQC/AQAAUwIzAF8DhrAAAGcAG6BAAAAEKgCQNQ==") \ No newline at end of file diff --git a/core/target/doc/search.index/5be27e7460ab.js b/core/target/doc/search.index/5be27e7460ab.js deleted file mode 100644 index 732e2996..00000000 --- a/core/target/doc/search.index/5be27e7460ab.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQBGAAAKQwRpJgQTgQKggAAAA+ZobkFCAAD7AvwCUgNTA1QDMwADoBAAAAOJZWl18xMEAAAWAAgAKwKwUAQJAAFpbA==") \ No newline at end of file diff --git a/core/target/doc/search.index/5d8bb5e9f7cc.js b/core/target/doc/search.index/5d8bb5e9f7cc.js deleted file mode 100644 index a9a271f1..00000000 --- a/core/target/doc/search.index/5d8bb5e9f7cc.js +++ /dev/null @@ -1 +0,0 @@ -rn_("9QJAAAADAANQJwQ4BDkEPwRABEIEGTQEPgRic3dcAaMBHwLMAvgCrQOuA68DsAOxA7IDswO0A8UD6gPsA3FAAAB5A3oDewN8A30DfgN/A4ADZQBAAAAaQwRFBGmZA6YD+AMMBA0EJgQtBCFDAAAfBCAEMgQXAgHHsHAEHgAVoCAAAALHoOAAAAREoKAAAAQSoEAAAAOJAAGOCfLoAwAAAQAFAEEAAAIDBGWaAxUBQgAABakDCDAEY2W1ATUCdwEAhaBgAAAEEhoARDswAAABAAAHAAMAcAAAAMECAADfAgUArwCFoMAAAAQjoCAAAAGfoAAAAAEaChgB") \ No newline at end of file diff --git a/core/target/doc/search.index/60fdbeccbe60.js b/core/target/doc/search.index/60fdbeccbe60.js deleted file mode 100644 index b8b47b28..00000000 --- a/core/target/doc/search.index/60fdbeccbe60.js +++ /dev/null @@ -1 +0,0 @@ -rn_("MUIAADQEOgQ+BEEEGwKh4AAABERpcAEBADswAAABAAAbAAMAvAEAADkCGABhAwEAIwACoDAAAAIsY2U7MAAAAQAADAAEADcCAAC2AwUA5QMAAPMDBAABAgA7MAAAAQAANAACAMICAAAEAzMABQBPAAAFLwRmEAR3AQCFoiAAAARFEHACOzAAAAEAADgABgAOAAAAYQAAAFEBAABiATMAywMAACQEAAA=") \ No newline at end of file diff --git a/core/target/doc/search.index/67aecf300c9a.js b/core/target/doc/search.index/67aecf300c9a.js deleted file mode 100644 index 1154bd92..00000000 --- a/core/target/doc/search.index/67aecf300c9a.js +++ /dev/null @@ -1 +0,0 @@ -rn_("ZQBCAAAFLwRmuAG5AeIB4wHkAYoDEAQVAEAAACcFBAYEDwRjoAGhASFJAAAfBCAEMgQlAEkAACs7BDwEPQR37gPvA/AD+wNjaHIlAEEAAAGJA3UTBCkEMQT7A2FlaQ==") \ No newline at end of file diff --git a/core/target/doc/search.index/6a6aeb7918dd.js b/core/target/doc/search.index/6a6aeb7918dd.js deleted file mode 100644 index e78ad5ef..00000000 --- a/core/target/doc/search.index/6a6aeb7918dd.js +++ /dev/null @@ -1 +0,0 @@ -rn_("ZQBAAAAaQwRFBGmZA6YD+AMMBA0EJgQtBCFDAAAfBCAEMgQXAgDHsHAEHgAVoCAAAALHoOAAAAREoKAAAAQSoEAAAAOJAAGOCfLoAwAAAQBDAISg0AAABCOgAAAAAiqABDsAEAEJAAPyGQIAAAEA") \ No newline at end of file diff --git a/core/target/doc/search.index/6d68125533d5.js b/core/target/doc/search.index/6d68125533d5.js deleted file mode 100644 index 669df884..00000000 --- a/core/target/doc/search.index/6d68125533d5.js +++ /dev/null @@ -1 +0,0 @@ -rn_("VQBDAAAjvgO/A8ADbrsCvAK9Ar4CvwLAAgEDADswAAABAAA0AAIAwAEAAIcCMwABAgA7MAAAAQAANAACAL8BAABTAjMAGwKgQAAAAstyde8AhaDwAAAELKBQAAACzCSBAg==") \ No newline at end of file diff --git a/core/target/doc/search.index/717ec6e44338.js b/core/target/doc/search.index/717ec6e44338.js deleted file mode 100644 index 023d7a64..00000000 --- a/core/target/doc/search.index/717ec6e44338.js +++ /dev/null @@ -1 +0,0 @@ -rn_("VQBEAABXFAQVBBYEFwQYBBkEdoEDggODA4QDhQOGAwUBwAAAVrYDtwO4A7kDugO7AwY1BGh0VQBDAABweQN6A3sDfAN9A34DfwOAA3nfAuAC4QLiAuMC5AIBgQKiIAAABEWh8AAABERvc1FDAADcAt0C3gK+A78DwAMFAcAAAFNnA2gDaQNqA2sDbAOzbQNuA28DcANxA3IDcwN0A3UDdgN3A3gDbHIlAEIAABHDAs4CZasByAHJAfcHAIigAAAABBowYFM7MAAAAQAAGgAHABMAAABpAAAAbwAAAHYACQC9AAAA9wAGALsCBQA=") \ No newline at end of file diff --git a/core/target/doc/search.index/721584bdf3ae.js b/core/target/doc/search.index/721584bdf3ae.js deleted file mode 100644 index 9fae0348..00000000 --- a/core/target/doc/search.index/721584bdf3ae.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQBBAACx+QP6A/sD/AP9A/4DFAQVBBYEFwQYBBkEZagDBQHBAAAXOgRBBCk7BDwEPQRudCMBArBwBBEAJm13OjAAAAEAAAAAAAgAEAAAAPkC+gLuA+8D8APxAwQEBwQjBCsCoCAAAAOibm9BQQAAwwLEAs4CzwLQAncAAIagcAAABCqgMAAABDCgYAAABBsQwQY7MAAAAQAABgADAKsBAQDIAQMAYwMAAA==") \ No newline at end of file diff --git a/core/target/doc/search.index/722ca90466cd.js b/core/target/doc/search.index/722ca90466cd.js deleted file mode 100644 index 6fed406b..00000000 --- a/core/target/doc/search.index/722ca90466cd.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQBBAAACVQNyrQEVAEAAALb5A/oD+wP8A/0D/gMUBBUEFgQXBBgEGQRlpQGkAyFCAAATBCkEMQQHBADHsDACJAF7sDACyAAMoDAAAAO8oUAAAAREsCACMQABoCAAAAPnQCmICPPgAQAA5QAQAAEAAaGQAAAERXXybAAAACMDBQHAAAAF8gMF6gNmcxsCsEAD6AABMmVlAEAAABG1A+0DaLMB2wHDAsQCzgLPAtAC5xoAyaAwAAADmqBQAAAC/bAAAQEBN0AijCk6MAAAAQAAAAAACwAQAAAAFAHWAc0C2gLbAvcCgQOCA4MDhAOFA4YD") \ No newline at end of file diff --git a/core/target/doc/search.index/7355c7414914.js b/core/target/doc/search.index/7355c7414914.js deleted file mode 100644 index 6b4f1164..00000000 --- a/core/target/doc/search.index/7355c7414914.js +++ /dev/null @@ -1 +0,0 @@ -rn_("MUIAAAUEBgQOBA8EhQBAAAAi0QLSAtMCbT4BPwFAAVsDXANdA14DXwNgAwUBwQAAFzoEQQQpOwQ8BD0EbnQjAQKwcAQRACZtdzowAAABAAAAAAAIABAAAAD5AvoC7gPvA/AD8QMEBAcEIwQrAqAgAAADom5vIUEAAMQCzwLQAjcAAYWgEAAAA6igcAAABCqgYAAABBsQwQT0rAEAAB4AAQCYAduEsAABXwBFBAgh8wABZfKAAAAAAQA=") \ No newline at end of file diff --git a/core/target/doc/search.index/7476d9c64b00.js b/core/target/doc/search.index/7476d9c64b00.js deleted file mode 100644 index d275eda3..00000000 --- a/core/target/doc/search.index/7476d9c64b00.js +++ /dev/null @@ -1 +0,0 @@ -rn_("FQFAAAAJBARX5QPzA/QD9QP2A/cDY3MvAjACGwKwMAPHAGhsdKFDAACuAcwBzQHOAc8B0AHRAdIB0wHUAdUBFwEAhaBQAAAC5aAwAAADyqAAAAAAbREIDPMEAQAA1QABAA==") \ No newline at end of file diff --git a/core/target/doc/search.index/75499d25351a.js b/core/target/doc/search.index/75499d25351a.js deleted file mode 100644 index 64933fe6..00000000 --- a/core/target/doc/search.index/75499d25351a.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQHBAAAXOgRBBCk7BDwEPQRudEMAA7BwBBEAJqAAAAAC/W1zdzowAAABAAAAAAAKABAAAABYARwC+QL6Au4D7wPwA/EDBAQHBCME") \ No newline at end of file diff --git a/core/target/doc/search.index/756c208b3651.js b/core/target/doc/search.index/756c208b3651.js deleted file mode 100644 index 22a52eb5..00000000 --- a/core/target/doc/search.index/756c208b3651.js +++ /dev/null @@ -1 +0,0 @@ -rn_("AQIAOzAAAAEAADQAAgDCAgAABAMzAPMBAW07MAAAAQAANAACAFEBAABiATMAKwKgoAAABDhlbwUATQAACkMEaSYEsUAAAPkD+gP7A/wD/QP+AxQEFQQWBBcEGAQZBPsCZGkJAqBAAAADo6EAAAAEN2VvtwAAhaBQAAACxbAAA40AARQQAzswAAABAAANAAYABgEEAB0CAAAkAgAAnwMAAKgDAwDmAwEA") \ No newline at end of file diff --git a/core/target/doc/search.index/75f53c59ae79.js b/core/target/doc/search.index/75f53c59ae79.js deleted file mode 100644 index 17a8fc84..00000000 --- a/core/target/doc/search.index/75f53c59ae79.js +++ /dev/null @@ -1 +0,0 @@ -rn_("VQBEAABXFAQVBBYEFwQYBBkEdoEDggODA4QDhQOGA1FHAAC2A7cDuAO5A7oDuwNVAEMAAHB5A3oDewN8A30DfgN/A4ADed8C4ALhAuIC4wLkAlFDAADcAt0C3gK+A78DwAMFAcAAAFNnA2gDaQNqA2sDbAOzbQNuA28DcANxA3IDcwN0A3UDdgN3A3gDbHIlAEIAABHDAs4CZasByAHJAfMAhjAgEzswAAABAAANAAMAbwAAAPcABgC7AgUARwAAxqHQAAAERaCgAAAEAaDQAAAEKKBAAAADh7AgA4gAeABEBgr0dQAAAIkAAQArAw==") \ No newline at end of file diff --git a/core/target/doc/search.index/7b2a2c167970.js b/core/target/doc/search.index/7b2a2c167970.js deleted file mode 100644 index b272eafa..00000000 --- a/core/target/doc/search.index/7b2a2c167970.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQBCAAAGrANioQMVAUAAAAXHAzDrA0MERARFBGZzJgInApMAhKAwAAAC/aAwAAABsRABRPUUAAAAAQDBAgEAJgA=") \ No newline at end of file diff --git a/core/target/doc/search.index/7b7b53382407.js b/core/target/doc/search.index/7b7b53382407.js deleted file mode 100644 index 58dc3f0e..00000000 --- a/core/target/doc/search.index/7b7b53382407.js +++ /dev/null @@ -1 +0,0 @@ -rn_("BQHAAAAMDwQUHwLqA2V0AYKFoVAAAARAoIAAAAQdoNAAAAQzoYAAAARCoKAAAAQrpIACBQLIAAAHMQQGLgQINgRpdHcBhgOhMAAABEGg0AAABDmg8AAABD5jbXMFAcUAAAcOBAXGA2NmBQHAAAAMJAQHCgRkdlcXAImgYAAAA56gUAAAA/KwMANYAAEnVQL1YwAAANgAAQB5AjgA") \ No newline at end of file diff --git a/core/target/doc/search.index/alias/a762150c532c.js b/core/target/doc/search.index/alias/a762150c532c.js deleted file mode 100644 index f829e463..00000000 --- a/core/target/doc/search.index/alias/a762150c532c.js +++ /dev/null @@ -1 +0,0 @@ -rd_("") \ No newline at end of file diff --git a/core/target/doc/search.index/crateNames/cc168d2f9130.js b/core/target/doc/search.index/crateNames/cc168d2f9130.js deleted file mode 100644 index ed2efc9c..00000000 --- a/core/target/doc/search.index/crateNames/cc168d2f9130.js +++ /dev/null @@ -1 +0,0 @@ -rd_("nhttp_body_utiljhyper_util") \ No newline at end of file diff --git a/core/target/doc/search.index/desc/e0d8020335bb.js b/core/target/doc/search.index/desc/e0d8020335bb.js deleted file mode 100644 index 74ee56e5..00000000 --- a/core/target/doc/search.index/desc/e0d8020335bb.js +++ /dev/null @@ -1 +0,0 @@ -rd_("BoThe original IO object used before the upgrade.AnSet the \xe2\x80\x9cno\xe2\x80\x9d proxy filter.AaRuntime utilitiesC`A map caching MakeServices per key.BjSet the target proxy for all destinations.CfDNS Resolution used by the HttpConnector.DaSend a GET request to the supplied Uri.AbMap pool utilitiesB`Create a new Empty.AoCreate a new Full.BbCreate a new Limited.BeCreate a new StreamBody.BeCreate a new BodyStream.BhCreate a new BodyDataStreamBbCreate a new BoxBody.BhCreate a new UnsyncBoxBody.AhConstruct a new Builder.AnConstruct a new HttpConnector.CkCreate new Connected type with empty metadata.BgCreate a new SOCKSv5 handshake service.BfCreate a new SOCKSv4 handshake serviceAlCreate a new Tunnel service.BiConstruct a new GaiResolver.CgCreate a new singleton pool over an inner make service.CkWraps the inner I/O in an WithHyperIo<I>CkWraps the inner I/O in an WithTokioIo<I>DkCreate new executor that relies on tokio::spawn to execute \xe2\x80\xa6CjWrap a type implementing Tokio\xe2\x80\x99s or hyper\xe2\x80\x99s IO traits.AgCreate a new TokioTimerBeCreate a new auto connection builder.BfCreate a new graceful shutdown helper.DcCreate a new TowerToHyperService from a tower service.CdGet the http::Uri for the target proxy.BgA body that consists of a single chunk.AnA value of type LBkA domain name to resolve into IP addresses.AjHttp1 or Http2 connection.AeConnection utilities.AoReturns the argument unchanged.000000000000000000000000000000000000000000000000000BkSet the target proxy for HTTP destinations.BaCalls U::from(self).000000000000000000000000000000000000000000000000000AhComposable pool servicesAlA body that is always empty.ClThe error type returned by the connection when used as a \xe2\x80\xa6mClient errorsD`Future that resolves to the next frame from a Body.CiThe deconstructed parts of an Upgraded type.AnA value of type RBiTurn this body into a boxed trait object.CnCombine the configuration of this builder with a connector \xe2\x80\xa6CmConstruct a Matcher using the configured values.AcA cache of servicesBmClears the map, removing all key-value pairs.BoReturns the number of the watching connections.CeSet extra connection information to be set in the \xe2\x80\xa6DfReturns a future that resolves to the next Frame, if any.AdHttp1 configuration.0AdHttp2 configuration.0BlSet the target proxy for HTTPS destinations.BfReturns a reference to the inner type.0AfBorrow the inner type.oProxy utilitiesmProxy helpersChSet whether the connected transport is to an HTTP proxy.BaProvide a timer to be used for h2BgSet the timer used in background tasks.0Ditokio runtime components integration for hyper.BmWrap a future for graceful shutdown watching.0BhA Client to make outgoing HTTP requests.EeSum type with two cases: Left and Right, used if a body \xe2\x80\xa6CeBody returned by the map_err combinator.AmTunnel Proxy via HTTP CONNECTBdView the hostname as a string slice.AeHTTP client utilitiesDmLegacy implementations of connect module and ClientAfPoison this connectionCeRetains only the services specified by the predicate.CfRetains the inner made service if specified by the \xe2\x80\xa6AaServer utilities.CmSet whether HTTP/1 connections should try to use vectored \xe2\x80\xa6DfAn extension trait for http_body::Body adding various \xe2\x80\xa6BgA boxed Body trait object.CaA builder to configure a new Client.BkA builder to create a Matcher.BbHttp1 or Http2 connection builder.CcFuture that resolves into a Collected.CdConnect to a destination, returning an IO transport.AfA length limited body.CjA proxy matcher, usually built from environment variables.AhTunnel Proxy via SOCKSv4AhTunnel Proxy via SOCKSv5CnA wrapper that implements Tokio\xe2\x80\x99s IO traits for an inner \xe2\x80\xa6BhA watcher side of the graceful shutdown.ChCreate a builder to configure a new Client.DdCreate a [Builder] to configure a new Map.CgStart a builder to construct a Cache pool.CkStart a builder to construct a Negotiate pool.BgStart a builder to configure a matcher.DjTurn this body into Collected body which will collect all \xe2\x80\xa6BkConnectors used by the Client.BbCreate an empty Full.BiGet a mutable reference to the inner body0BaGet a reference to the inner body0CdMaps this body\xe2\x80\x99s error value to a different value.nProxy matchersDgSend a constructed Request using this Client.AbService utilities.CmGet a service after extracting the key from req.AbUpgrade utilities.CaCreate an owned type that can watch a connection.DcAn iterator of IP addresses returned from getaddrinfo.CaExtra information about the transport when an \xe2\x80\xa6CgBody returned by the map_frame combinator.CkTries to downcast the internal trait object to the type \xe2\x80\xa6CkCreate a matcher reading the current environment variables.BhUtility to gracefully shutdown a server.BmReturns whether this singleton pool is empty.BeGet any configured raw authorization.CnA buffer of bytes that have been read but not processed as \xe2\x80\xa6DdSet whether to automatically add the Host header to \xe2\x80\xa6BlSignal shutdown for all watched connections.BlConvert this body into a Bytes.CnIf there is a trailers frame buffered, returns a reference \xe2\x80\xa6DdA collected body produced by BodyExt::collect which \xe2\x80\xa6C`Extra information about the connected transport.D`A future to resolve a name returned by GaiResolver.A`A matched proxy,BgA singleton pool over an inner service.C`Aggregate this buffered into a Buf.BjReturn metadata describing the connection.BnReturns a mutable reference to the inner type.0AjMut borrow the inner type.CjCheck if the destination should be intercepted by a proxy.CnResolve domain names locally on the client, rather than on \xe2\x80\xa60BmMaps this body\xe2\x80\x99s frame to a different kind.AlNegotiate a pool of servicesoSingleton poolsCeUse User/Pass authentication method during handshake.DdAdd proxy-authorization header value to the CONNECT \xe2\x80\xa6BjA stream created from a Body.BiDescribes a type returned by a connector.DjA Future representing an HTTP/1 connection, returned from \xe2\x80\xa6BjA body created from a Stream.BdA Timer that uses the tokio runtime.BgGet any configured basic authorization.CjBuild a client with this configuration and the default \xe2\x80\xa6DkCopies the extra connection information into an Extensions \xe2\x80\xa6CaSet whether HTTP/1 connections should support \xe2\x80\xa6AcOnly accepts HTTP/1ClSet whether the connection must use HTTP/2.AcOnly accepts HTTP/2BaUtilities for working with hyper.FeConvert Either into the inner type, if both Left and Right \xe2\x80\xa6CcConsume self, returning the inner body0CaConsumes this wrapper and returns the inner type.0BlConsume this wrapper and get the inner type.CjMake this Connection static, instead of borrowing from \xe2\x80\xa60ClReturns true if this was an error from Connect.CjDetermines if the connected transport is to an HTTP proxy.BfEnables or disables HTTP/1 keep-alive.BlGet the local address of the transport used.ClProvide a timer to be used for timeouts and intervals in \xe2\x80\xa6DaA resolver using blocking getaddrinfo calls in a \xe2\x80\xa6DlExtends an underlying tokio I/O with hyper I/O \xe2\x80\xa6DlExtends an underlying hyper I/O with tokio I/O \xe2\x80\xa6BlCombinators for the Body trait.C`Create a matcher from the environment or system.C`Get a pinned mutable reference to the inner body0BbSet the maximum number of headers.BmGet the remote address of the transport used.DiSet that all sockets have SO_NODELAY set to the supplied \xe2\x80\xa6AfHttp1 part of builder.AfHttp2 part of builder.AhAdds trailers to a body.CgTurn this body into a boxed trait object that is !Sync.CkReturns the info of the client connection on which this \xe2\x80\xa6DjOption to enforce all Uris have the http scheme.CmSet whether HTTP/1 connections should try to use vectored \xe2\x80\xa6BoSet the maximum buffer size for the connection.CfAdd extra headers to be sent with the CONNECT request.BmA connector for the http scheme.CiFuture executor that utilises tokio threads.CeA boxed Body trait object that is !Sync.CmSet that the connected transport negotiated HTTP/2 as its \xe2\x80\xa6CnSets the name of the interface to bind sockets produced by \xe2\x80\xa6DdSet that all sockets have SO_KEEPALIVE set with the \xe2\x80\xa6AiAdd trailers to the body.BoA data stream created from a Body.ClA Future that will resolve to an HTTP Response.BkUtilities for http_body::Body.BmSets the maximum frame size to use for HTTP2.CiAggregates flushes to better support pipelined responses.BmSets whether to use an adaptive flow control.AkA graceful shutdown utilityCjError indicating a given string was not a valid domain \xe2\x80\xa6CmAn error returned when body length exceeds the configured \xe2\x80\xa6DgSet whether the date header should be included in HTTP \xe2\x80\xa60CcSet whether HTTP/0.9 responses should be tolerated.C`Turn this body into BodyDataStream.CnDetermines if the connected transport negotiated HTTP/2 as \xe2\x80\xa6CgBind a connection together with a Service.00EcCaptureConnection allows callers to capture Connected \xe2\x80\xa6CfStart a graceful shutdown process for this connection.00BbSet the maximum number of headers.CiSet the maximum write buffer size for each HTTP/2 stream.AnConstruct a new HttpConnector.CnSet an optional timeout for idle sockets being kept-alive. \xe2\x80\xa6ClSet that all sockets are bound to the configured address \xe2\x80\xa6DjSet that all socket have SO_REUSEADDR set to the supplied \xe2\x80\xa6CkAn internal utility trait as an umbrella target for all \xe2\x80\xa6CgExactly equivalent to Http2ServerConnExec.BjCapture the connection for a given requestBoSet the maximum buffer size for the connection.DiReturns true if this builder can serve an HTTP/1.1-based \xe2\x80\xa6DgReturns true if this builder can serve an HTTP/2-based \xe2\x80\xa6CjSets a timeout for receiving an acknowledgement of the \xe2\x80\xa6CmSet whether HTTP/1 connections will write header names as \xe2\x80\xa60DiA tower Service converted into a hyper Service.BnRetrieve the connection metadata, if availableCjSet a timeout for reading client request headers. If a \xe2\x80\xa6ClSets an interval for HTTP2 Ping frames should be sent to \xe2\x80\xa6CmSend all messages of the handshake optmistically (without \xe2\x80\xa6AhSet the connect timeout.ClSet that all sockets are bound to the configured IPv4 or \xe2\x80\xa6BmSets the maximum frame size to use for HTTP2.BlSets the max size of received header frames.ChSet whether to support preserving original header cases.CmSet whether HTTP/1 connections will preserve the original \xe2\x80\xa6CeSets the value of the SO_RCVBUF option on the socket.CeSets the value of the SO_SNDBUF option on the socket.CfAn upgradable Connection, returned by \xe2\x80\xa6BmSets whether to use an adaptive flow control.CnSet the number of retransmissions to be carried out before \xe2\x80\xa6ChSet whether HTTP/1 connections will silently ignored \xe2\x80\xa6DjSets the SETTINGS_MAX_CONCURRENT_STREAMS option for HTTP2 \xe2\x80\xa6ClSets the maximum idle connection per host allowed in the \xe2\x80\xa6CiSet the duration between two successive TCP keepalive \xe2\x80\xa6BfEnables the extended CONNECT protocol.CiSet the maximum write buffer size for each HTTP/2 stream.CkSet whether to retry requests that get disrupted before \xe2\x80\xa6CmSet whether HTTP/1 connections will write header names as \xe2\x80\xa6CjSets a timeout for receiving an acknowledgement of the \xe2\x80\xa6CeResponse future for TowerToHyperService.CnSets the exact size of the read buffer to always use.ClSets an interval for HTTP2 Ping frames should be sent to \xe2\x80\xa6ChSet whether to support preserving original header cases.CfSets the max size of received header frames for HTTP2.DgSets the SETTINGS_INITIAL_WINDOW_SIZE option for HTTP2 \xe2\x80\xa6CdSet timeout for RFC 6555 (Happy Eyeballs) algorithm.ChSets whether HTTP2 keep-alive should apply while the \xe2\x80\xa6BiWait for the connection to be establishedChConfigures the maximum number of local reset streams \xe2\x80\xa6ChSets the initial maximum of locally initiated (send) \xe2\x80\xa6CeSets the max connection-level flow control for HTTP2.DdBind a connection together with a Service, with the \xe2\x80\xa6007CjConfigures the maximum number of pending reset streams \xe2\x80\xa6CmSets the maximum number of HTTP2 concurrent locally reset \xe2\x80\xa6CdSets the max connection-level flow control for HTTP22ChSets whether invalid header lines should be silently \xe2\x80\xa6CmSet whether HTTP/1 connections will accept spaces between \xe2\x80\xa6ClSet whether HTTP/1 connections will accept obsolete line \xe2\x80\xa6") \ No newline at end of file diff --git a/core/target/doc/search.index/entry/5949487a5027.js b/core/target/doc/search.index/entry/5949487a5027.js deleted file mode 100644 index 04d555cb..00000000 --- a/core/target/doc/search.index/entry/5949487a5027.js +++ /dev/null @@ -1 +0,0 @@ -rd_("Ah[858,13,21,21,111,714,0]Ah[858,14,538,538,271,0,0]Ah[858,13,479,479,426,0,0]Ac[858,2,859,0,0,0,0]Ab[858,5,71,0,0,0,0]2Ac[858,2,459,0,0,0,0]Aj[968,13,969,310,262,260,0]Aj[968,13,969,719,708,260,0]Aj[968,13,969,410,340,260,0]Aj[968,13,969,190,106,260,0]Aj[968,13,969,476,436,260,0]Cm[968,13,969,476,1000,260,0,\"impl-Debug-for-LengthLimitError\"]Co[968,13,969,476,1000,432,0,\"impl-Display-for-LengthLimitError\"]Aj[968,13,969,420,769,260,0]Aj[968,13,969,420,761,260,0]Aj[968,13,969,420,966,260,0]Aj[968,13,910,556,424,260,0]Aj[968,13,910,556,941,260,0]Aj[968,13,910,312,270,260,0]Aj[968,13,910,477,344,260,0]Aj[968,13,910,729,550,260,0]Aj[858,13,411,408,339,260,0]Ca[858,13,411,408,267,260,0,\"impl-Debug-for-Error\"]Cc[858,13,411,408,267,432,0,\"impl-Display-for-Error\"]Aj[858,13,411,408,968,260,0]Aj[858,13,411,408,425,260,0]Aj[858,13,459,193,937,260,0]Aj[858,13,459,193,545,260,0]Ak[858,13,459,456,1010,260,0]Aj[858,13,459,459,709,260,0]Ai[858,13,323,11,444,260,0]Ai[858,13,323,10,443,260,0]Aj[858,13,323,421,352,260,0]Ah[858,13,21,21,543,260,0]Ah[858,13,21,21,711,260,0]Bn[858,13,21,21,111,260,0,\"impl-Debug-for-Name\"]C`[858,13,21,21,111,432,0,\"impl-Display-for-Name\"]Ah[858,13,21,21,905,260,0]Cj[858,13,21,21,999,260,0,\"impl-Debug-for-InvalidNameError\"]Cl[858,13,21,21,999,432,0,\"impl-Display-for-InvalidNameError\"]Aj[858,13,743,743,715,260,0]Aj[858,13,479,479,437,260,0]Aj[858,13,479,479,713,260,0]Aj[858,13,333,962,908,260,0]Aj[858,13,333,963,909,260,0]Aj[858,13,333,333,940,260,0]Aj[858,13,333,333,447,260,0]Aj[858,13,333,333,771,260,0]Aj[858,13,116,116,427,260,0]Aj[858,13,538,538,271,260,0]Aj[858,13,560,560,998,260,0]Aj[858,13,560,560,450,260,0]Ak[858,13,483,191,1041,260,0]Ah[858,13,411,408,339,0,0]Ac[858,2,255,0,0,0,0]Ah[968,13,969,310,262,0,0]Ah[968,13,969,190,106,0,0]Ah[968,13,969,476,436,0,0]Ah[968,13,969,420,769,0,0]Ah[968,13,969,420,761,0,0]Ah[968,13,969,420,966,0,0]Ah[968,13,910,556,424,0,0]Ah[968,13,910,556,941,0,0]Ah[858,13,411,408,425,0,0]Ah[858,13,459,193,937,0,0]Ah[858,13,459,459,709,0,0]Ag[858,13,323,11,444,0,0]Ag[858,13,323,10,443,0,0]Ah[858,13,323,421,352,0,0]Af[858,13,21,21,905,0,0]Ah[858,13,743,743,715,0,0]Ah[858,13,333,962,908,0,0]Ah[858,13,333,963,909,0,0]Ah[858,13,333,333,940,0,0]Ah[858,13,333,333,447,0,0]Ah[858,13,333,333,771,0,0]Ah[858,13,116,116,427,0,0]Ah[858,13,560,560,998,0,0]Ai[858,13,483,191,1041,0,0]Aj[858,13,333,333,771,275,0]Ah[858,13,479,479,713,0,0]Ae[968,5,969,190,0,0,0]Ah[968,15,969,410,340,0,0]Ab[858,5,21,0,0,0,0]Ac[858,2,129,0,0,0,0]Ee[858,13,411,408,339,442,0,\"impl-Service%3CRequest%3CB%3E%3E-for-%26Client%3CC,+B%3E\"]Eb[858,13,411,408,339,442,0,\"impl-Service%3CRequest%3CB%3E%3E-for-Client%3CC,+B%3E\"]Aj[858,13,459,193,937,442,0]Ai[858,13,323,11,444,442,0]Ai[858,13,323,10,443,442,0]Aj[858,13,323,421,352,442,0]Ah[858,13,21,21,905,442,0]Aj[858,13,743,743,715,442,0]Ak[858,13,483,191,1041,907,0]Ak[858,13,483,191,1041,441,0]Ac[858,2,417,0,0,0,0]Ah[858,13,21,21,711,104,0]Aj[968,13,969,310,262,105,0]Aj[968,13,969,719,708,105,0]Aj[968,13,969,410,340,105,0]Aj[968,13,969,190,106,105,0]Db[968,13,969,190,106,105,0,\"impl-From%3C%26str%3E-for-Full%3CD%3E\"]Da[968,13,969,190,106,105,0,\"impl-From%3CBytes%3E-for-Full%3CD%3E\"]Dg[968,13,969,190,106,105,0,\"impl-From%3CVec%3Cu8%3E%3E-for-Full%3CD%3E\"]Dg[968,13,969,190,106,105,0,\"impl-From%3C%26%5Bu8%5D%3E-for-Full%3CD%3E\"]Do[968,13,969,190,106,105,0,\"impl-From%3CCow%3C\'static,+B%3E%3E-for-Full%3CD%3E\"]Db[968,13,969,190,106,105,0,\"impl-From%3CString%3E-for-Full%3CD%3E\"]Aj[968,13,969,476,436,105,0]Ak[968,13,969,476,1000,105,0]Aj[968,13,969,420,769,105,0]Aj[968,13,969,420,761,105,0]Aj[968,13,969,420,966,105,0]Aj[968,13,910,556,424,105,0]Aj[968,13,910,556,941,105,0]Aj[968,13,910,457,428,105,0]Aj[968,13,910,312,270,105,0]Aj[968,13,910,477,344,105,0]Aj[968,13,910,729,550,105,0]Aj[968,13,910,964,929,105,0]Aj[858,13,411,408,339,105,0]Aj[858,13,411,408,267,105,0]Aj[858,13,411,408,968,105,0]Aj[858,13,411,408,425,105,0]Aj[858,13,459,193,937,105,0]Aj[858,13,459,193,545,105,0]Ak[858,13,459,456,1010,105,0]Aj[858,13,459,459,709,105,0]Ai[858,13,323,11,444,105,0]Ai[858,13,323,10,443,105,0]Aj[858,13,323,421,352,105,0]Ah[858,13,21,21,543,105,0]Ah[858,13,21,21,711,105,0]Ah[858,13,21,21,111,105,0]Ah[858,13,21,21,905,105,0]Ah[858,13,21,21,999,105,0]Ag[858,13,71,71,16,105,0]Aj[858,13,743,743,715,105,0]Aj[858,13,479,479,437,105,0]Aj[858,13,479,479,713,105,0]Aj[858,13,479,479,426,105,0]Aj[858,13,333,962,908,105,0]Aj[858,13,333,963,909,105,0]Aj[858,13,333,333,940,105,0]Aj[858,13,333,333,447,105,0]Aj[858,13,333,333,771,105,0]Aj[858,13,116,116,926,105,0]Aj[858,13,116,116,927,105,0]Aj[858,13,116,116,427,105,0]Aj[858,13,116,116,763,105,0]Ak[858,13,116,116,1060,105,0]Aj[858,13,538,538,271,105,0]Aj[858,13,560,560,998,105,0]Aj[858,13,560,560,450,105,0]Ak[858,13,483,191,1041,105,0]Ak[858,13,483,191,1072,105,0]Ah[858,13,21,21,111,107,0]Ah[858,13,479,479,426,0,0]Aj[968,13,969,310,262,108,0]Aj[968,13,969,719,708,108,0]Aj[968,13,969,410,340,108,0]Aj[968,13,969,190,106,108,0]Aj[968,13,969,476,436,108,0]Ak[968,13,969,476,1000,108,0]Aj[968,13,969,420,769,108,0]Aj[968,13,969,420,761,108,0]Aj[968,13,969,420,966,108,0]Aj[968,13,910,556,424,108,0]Aj[968,13,910,556,941,108,0]Aj[968,13,910,457,428,108,0]Aj[968,13,910,312,270,108,0]Aj[968,13,910,477,344,108,0]Aj[968,13,910,729,550,108,0]Aj[968,13,910,964,929,108,0]Aj[858,13,411,408,339,108,0]Aj[858,13,411,408,267,108,0]Aj[858,13,411,408,968,108,0]Aj[858,13,411,408,425,108,0]Aj[858,13,459,193,937,108,0]Aj[858,13,459,193,545,108,0]Ak[858,13,459,456,1010,108,0]Aj[858,13,459,459,709,108,0]Ai[858,13,323,11,444,108,0]Ai[858,13,323,10,443,108,0]Aj[858,13,323,421,352,108,0]Ah[858,13,21,21,543,108,0]Ah[858,13,21,21,711,108,0]Ah[858,13,21,21,111,108,0]Ah[858,13,21,21,905,108,0]Ah[858,13,21,21,999,108,0]Ag[858,13,71,71,16,108,0]Aj[858,13,743,743,715,108,0]Aj[858,13,479,479,437,108,0]Aj[858,13,479,479,713,108,0]Aj[858,13,479,479,426,108,0]Aj[858,13,333,962,908,108,0]Aj[858,13,333,963,909,108,0]Aj[858,13,333,333,940,108,0]Aj[858,13,333,333,447,108,0]Aj[858,13,333,333,771,108,0]Aj[858,13,116,116,926,108,0]Aj[858,13,116,116,927,108,0]Aj[858,13,116,116,427,108,0]Aj[858,13,116,116,763,108,0]Ak[858,13,116,116,1060,108,0]Aj[858,13,538,538,271,108,0]Aj[858,13,560,560,998,108,0]Aj[858,13,560,560,450,108,0]Ak[858,13,483,191,1041,108,0]Ak[858,13,483,191,1072,108,0]Ah[858,13,21,21,543,549,0]Aj[968,13,910,457,428,341,0]Aj[968,13,910,312,270,341,0]Aj[858,13,411,408,968,341,0]Ah[858,13,21,21,711,341,0]Aj[858,13,116,116,763,341,0]Ak[858,13,116,116,1060,341,0]Ak[858,13,483,191,1072,341,0]Ac[858,2,407,0,0,0,0]Ae[968,5,969,310,0,0,0]Ai[858,17,560,560,1029,0,0]Ae[858,5,411,408,0,0,0]Ae[968,5,910,312,0,0,0]Ac[858,5,538,0,0,0,0]Ah[968,15,969,410,340,0,0]Ah[968,13,969,969,423,0,0]Ah[858,13,411,408,425,0,0]Ah[858,13,479,479,426,0,0]Ac[858,2,255,0,0,0,0]Ae[858,13,71,71,16,0,0]Aj[968,13,969,310,262,259,0]Aj[968,13,969,410,340,259,0]Aj[968,13,969,190,106,259,0]Aj[968,13,969,476,436,259,0]Aj[968,13,969,420,769,259,0]Aj[968,13,969,420,761,259,0]Aj[968,13,969,420,966,259,0]Aj[968,13,910,477,344,259,0]Aj[968,13,910,729,550,259,0]Aj[858,13,411,408,339,259,0]Aj[858,13,411,408,425,259,0]Aj[858,13,459,193,937,259,0]Aj[858,13,459,193,545,259,0]Ak[858,13,459,456,1010,259,0]Ai[858,13,323,11,444,259,0]Ai[858,13,323,10,443,259,0]Aj[858,13,323,421,352,259,0]Ah[858,13,21,21,111,259,0]Ah[858,13,21,21,905,259,0]Aj[858,13,743,743,715,259,0]Aj[858,13,479,479,713,259,0]Aj[858,13,333,333,940,259,0]Aj[858,13,333,333,771,259,0]Aj[858,13,116,116,427,259,0]Ak[858,13,483,191,1041,259,0]Ah[858,13,560,560,998,0,0]Ah[858,13,459,459,709,0,0]Ah[968,13,969,969,423,0,0]Ah[858,13,116,116,927,0,0]Ah[858,13,116,116,427,0,0]Ah[858,13,116,116,926,0,0]1Ah[858,13,479,479,426,0,0]Ah[858,13,333,962,908,0,0]Ah[858,13,333,963,909,0,0]Ah[858,13,333,333,447,0,0]Ac[858,2,407,0,0,0,0]Ac[858,2,459,0,0,0,0]:Aj[858,13,333,333,771,275,0]0Ah[858,13,411,408,425,0,0]8:Aa[858,2,7,0,0,0,0]>Ah[858,13,560,560,450,0,0]Ae[858,5,411,408,0,0,0]Ae[968,6,969,410,0,0,0]Ae[968,5,910,477,0,0,0]Ae[858,5,323,421,0,0,0]Af[858,13,21,21,111,0,0]Aj[968,13,969,310,262,338,0]Aj[968,13,969,719,708,338,0]Aj[968,13,969,410,340,338,0]Aj[968,13,969,190,106,338,0]Aj[968,13,969,476,436,338,0]Ak[968,13,969,476,1000,338,0]Aj[968,13,969,420,769,338,0]Aj[968,13,969,420,761,338,0]Aj[968,13,969,420,966,338,0]Aj[968,13,910,556,424,338,0]Aj[968,13,910,556,941,338,0]Aj[968,13,910,457,428,338,0]Aj[968,13,910,312,270,338,0]Aj[968,13,910,477,344,338,0]Aj[968,13,910,729,550,338,0]Aj[968,13,910,964,929,338,0]Aj[858,13,411,408,339,338,0]Aj[858,13,411,408,267,338,0]Aj[858,13,411,408,968,338,0]Aj[858,13,411,408,425,338,0]Aj[858,13,459,193,937,338,0]Aj[858,13,459,193,545,338,0]Ak[858,13,459,456,1010,338,0]Aj[858,13,459,459,709,338,0]Ai[858,13,323,11,444,338,0]Ai[858,13,323,10,443,338,0]Aj[858,13,323,421,352,338,0]Ah[858,13,21,21,543,338,0]Ah[858,13,21,21,711,338,0]Ah[858,13,21,21,111,338,0]Ah[858,13,21,21,905,338,0]Ah[858,13,21,21,999,338,0]Ag[858,13,71,71,16,338,0]Aj[858,13,743,743,715,338,0]Aj[858,13,479,479,437,338,0]Aj[858,13,479,479,713,338,0]Aj[858,13,479,479,426,338,0]Aj[858,13,333,962,908,338,0]Aj[858,13,333,963,909,338,0]Aj[858,13,333,333,940,338,0]Aj[858,13,333,333,447,338,0]Aj[858,13,333,333,771,338,0]Aj[858,13,116,116,926,338,0]Aj[858,13,116,116,927,338,0]Aj[858,13,116,116,427,338,0]Aj[858,13,116,116,763,338,0]Ak[858,13,116,116,1060,338,0]Aj[858,13,538,538,271,338,0]Aj[858,13,560,560,998,338,0]Aj[858,13,560,560,450,338,0]Ak[858,13,483,191,1041,338,0]Ak[858,13,483,191,1072,338,0]Ac[858,2,859,0,0,0,0]Ac[858,2,407,0,0,0,0]Ah[858,13,459,459,709,0,0]Ae[858,13,71,71,16,0,0]Ah[858,13,743,743,715,0,0]4Aj[858,13,411,408,267,264,0]Ah[858,13,116,116,926,0,0]Ad[968,10,969,0,0,0,0]Ae[968,5,910,556,0,0,0]Ae[858,5,411,408,0,0,0]Ac[858,5,479,0,0,0,0]Ac[858,5,116,0,0,0,0]Ae[968,5,910,457,0,0,0]Af[858,10,459,416,0,0,0]Ae[968,5,969,476,0,0,0]4Ad[858,5,323,10,0,0,0]Ad[858,5,323,11,0,0,0]Ac[858,4,7,333,0,0,0]Ac[858,5,333,0,0,0,0]Ac[858,5,560,0,0,0,0]Ah[858,13,411,408,339,0,0]Ae[858,13,71,71,16,0,0]Ae[858,7,281,562,0,0,0]Ae[858,7,731,563,0,0,0]Ah[858,13,479,479,437,0,0]Ah[968,13,969,969,423,0,0]Ac[858,2,411,0,0,0,0]Aj[968,13,969,310,262,431,0]Aj[968,13,969,719,708,431,0]Aj[968,13,969,190,106,431,0]Aj[968,13,910,556,424,431,0]Aj[968,13,910,556,941,431,0]Aj[858,13,479,479,426,431,0]Aj[858,13,333,333,940,431,0]Aj[858,13,333,333,771,431,0]Aj[858,13,116,116,427,431,0]Aj[858,13,560,560,998,431,0]Aj[858,13,333,333,940,542,0]Ah[968,13,910,477,344,0,0]Ah[968,13,910,729,550,0,0]10>Ac[858,2,322,0,0,0,0]Ah[858,13,411,408,339,0,0]Ac[858,2,859,0,0,0,0]Ae[858,13,71,71,16,0,0]Ai[968,13,969,310,262,12,0]Ai[968,13,969,719,708,12,0]Ai[968,13,969,410,340,12,0]Ai[968,13,969,190,106,12,0]Ai[968,13,969,476,436,12,0]Aj[968,13,969,476,1000,12,0]Ai[968,13,969,420,769,12,0]Ai[968,13,969,420,761,12,0]Ai[968,13,969,420,966,12,0]Ai[968,13,910,556,424,12,0]Ai[968,13,910,556,941,12,0]Ai[968,13,910,457,428,12,0]Ai[968,13,910,312,270,12,0]Ai[968,13,910,477,344,12,0]Ai[968,13,910,729,550,12,0]Ai[968,13,910,964,929,12,0]Ai[858,13,411,408,339,12,0]Ai[858,13,411,408,267,12,0]Ai[858,13,411,408,968,12,0]Ai[858,13,411,408,425,12,0]Ai[858,13,459,193,937,12,0]Ai[858,13,459,193,545,12,0]Aj[858,13,459,456,1010,12,0]Ai[858,13,459,459,709,12,0]Ah[858,13,323,11,444,12,0]Ah[858,13,323,10,443,12,0]Ai[858,13,323,421,352,12,0]Ag[858,13,21,21,543,12,0]Ag[858,13,21,21,711,12,0]Ag[858,13,21,21,111,12,0]Ag[858,13,21,21,905,12,0]Ag[858,13,21,21,999,12,0]Af[858,13,71,71,16,12,0]Ai[858,13,743,743,715,12,0]Ai[858,13,479,479,437,12,0]Ai[858,13,479,479,713,12,0]Ai[858,13,479,479,426,12,0]Ai[858,13,333,962,908,12,0]Ai[858,13,333,963,909,12,0]Ai[858,13,333,333,940,12,0]Ai[858,13,333,333,447,12,0]Ai[858,13,333,333,771,12,0]Ai[858,13,116,116,926,12,0]Ai[858,13,116,116,927,12,0]Ai[858,13,116,116,427,12,0]Ai[858,13,116,116,763,12,0]Aj[858,13,116,116,1060,12,0]Ai[858,13,538,538,271,12,0]Ai[858,13,560,560,998,12,0]Ai[858,13,560,560,450,12,0]Aj[858,13,483,191,1041,12,0]Aj[858,13,483,191,1072,12,0]Ac[858,2,116,0,0,0,0]Ah[858,13,560,560,998,0,0]Ab[858,5,21,0,0,0,0]Ae[858,5,459,193,0,0,0]Ae[968,5,910,729,0,0,0]Ac[858,7,538,0,0,0,0]Ah[858,13,479,479,437,0,0]Ah[858,13,21,21,111,433,0]Ac[858,2,417,0,0,0,0]Ah[858,13,743,743,715,0,0]Ah[858,13,479,479,713,0,0]Ah[858,14,538,538,271,0,0]Ah[858,13,411,408,425,0,0];Ah[968,13,969,719,708,0,0]Aj[968,13,969,310,262,445,0]Aj[968,13,969,410,340,445,0]Aj[968,13,969,190,106,445,0]Aj[968,13,969,476,436,445,0]Aj[968,13,969,420,769,445,0]Aj[968,13,969,420,761,445,0]Aj[968,13,969,420,966,445,0]Aj[968,13,910,477,344,445,0]Aj[968,13,910,729,550,445,0]Aj[858,13,411,408,339,445,0]Aj[858,13,411,408,425,445,0]Aj[858,13,459,193,937,445,0]Aj[858,13,459,193,545,445,0]Ak[858,13,459,456,1010,445,0]Ai[858,13,323,11,444,445,0]Ai[858,13,323,10,443,445,0]Aj[858,13,323,421,352,445,0]Ah[858,13,21,21,111,445,0]Ah[858,13,21,21,905,445,0]Aj[858,13,743,743,715,445,0]Aj[858,13,479,479,713,445,0]Aj[858,13,333,333,940,445,0]Aj[858,13,333,333,771,445,0]Aj[858,13,116,116,427,445,0]Ak[858,13,483,191,1041,445,0]Ah[968,13,969,719,708,0,0]Aj[968,13,969,310,262,448,0]Aj[968,13,969,719,708,448,0]Aj[968,13,969,410,340,448,0]Aj[968,13,969,190,106,448,0]Aj[968,13,969,476,436,448,0]Ak[968,13,969,476,1000,448,0]Aj[968,13,969,420,769,448,0]Aj[968,13,969,420,761,448,0]Aj[968,13,969,420,966,448,0]Aj[968,13,910,556,424,448,0]Aj[968,13,910,556,941,448,0]Aj[968,13,910,457,428,448,0]Aj[968,13,910,312,270,448,0]Aj[968,13,910,477,344,448,0]Aj[968,13,910,729,550,448,0]Aj[968,13,910,964,929,448,0]Aj[858,13,411,408,339,448,0]Aj[858,13,411,408,267,448,0]Aj[858,13,411,408,968,448,0]Aj[858,13,411,408,425,448,0]Aj[858,13,459,193,937,448,0]Aj[858,13,459,193,545,448,0]Ak[858,13,459,456,1010,448,0]Aj[858,13,459,459,709,448,0]Ai[858,13,323,11,444,448,0]Ai[858,13,323,10,443,448,0]Aj[858,13,323,421,352,448,0]Ah[858,13,21,21,543,448,0]Ah[858,13,21,21,711,448,0]Ah[858,13,21,21,111,448,0]Ah[858,13,21,21,905,448,0]Ah[858,13,21,21,999,448,0]Ag[858,13,71,71,16,448,0]Aj[858,13,743,743,715,448,0]Aj[858,13,479,479,437,448,0]Aj[858,13,479,479,713,448,0]Aj[858,13,479,479,426,448,0]Aj[858,13,333,962,908,448,0]Aj[858,13,333,963,909,448,0]Aj[858,13,333,333,940,448,0]Aj[858,13,333,333,447,448,0]Aj[858,13,333,333,771,448,0]Aj[858,13,116,116,926,448,0]Aj[858,13,116,116,927,448,0]Aj[858,13,116,116,427,448,0]Aj[858,13,116,116,763,448,0]Ak[858,13,116,116,1060,448,0]Aj[858,13,538,538,271,448,0]Aj[858,13,560,560,998,448,0]Aj[858,13,560,560,450,448,0]Ak[858,13,483,191,1041,448,0]Ak[858,13,483,191,1072,448,0]Aj[968,13,969,310,262,449,0]Aj[968,13,969,719,708,449,0]Aj[968,13,969,410,340,449,0]Aj[968,13,969,190,106,449,0]Aj[968,13,969,476,436,449,0]Ak[968,13,969,476,1000,449,0]Aj[968,13,969,420,769,449,0]Aj[968,13,969,420,761,449,0]Aj[968,13,969,420,966,449,0]Aj[968,13,910,556,424,449,0]Aj[968,13,910,556,941,449,0]Aj[968,13,910,457,428,449,0]Aj[968,13,910,312,270,449,0]Aj[968,13,910,477,344,449,0]Aj[968,13,910,729,550,449,0]Aj[968,13,910,964,929,449,0]Aj[858,13,411,408,339,449,0]Aj[858,13,411,408,267,449,0]Aj[858,13,411,408,968,449,0]Aj[858,13,411,408,425,449,0]Aj[858,13,459,193,937,449,0]Aj[858,13,459,193,545,449,0]Ak[858,13,459,456,1010,449,0]Aj[858,13,459,459,709,449,0]Ai[858,13,323,11,444,449,0]Ai[858,13,323,10,443,449,0]Aj[858,13,323,421,352,449,0]Ah[858,13,21,21,543,449,0]Ah[858,13,21,21,711,449,0]Ah[858,13,21,21,111,449,0]Ah[858,13,21,21,905,449,0]Ah[858,13,21,21,999,449,0]Ag[858,13,71,71,16,449,0]Aj[858,13,743,743,715,449,0]Aj[858,13,479,479,437,449,0]Aj[858,13,479,479,713,449,0]Aj[858,13,479,479,426,449,0]Aj[858,13,333,962,908,449,0]Aj[858,13,333,963,909,449,0]Aj[858,13,333,333,940,449,0]Aj[858,13,333,333,447,449,0]Aj[858,13,333,333,771,449,0]Aj[858,13,116,116,926,449,0]Aj[858,13,116,116,927,449,0]Aj[858,13,116,116,427,449,0]Aj[858,13,116,116,763,449,0]Ak[858,13,116,116,1060,449,0]Aj[858,13,538,538,271,449,0]Aj[858,13,560,560,998,449,0]Aj[858,13,560,560,450,449,0]Ak[858,13,483,191,1041,449,0]Ak[858,13,483,191,1072,449,0]Aj[968,13,910,457,428,716,0]Aj[858,13,411,408,968,716,0]Ah[858,13,21,21,711,716,0]Aj[858,13,116,116,763,716,0]Ak[858,13,116,116,1060,716,0]Ak[858,13,483,191,1072,716,0]Ae[968,5,969,719,0,0,0]Ac[858,5,459,0,0,0,0]Ab[858,5,21,0,0,0,0]Ac[858,5,479,0,0,0,0]Ac[858,5,743,0,0,0,0]Ah[968,13,969,719,708,0,0]Ah[858,12,459,459,762,0,0]Aj[858,13,333,333,447,762,0]Ah[858,13,333,962,908,0,0]Ah[858,13,333,963,909,0,0]Ah[858,13,333,333,447,0,0]Ah[858,13,479,479,437,0,0]Ah[858,13,21,21,543,928,0]Ag[858,13,323,11,444,0,0]Ag[858,13,323,10,443,0,0]Ah[968,13,969,969,423,0,0]Ac[858,2,255,0,0,0,0]Aj[968,13,969,420,769,349,0]Aj[968,13,969,420,761,349,0]Aj[968,13,969,420,966,349,0]Cm[858,13,333,962,908,113,0,\"impl-Read-for-WithHyperIo%3CI%3E\"]Db[858,13,333,962,908,706,0,\"impl-AsyncRead-for-WithHyperIo%3CI%3E\"]Cm[858,13,333,963,909,113,0,\"impl-Read-for-WithTokioIo%3CI%3E\"]Db[858,13,333,963,909,706,0,\"impl-AsyncRead-for-WithTokioIo%3CI%3E\"]Ci[858,13,333,333,447,113,0,\"impl-Read-for-TokioIo%3CT%3E\"]Cn[858,13,333,333,447,706,0,\"impl-AsyncRead-for-TokioIo%3CT%3E\"]9Aj[968,13,969,310,262,102,0]Aj[968,13,969,410,340,102,0]Aj[968,13,969,190,106,102,0]Aj[968,13,969,476,436,102,0]<=;:Ag[858,13,323,11,444,0,0]998:3499Ac[858,5,116,0,0,0,0]9:4;9:;999939999;:92;9;4;59;999999") \ No newline at end of file diff --git a/core/target/doc/search.index/function/b4a156e6fc33.js b/core/target/doc/search.index/function/b4a156e6fc33.js deleted file mode 100644 index 95524613..00000000 --- a/core/target/doc/search.index/function/b4a156e6fc33.js +++ /dev/null @@ -1 +0,0 @@ -rd_("Ao[\"{{{ELl{Mn}}{ELl{Mn}}}Nl}\",[]]l[\"{BAn}\",[]]Af[\"{{CEdc}CEd`}\",[\"S\"]]0Bn[\"{{{ELl{{B@l{c}}}}{ELl{IbEHl}}}BKf{}}\",[\"D\"]]Bo[\"{{{ELl{{EHh{c}}}}{ELl{IbEHl}}}BKfB@h}\",[\"B\"]]Cg[\"{{{ELl{{BJh{ce}}}}{ELl{IbEHl}}}BKfB@hB@h}\",[\"L\",\"R\"]]Bn[\"{{{ELl{{Md{c}}}}{ELl{IbEHl}}}BKfB@h}\",[\"D\"]]Bo[\"{{{ELl{{CFh{c}}}}{ELl{IbEHl}}}BKfB@h}\",[\"B\"]]Bd[\"{{{ELl{GM`}}{ELl{IbEHl}}}BKf}\",[]]0Bo[\"{{{ELl{{F@b{c}}}}{ELl{IbEHl}}}BKfB@h}\",[\"S\"]]Bo[\"{{{ELl{{EOb{c}}}}{ELl{IbEHl}}}BKfB@h}\",[\"B\"]]Bo[\"{{{ELl{{GHl{c}}}}{ELl{IbEHl}}}BKfB@h}\",[\"B\"]]Ce[\"{{{ELl{{CE`{ce}}}}{ELl{IbEHl}}}BKf{}{}}\",[\"D\",\"E\"]]Ce[\"{{{ELl{{GEj{ce}}}}{ELl{IbEHl}}}BKf{}{}}\",[\"D\",\"E\"]]Cd[\"{{{ELl{{BAl{c}}}}{ELl{IbEHl}}}BKf{B@hBBb}}\",[\"T\"]]Cf[\"{{{ELl{{BK`{ce}}}}{ELl{IbEHl}}}BKfB@h{}}\",[\"B\",\"F\"]]Cf[\"{{{ELl{{DDl{ce}}}}{ELl{IbEHl}}}BKfB@h{}}\",[\"B\",\"F\"]]Ce[\"{{{ELl{{BJf{ce}}}}{ELl{IbEHl}}}BKf{}{}}\",[\"C\",\"B\"]]Bd[\"{{{ELl{BAf}}{ELl{IbEHl}}}BKf}\",[]]0Bd[\"{{{ELl{GI`}}{ELl{IbEHl}}}BKf}\",[]]Bd[\"{{{ELl{CEb}}{ELl{IbEHl}}}BKf}\",[]]Bo[\"{{{ELl{{GEb{c}}}}{ELl{IbEHl}}}BKfB@h}\",[\"R\"]]Bd[\"{{{ELl{DDb}}{ELl{IbEHl}}}BKf}\",[]]Bd[\"{{{ELl{GNd}}{ELl{IbEHl}}}BKf}\",[]]Bd[\"{{{ELl{EHj}}{ELl{IbEHl}}}BKf}\",[]]Bo[\"{{{ELl{{CGh{c}}}}{ELl{IbEHl}}}BKfB@h}\",[\"C\"]]Bo[\"{{{ELl{{CGf{c}}}}{ELl{IbEHl}}}BKfB@h}\",[\"C\"]]Bo[\"{{{ELl{{BL`{c}}}}{ELl{IbEHl}}}BKfB@h}\",[\"C\"]]Bd[\"{{{ELl{DCn}}{ELl{IbEHl}}}BKf}\",[]]Bd[\"{{{ELl{EHn}}{ELl{IbEHl}}}BKf}\",[]]Bc[\"{{{ELl{Mn}}{ELl{IbEHl}}}BKf}\",[]]0Bd[\"{{{ELl{GAb}}{ELl{IbEHl}}}BKf}\",[]]Bd[\"{{{ELl{GLn}}{ELl{IbEHl}}}BKf}\",[]]0Dc[\"{{{ELl{{EIf{ec}}}}{ELl{IbEHl}}}BKfB@h{{CGd{c}}B@h}}\",[\"Dst\",\"M\"]]Bd[\"{{{ELl{CFj}}{ELl{IbEHl}}}BKf}\",[]]Bd[\"{{{ELl{EIb}}{ELl{IbEHl}}}BKf}\",[]]Bo[\"{{{ELl{{GAh{c}}}}{ELl{IbEHl}}}BKfB@h}\",[\"I\"]]Bo[\"{{{ELl{{GAj{c}}}}{ELl{IbEHl}}}BKfB@h}\",[\"I\"]]Bd[\"{{{ELl{GEh}}{ELl{IbEHl}}}BKf}\",[]]Bo[\"{{{ELl{{CGn{c}}}}{ELl{IbEHl}}}BKfB@h}\",[\"T\"]]Bd[\"{{{ELl{F@f}}{ELl{IbEHl}}}BKf}\",[]]Bo[\"{{{ELl{{CEf{c}}}}{ELl{IbEHl}}}BKfB@h}\",[\"E\"]]Bo[\"{{{ELl{{BAn{c}}}}{ELl{IbEHl}}}BKfB@h}\",[\"T\"]]Bd[\"{{{ELl{GLl}}{ELl{IbEHl}}}BKf}\",[]]Bd[\"{{{ELl{CHd}}{ELl{IbEHl}}}BKf}\",[]]Bo[\"{{{ELl{{HBb{c}}}}{ELl{IbEHl}}}BKfB@h}\",[\"S\"]]Co[\"{{{ELl{{BJf{ce}}}}Bd}GI`{CEjB@fNdNf}{CEnLlNdBBh}}\",[\"C\",\"B\"]]Aj[\"{{}{{B@l{c}}}{}}\",[\"D\"]]Ah[\"{c{{Md{c}}}Al}\",[\"D\"]]An[\"{{cBIn}{{CFh{c}}}{}}\",[\"B\"]]Ai[\"{c{{F@b{c}}}{}}\",[\"S\"]]Ai[\"{c{{EOb{c}}}{}}\",[\"B\"]]Ai[\"{c{{GHl{c}}}{}}\",[\"B\"]]Da[\"{g{{CE`{ce}}}Al{}{{Ll{}{{Ln{c}}{B@n{e}}}}NdNf}}\",[\"D\",\"E\",\"B\"]]Co[\"{g{{GEj{ce}}}Al{}{{Ll{}{{Ln{c}}{B@n{e}}}}Nd}}\",[\"D\",\"E\",\"B\"]]Bo[\"{cCEb{{DCl{{Bb{{Aj{BJj}}}}}}NdNfB@f}}\",[\"E\"]]n[\"{{}GEb}\",[]]n[\"{{}EHj}\",[]]Am[\"{{Bdc}{{CGh{c}}}{}}\",[\"C\"]]Am[\"{{Bdc}{{CGf{c}}}{}}\",[\"C\"]]Am[\"{{Bdc}{{BL`{c}}}{}}\",[\"C\"]]n[\"{{}GAb}\",[]]Bm[\"{e{{EIf{ec}}}{}{{CGd{c}}}}\",[\"Target\",\"M\"]]Ai[\"{c{{GAh{c}}}{}}\",[\"I\"]]Ai[\"{c{{GAj{c}}}{}}\",[\"I\"]]n[\"{{}GEh}\",[]]Ai[\"{c{{CGn{c}}}{}}\",[\"T\"]]n[\"{{}F@f}\",[]]Ai[\"{c{{CEf{c}}}{}}\",[\"E\"]]n[\"{{}GLl}\",[]]Ai[\"{c{{HBb{c}}}{}}\",[\"S\"]]Ah[\"{{{ELl{F@f}}}CFd}\",[]]B`[\"{{{ELl{EIb}}}{{ELl{Bd}}}}\",[]]Em[\"{{{ELl{Ib{ELl{{BJf{ce}}}}}}{CFn{e}}}g{CEjB@fNdNf}{LlNdBBh}{}}\",[\"C\",\"B\",\"Service::Future\"]]Ef[\"{{{ELl{Ib{BJf{ce}}}}{CFn{e}}}g{CEjB@fNdNf}{LlNdBBh}{}}\",[\"C\",\"B\",\"Service::Future\"]]D`[\"{{{ELl{Ib{GEb{c}}}}Bd}e{`B@fNdNf}{}}\",[\"R\",\"Service::Future\"]]Da[\"{{{ELl{Ib{CGh{c}}}}Bd}e{{CGd{Bd}}}{}}\",[\"C\",\"Service::Future\"]]Da[\"{{{ELl{Ib{CGf{c}}}}Bd}e{{CGd{Bd}}}{}}\",[\"C\",\"Service::Future\"]]Da[\"{{{ELl{Ib{BL`{c}}}}Bd}e{{CGd{Bd}}}{}}\",[\"C\",\"Service::Future\"]]Bm[\"{{{ELl{IbGAb}}Mn}c{}}\",[\"Service::Future\"]]Dk[\"{{{ELl{Ib{EIf{ec}}}}c}g{}{{CGd{c}}}{}}\",[\"Target\",\"M\",\"Service::Future\"]]Bd[\"{{{ELl{Ib}}{CFn{c}}}{}{}}\",[\"B1\"]]Df[\"{{{ELl{{HBb{e}}}}c}g{}{{CGd{c}}B@f}{}}\",[\"R\",\"S\",\"Service::Future\"]]Aj[\"{{{ELl{IbEHn}}}B@b}\",[]]A`[\"{cc{}}\",[\"T\"]]000Cc[\"{{{ELl{Lf}}}{{Md{c}}}{Al{Mb{{ELl{Lf}}}}}}\",[\"D\"]]Be[\"{B@d{{Md{c}}}{Al{Mb{B@d}}}}\",[\"D\"]]Ca[\"{{{Bf{Ab}}}{{Md{c}}}{Al{Mb{{Bf{Ab}}}}}}\",[\"D\"]]Da[\"{{{ELl{{BIb{Ab}}}}}{{Md{c}}}{Al{Mb{{ELl{{BIb{Ab}}}}}}}}\",[\"D\"]]Cn[\"{{{An{c}}}{{Md{e}}}{CGjBBb}{Al{Mb{{ELl{c}}}}Mb}}\",[\"B\",\"D\"]]Be[\"{BKl{{Md{c}}}{Al{Mb{BKl}}}}\",[\"D\"]]666666666666666666666666666666666666666666666666Bi[\"{{{ELl{Mn}}{ELl{Ibc}}}B@bBJl}\",[\"__H\"]]Af[\"{{CEdc}CEd`}\",[\"S\"]]Aa[\"{{}c{}}\",[\"U\"]]000000000000000000000000000000000000000000000000000Cc[\"{{{ELl{IbDCn}}}{{BKb{c}}}{}}\",[\"Iterator::Item\"]]Ed[\"{{{Bb{{ELl{Ib{CEh{c}}}}}}{ELl{IbCEl}}}{{N`{e}}}{LlBBb}{}}\",[\"T\",\"Future::Output\"]]Eg[\"{{{Bb{{ELl{Ib{BAl{c}}}}}}{ELl{IbCEl}}}{{N`{e}}}{LlBBhBBb}{}}\",[\"T\",\"Future::Output\"]]Dd[\"{{{Bb{{ELl{IbGI`}}}}{ELl{IbCEl}}}{{N`{c}}}{}}\",[\"Future::Output\"]]Dd[\"{{{Bb{{ELl{IbEHn}}}}{ELl{IbCEl}}}{{N`{c}}}{}}\",[\"Future::Output\"]]Ie[\"{{{Bb{{ELl{Ib{EOf{cgi}}}}}}{ELl{IbCEl}}}{{N`{k}}}{NbBBjBBh}Ll{{CGb{{CFn{DDd}}}{{DDn{{DE`{e}}}}}}}{{H@l{e}}}{}}\",[\"I\",\"B\",\"S\",\"E\",\"Future::Output\"]]Ig[\"{{{Bb{{ELl{Ib{HDh{cgi}}}}}}{ELl{IbCEl}}}{{N`{k}}}{NbBBjBBhNd}Ll{{CGb{{CFn{DDd}}}{{DDn{{DE`{e}}}}}}}{{H@l{e}}}{}}\",[\"I\",\"B\",\"S\",\"E\",\"Future::Output\"]]En[\"{{{Bb{{ELl{Ib{HF`{ec}}}}}}{ELl{IbCEl}}}{{N`{g}}}{}{{CGd{c}}}{}}\",[\"R\",\"S\",\"Future::Output\"]]Ce[\"{CDn{{CE`{ce}}}{}{}}\",[\"Body::Data\",\"Body::Error\"]]Cf[\"{{{ELl{CEb}}c}{{BJf{ce}}}{CEjB@f}{LlNd}}\",[\"C\",\"B\"]]o[\"{CEdCFj}\",[]]Cb[\"{{{ELl{Ib{B`{ec}}}}}B@b{}{{`{c}}}}\",[\"Req\",\"T\"]]Bi[\"{{{ELl{{B@l{c}}}}}{{B@l{c}}}{}}\",[\"D\"]]Cc[\"{{{ELl{{BJh{ce}}}}}{{BJh{ce}}}B@fB@f}\",[\"L\",\"R\"]]Bh[\"{{{ELl{{Md{c}}}}}{{Md{c}}}B@f}\",[\"D\"]]Bj[\"{{{ELl{{CFh{c}}}}}{{CFh{c}}}B@f}\",[\"B\"]]Bj[\"{{{ELl{{F@b{c}}}}}{{F@b{c}}}B@f}\",[\"S\"]]Bj[\"{{{ELl{{EOb{c}}}}}{{EOb{c}}}B@f}\",[\"B\"]]Bj[\"{{{ELl{{GHl{c}}}}}{{GHl{c}}}B@f}\",[\"B\"]]Cc[\"{{{ELl{{BK`{ce}}}}}{{BK`{ce}}}B@fB@f}\",[\"B\",\"F\"]]Cc[\"{{{ELl{{DDl{ce}}}}}{{DDl{ce}}}B@fB@f}\",[\"B\",\"F\"]]Cb[\"{{{ELl{{BJf{ce}}}}}{{BJf{ce}}}B@f{}}\",[\"C\",\"B\"]]Ah[\"{{{ELl{CEb}}}CEb}\",[]]Bj[\"{{{ELl{{GEb{c}}}}}{{GEb{c}}}B@f}\",[\"R\"]]Ah[\"{{{ELl{DDb}}}DDb}\",[]]Ah[\"{{{ELl{GNd}}}GNd}\",[]]Bj[\"{{{ELl{{CGh{c}}}}}{{CGh{c}}}B@f}\",[\"C\"]]Bj[\"{{{ELl{{CGf{c}}}}}{{CGf{c}}}B@f}\",[\"C\"]]Bj[\"{{{ELl{{BL`{c}}}}}{{BL`{c}}}B@f}\",[\"C\"]]Af[\"{{{ELl{Mn}}}Mn}\",[]]Ah[\"{{{ELl{GAb}}}GAb}\",[]]Da[\"{{{ELl{{EIf{ec}}}}}{{EIf{ec}}}{}{{CGd{c}}B@f}}\",[\"Target\",\"M\"]]Ah[\"{{{ELl{EIb}}}EIb}\",[]]Ah[\"{{{ELl{GEh}}}GEh}\",[]]Ah[\"{{{ELl{F@f}}}F@f}\",[]]Bj[\"{{{ELl{{CEf{c}}}}}{{CEf{c}}}B@f}\",[\"E\"]]Bj[\"{{{ELl{{HBb{c}}}}}{{HBb{c}}}B@f}\",[\"S\"]]Ah[\"{{{ELl{GLl}}}BIn}\",[]]An[\"{{EHjc}EHj{B@fNdNf}}\",[\"T\"]]Bc[\"{{{ELl{IbCDn}}}{{BAl{CDn}}}}\",[]]Bk[\"{{{ELl{Ib{GCn{c}}}}}{{GCl{c}}}{}}\",[\"E\"]]Bk[\"{{{ELl{Ib{CEf{c}}}}}{{GCl{c}}}{}}\",[\"E\"]]Bk[\"{{{ELl{Ib{GCl{c}}}}}{{GCn{c}}}{}}\",[\"E\"]]Bk[\"{{{ELl{Ib{CEf{c}}}}}{{GCn{c}}}{}}\",[\"E\"]]Af[\"{{CEdc}CEd`}\",[\"S\"]]Bi[\"{{{ELl{{GAh{c}}}}}{{ELl{c}}}{}}\",[\"I\"]]Bi[\"{{{ELl{{GAj{c}}}}}{{ELl{c}}}{}}\",[\"I\"]]Bi[\"{{{ELl{{CGn{c}}}}}{{ELl{c}}}{}}\",[\"T\"]]Ac[\"{{EHjNl}EHj}\",[]]Cc[\"{{{ELl{F@f}}{ELl{Ib{Bb{{Aj{BBd}}}}}}CFd}B@b}\",[]]Bi[\"{{{ELl{F@f}}DCj}{{Bb{{Aj{BBd}}}}}}\",[]]Cb[\"{{{ELl{IbCEb}}c}{{ELl{IbCEb}}}{BBfNdNf}}\",[\"M\"]]Db[\"{{{ELl{Ib{GCl{c}}}}e}{{ELl{Ib{GCl{c}}}}}{}{BBfNdNf}}\",[\"E\",\"M\"]]Db[\"{{{ELl{Ib{GCn{c}}}}e}{{ELl{Ib{GCn{c}}}}}{}{BBfNdNf}}\",[\"E\",\"M\"]]Cc[\"{{{ELl{GLl}}c}{{`{{BJj{}{{BKd{}}}}}}}H@j}\",[\"C\"]]Bl[\"{{CHdc}{{`{{BJj{}{{BKd{}}}}}}}H@j}\",[\"C\"]]Ao[\"{{{ELl{Mn}}}{{ELl{Lf}}}}\",[]]Ak[\"{ELl{{ELl{c}}}{}}\",[\"T\"]]000000000000000000000000000000000000000000000000000Ah[\"{{{ELl{EHj}}}B@b}\",[]]Eg[\"{{{ELl{Ib{B`{ec}}}}g}B@b{}{{`{c}}}{{BAh{ELl{ELl{Ib}}}{{BKd{Nl}}}}}}\",[\"Req\",\"T\",\"F\"]]Ej[\"{{{ELl{Ib{EIf{ec}}}}g}B@b{}{{CGd{c}}}{{BAh{{ELl{Ib}}}{{BKd{Nl}}}}}}\",[\"Target\",\"M\",\"F\"]]Bh[\"{{{ELl{BAf}}}{{BKb{{ELl{BA`}}}}}}\",[]]Cf[\"{{{ELl{Ib{GCl{c}}}}Nl}{{ELl{Ib{GCl{c}}}}}{}}\",[\"E\"]]Bo[\"{cCEb{{DCl{{Bb{{Aj{BJj}}}}}}NdNfB@f}}\",[\"E\"]]Al[\"{{}{{`{c``}}}{}}\",[\"Dst\"]]Ac[\"{{}{{`{`}}}}\",[]]Af[\"{{}{{`{````}}}}\",[]]n[\"{{}CEd}\",[]]Ah[\"{CDn{{CEh{CDn}}}}\",[]]Aj[\"{{}{{B@l{c}}}{}}\",[\"D\"]]Aj[\"{{}{{EHh{c}}}{}}\",[\"B\"]]Ai[\"{{}{{Md{c}}}Al}\",[\"D\"]]Ba[\"{{}{{CE`{ce}}}Al{}}\",[\"D\",\"E\"]]Ba[\"{{}{{GEj{ce}}}Al{}}\",[\"D\",\"E\"]]6n[\"{{}GEh}\",[]]n[\"{{}F@f}\",[]]Ak[\"{{}{{CEf{c}}}CEn}\",[\"E\"]]n[\"{{}GLl}\",[]]Be[\"{{{ELl{GEh}}c}B@b{BJjNd}}\",[\"Fut\"]]Cd[\"{{{ELl{Ib{BK`{ce}}}}}{{ELl{Ibc}}}{}{}}\",[\"B\",\"F\"]]Cd[\"{{{ELl{Ib{DDl{ce}}}}}{{ELl{Ibc}}}{}{}}\",[\"B\",\"F\"]]C`[\"{{{ELl{{BK`{ce}}}}}{{ELl{c}}}{}{}}\",[\"B\",\"F\"]]C`[\"{{{ELl{{DDl{ce}}}}}{{ELl{c}}}{}{}}\",[\"B\",\"F\"]]Di[\"{{CDng}{{BK`{CDng}}}{}{}{{BAh{c}{{BKd{e}}}}}}\",[\"Body::Error\",\"E\",\"F\"]]Db[\"{{{ELl{{BJf{ce}}}}{CFn{e}}}GI`{CEjB@fNdNf}{LlNdBBh}}\",[\"C\",\"B\"]]Db[\"{{{ELl{Ib{B`{ec}}}}{ELl{c}}}{{ELl{Ib}}}{}{{`{c}}}}\",[\"Req\",\"T\"]]o[\"{ELlBLb}\",[]]000000000000000000000000000000000000000000000000000Ah[\"{{{ELl{GLl}}}CHd}\",[]]Bm[\"{DEf{{BKh{{BAn{c}}DEf}}}{NbBBjBBh}}\",[\"T\"]]n[\"{{}CFj}\",[]]C`[\"{{{ELl{Lf}}}{{BKh{Mnc}}}{}}\",[\"FromStr::Err\"]]Ce[\"{{{ELl{{EIf{ec}}}}}Nl{}{{CGd{c}}}}\",[\"Target\",\"M\"]]Cg[\"{{{ELl{EIb}}}{{BKb{{BIl{{ELl{Lf}}{ELl{Lf}}}}}}}}\",[]]o[\"{BAnB@d}\",[]]Bg[\"{{{ELl{IbCEb}}Nl}{{ELl{IbCEb}}}}\",[]]o[\"{GLlB@b}\",[]]Ak[\"{{{EHh{c}}}B@dAl}\",[\"B\"]]Ab[\"{ELlc{}}\",[\"T\"]]000000000000000000000000Cb[\"{{{ELl{{EHh{c}}}}}{{BKb{{ELl{EI`}}}}}Al}\",[\"B\"]]Ao[\"{c{{BKh{e}}}{}{}}\",[\"U\",\"T\"]]000000000000000000000000000000000000000000000000000Aj[\"{{}{{BKh{c}}}{}}\",[\"U\"]]000000000000000000000000000000000000000000000000000Bn[\"{{{Bb{{ELl{Ibc}}}}{ELl{IbCEl}}}N`{}}\",[\"F\"]]00000Ba[\"{{{EHh{c}}}{{`{Al}}}Al}\",[\"B\"]]Ah[\"{{{ELl{EOd}}}EHj}\",[]]Bc[\"{{{ELl{{CGn{c}}}}}EHjEOd}\",[\"T\"]]Bm[\"{{{ELl{Ib{GAh{c}}}}}{{ELl{Ibc}}}{}}\",[\"I\"]]Bm[\"{{{ELl{Ib{GAj{c}}}}}{{ELl{Ibc}}}{}}\",[\"I\"]]Bm[\"{{{ELl{Ib{CGn{c}}}}}{{ELl{Ibc}}}{}}\",[\"T\"]]Bj[\"{{{ELl{CFj}}{ELl{Bd}}}{{BKb{EIb}}}}\",[]]Aa[\"{{}c{}}\",[\"I\"]]Bd[\"{{{CGh{c}}Nl}{{CGh{c}}}{}}\",[\"C\"]]Bd[\"{{{CGf{c}}Nl}{{CGf{c}}}{}}\",[\"C\"]]Ef[\"{{CDng}{{DDl{CDng}}}{}Al{{BAh{{BAj{c}}}{{BKd{{BAj{e}}}}}}}}\",[\"Body::Data\",\"B\",\"F\"]]Ee[\"{{{Bb{{ELl{Ib{F@b{c}}}}}}{ELl{IbCEl}}}{{N`{{BKb{e}}}}}BKj{}}\",[\"S\",\"Stream::Item\"]]Ed[\"{{{Bb{{ELl{Ib{EOb{c}}}}}}{ELl{IbCEl}}}{{N`{{BKb{e}}}}}Ll{}}\",[\"B\",\"Stream::Item\"]]Ed[\"{{{Bb{{ELl{Ib{GHl{c}}}}}}{ELl{IbCEl}}}{{N`{{BKb{e}}}}}Ll{}}\",[\"B\",\"Stream::Item\"]]Dl[\"{{{Bb{{ELl{Ib{GAh{c}}}}}}{ELl{IbCEl}}GEd}{{N`{{BKh{B@bBAb}}}}}EHd}\",[\"I\"]]Ee[\"{{{Bb{{ELl{Ib{GAh{c}}}}}}{ELl{IbCEl}}{ELl{IbCFl}}}{{N`{{BKh{B@bBAb}}}}}EHd}\",[\"I\"]]Dk[\"{{{Bb{{ELl{Ib{GAj{c}}}}}}{ELl{IbCEl}}GEd}{{N`{{BKh{B@bBAb}}}}}Nb}\",[\"I\"]]Ed[\"{{{Bb{{ELl{Ib{GAj{c}}}}}}{ELl{IbCEl}}{ELl{IbCFl}}}{{N`{{BKh{B@bBAb}}}}}Nb}\",[\"I\"]]Dl[\"{{{Bb{{ELl{Ib{CGn{c}}}}}}{ELl{IbCEl}}GEd}{{N`{{BKh{B@bBAb}}}}}EHd}\",[\"T\"]]Ed[\"{{{Bb{{ELl{Ib{CGn{c}}}}}}{ELl{IbCEl}}{ELl{IbCFl}}}{{N`{{BKh{B@bBAb}}}}}Nb}\",[\"T\"]]Bb[\"{{{ELl{{B@l{c}}}}}DEbAl}\",[\"D\"]]E`[\"{{{ELl{{BJh{eg}}}}}DEbAl{{Ll{}{{Ln{c}}}}}{{Ll{}{{Ln{c}}}}}}\",[\"Data\",\"L\",\"R\"]]Ba[\"{{{ELl{{Md{c}}}}}DEbAl}\",[\"D\"]]Bb[\"{{{ELl{{CFh{c}}}}}DEbLl}\",[\"B\"]]Cf[\"{{{ELl{{F@b{c}}}}}{{BIl{BIn{BKb{BIn}}}}}BKj}\",[\"S\"]]Bi[\"{{{ELl{{CE`{ce}}}}}DEbAl{}}\",[\"D\",\"E\"]]Bi[\"{{{ELl{{GEj{ce}}}}}DEbAl{}}\",[\"D\",\"E\"]]D`[\"{{{ELl{{BK`{cg}}}}}DEbLl{}{{BAh{}{{BKd{e}}}}}}\",[\"B\",\"E\",\"F\"]]Dj[\"{{{ELl{{GDb{ce}}}}}DEbLl{{BJj{}{{BKd{{BKb{{BKh{EI`}}}}}}}}}}\",[\"T\",\"F\"]]o[\"{ELlBKl}\",[]]000Bh[\"{{{CGh{c}}BKlBKl}{{CGh{c}}}{}}\",[\"C\"]]Be[\"{{{BL`{c}}GAd}{{BL`{c}}}{}}\",[\"C\"]]Bh[\"{{{ELl{EIb}}}{{BKb{{ELl{GAd}}}}}}\",[]]Be[\"{{{ELl{Ib}}}{{ELl{Ibc}}}{}}\",[\"T\"]]000000000000000000000000000000000000000000000000000Bk[\"{{{ELl{CEb}}}{{BJf{GEbc}}}{LlNd}}\",[\"B\"]]B`[\"{{ELl{ELl{Ibc}}}B@b{}}\",[\"T\"]]000000000000000000000000Am[\"{{ELl{ELl{c}}}Nl{}}\",[\"K\"]]00Bd[\"{{{ELl{EHj}}{ELl{IbEOl}}}B@b}\",[]]Cf[\"{{{ELl{Ib{GCl{c}}}}Nl}{{ELl{Ib{GCl{c}}}}}{}}\",[\"E\"]]Bb[\"{{{CEf{c}}}{{CEf{c}}}{}}\",[\"E\"]]Bg[\"{{{ELl{IbCEb}}Nl}{{ELl{IbCEb}}}}\",[]]1Aj[\"{{{BJh{cc}}}c{}}\",[\"L\"]]B`[\"{{{BK`{ce}}}c{}{}}\",[\"B\",\"F\"]]B`[\"{{{DDl{ce}}}c{}{}}\",[\"B\",\"F\"]]Ai[\"{{{GAh{c}}}c{}}\",[\"I\"]]Ai[\"{{{GAj{c}}}c{}}\",[\"I\"]]Ai[\"{{{CGn{c}}}c{}}\",[\"T\"]]El[\"{{{EOf{cgi}}}{{EOf{cgi}}}{NbBBjBBh}Ll{{GAf{DDd}{{CG`{e}}}}}{{H@l{e}}}}\",[\"I\",\"B\",\"S\",\"E\"]]El[\"{{{HDh{cgi}}}{{HDh{cgi}}}{NbBBjBBh}Ll{{GAf{DDd}{{CG`{e}}}}}{{H@l{e}}}}\",[\"I\",\"B\",\"S\",\"E\"]]Ag[\"{{{ELl{BAf}}}Nl}\",[]]Ag[\"{{{ELl{EHj}}}Nl}\",[]]b[]beqbiobnobrt0bu8bv4bv5cAnycBoxcBufcCowcMapcPincUricVeccallcdns0cfmt0000000000000000000000000000000000000000000000cgetcmap0cmutcnew00000000000000000000000cnowcstrcu32curidBodydDatadDropdFromdFulldHashdIntodItemdLeftdNamedPolldReaddSenddSyncdauto0dbooldcall000000000dconn0ddropdfrom000000000000000000000000000000000000000000000000000000000dfulldgluedhashdhttp0dinto000000000000000000000000000000000000000000000000000dnextdpoll000000dpool0duniteByteseCloneeDebugeDerefeEmptyeError0000eFnMuteFrame0ePartseRighteSizedeSleepeTimereUnpineWriteeboxedebuild0ecache0ecleareclone000000000000000000000000ecounteemptyeextraeframe0ehttp10ehttp20ehttpseinner00eproxy0000eresetesleepesliceetimer00etokioetupleeusizeewatch0fBorrowfClientfEitherfFuturefHasherfIpAddrfMapErrfOptionfOutputfResult0fStreamfStringfTargetfTunnelfTypeIdfas_strfborrow000000000000000000000000000000000000000000000000000fclient00feitherflegacy0fpoisonfretain0fsealedfserver0fsourcefstreamftunnelfwritevgBodyExtgBoxBodygBuilder00gCollectgConnectgContextgDefaultgDisplaygFromStrgInstantgIoSlicegLimitedgMatchergReadBufgRequestgResBodygService0gSocksV4gSocksV5gToOwnedgTokioIo0gTryFromgTryIntogWatchergbuilder0000gcapturegcollect0gconnect0gdefault000000000gexecutegget_mut0gget_ref0glimitedgmap_err0gmatcher0gpointergrequestgservice00gtype_id000000000000000000000000000000000000000000000000000gupgrade0gwatcherhDurationhExecutorhGaiAddrshH2StreamhHttpInfohIncominghIpv4AddrhIpv6AddrhIteratorhMapFramehResponse0hSizeHinthToStringhUpgradedhbox_bodyhdowncasthfrom_envhfrom_strhgraceful0hinternal0his_emptyhraw_authhread_bufhset_hosthshutdownhto_byteshto_owned000000000000000000000000htrailershtry_from000000000000000000000000000000000000000000000000000htry_into000000000000000000000000000000000000000000000000000htry_poll00000iAsyncReadiBorrowMutiCollectediConnectediFormatteriGaiFutureiHeaderMapiInterceptiPartialEqiSingletoniTryFutureiTryStreamiaggregateicollectediconnected0iinner_mut00iinterceptiinto_iterilocal_dns0imap_frame0inegotiate0ipoll_next00ipoll_read00000ireferenceisingleton0isize_hint00000000ito_string000iwith_auth0jAsyncWritejBodyStreamjConnection0jEquivalent0jExtensionsjIntoFuturejSocketAddrjStreamBodyjTokioTimer0jbasic_authjborrow_mut000000000000000000000000000000000000000000000000000jbuild_httpjclone_into000000000000000000000000jequivalent00jget_extrasjhalf_closejhttp1_onlyjhttp2_only0jhyper_utiljinto_inner00000jinto_owned0jis_connectjis_proxiedjkeep_alivejlocal_addrjpoll_flush00000jpoll_frame00000000000jpoll_ready0000000jpoll_write00000jpool_timerkGaiResolverkHeaderValuekHttpServicekWithHyperIokWithTokioIokcombinators0kfrom_systemkget_pin_mut0kinto_future000000kmax_headerskremote_addrkset_nodelayksleep_untillHttp1BuilderlHttp2BuilderlIntoIteratorlWithTrailerslboxed_unsynclconnect_infolenforce_httplhttp1_writevlmax_buf_sizelwith_headersmCloneToUninitmHttpConnectormReadBufCursormTokioExecutor0mUnsyncBoxBodymis_end_stream0000000mnegotiated_h2mpoll_shutdown00000mset_interfacemset_keepalivemtry_poll_next00mwith_hyper_iomwith_tokio_iomwith_trailers0nBodyDataStreamnH2ClientFuturenResponseFuturenhttp_body_utilnmax_frame_sizenpipeline_flushoadaptive_windowoclone_to_uninit000000000000000000000000A`GracefulShutdownA`InvalidNameErrorA`LengthLimitErrorA`auto_date_header0A`execute_h2streamA`http09_responsesA`into_data_streamA`is_negotiated_h2A`serve_connection00AaCaptureConnectionAaexecute_h2_futureAagraceful_shutdown0000Aahttp1_max_headersAais_write_vectored00000Aamax_send_buf_sizeAanew_with_resolverAapool_idle_timeoutAaset_local_addressAaset_reuse_addressAbGracefulConnectionAbHttpServerConnExec0Abcapture_connectionAbhttp1_max_buf_sizeAbis_http1_availableAbis_http2_availableAbkeep_alive_timeoutAbtitle_case_headers0AcHttp2ClientConnExecAcHttp2ServerConnExecAcTowerToHyperServiceAcconnection_metadataAcheader_read_timeoutAckeep_alive_intervalAcpoll_write_vectored00000Acsend_optimisticallyAcset_connect_timeoutAcset_local_addressesAdhttp2_max_frame_sizeAdmax_header_list_sizeAdpreserve_header_case0Adset_recv_buffer_sizeAdset_send_buffer_sizeAeUpgradeableConnectionAehttp2_adaptive_windowAeset_keepalive_retriesAfignore_invalid_headersAfmax_concurrent_streamsAfpool_max_idle_per_hostAfset_keepalive_intervalAgenable_connect_protocolAghttp2_max_send_buf_sizeAgretry_canceled_requestsAhhttp1_title_case_headersAhhttp2_keep_alive_timeoutAiTowerToHyperServiceFutureAihttp1_read_buf_exact_sizeAihttp2_keep_alive_intervalAjhttp1_preserve_header_caseAjhttp2_max_header_list_sizeAjinitial_stream_window_sizeAjset_happy_eyeballs_timeoutAkhttp2_keep_alive_while_idleAlwait_for_connection_metadataAmmax_local_error_reset_streamsAnhttp2_initial_max_send_streamsAninitial_connection_window_sizeAnserve_connection_with_upgrades00B`http2_initial_stream_window_sizeB`max_pending_accept_reset_streamsBbhttp2_max_concurrent_reset_streamsBdhttp2_initial_connection_window_sizeBfhttp2_max_pending_accept_reset_streamsBihttp1_ignore_invalid_headers_in_responsesCahttp1_allow_spaces_after_header_name_in_responsesCchttp1_allow_obsolete_multiline_headers_in_responses") \ No newline at end of file diff --git a/core/target/doc/search.index/normalizedName/7d4fe036dff9.js b/core/target/doc/search.index/normalizedName/7d4fe036dff9.js deleted file mode 100644 index aed2840f..00000000 --- a/core/target/doc/search.index/normalizedName/7d4fe036dff9.js +++ /dev/null @@ -1 +0,0 @@ -rd_("b()b->b[]beqbiobnobrt0bu8bv4bv5canycboxcbufccowcmapcpincuricveccallcdns0cfmt0000000000000000000000000000000000000000000000cget77cmutcnew00000000000000000000000cnowcstrcu32:dbodyddataddropdfromdfulldhashdintoditemdleftdnamedpolldreaddsenddsyncdauto0dbooldcall000000000dconn0?>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>=dglue=dhttp0====================================================dnext:::::::dpool0dunitebytesecloneedebugederefeemptyeerror0000efnmuteframe0epartserightesizedesleepetimereunpinewriteeboxedebuild0ecache0ecleareclone000000000000000000000000ecounteemptyeextra??ehttp10ehttp20ehttpseinner00eproxy0000eresetesleepesliceetimer00etokioetupleeusizeewatch0fborrowfclientfeitherffuturefhasherfipaddrfmaperrfoptionfoutputfresult0fstreamfstringftargetftunnelftypeideasstr????????????????????????????????????????????????????>>>=flegacy0fpoisonfretain0fsealedfserver0fsource;8fwritevgbodyextgboxbodygbuilder00gcollectgconnectgcontextgdefaultgdisplaygfromstrginstantgiosliceglimitedgmatchergreadbufgrequestgresbodygservice0gsocksv4gsocksv5gtoownedgtokioio0gtryfromgtryintogwatchergbuilder0000gcapturegcollect0gconnect0gdefault000000000gexecutefgetmut0fgetref0glimitedfmaperr0gmatcher0gpointergrequestgservice00ftypeid000000000000000000000000000000000000000000000000000gupgrade0gwatcherhdurationhexecutorhgaiaddrshh2streamhhttpinfohincominghipv4addrhipv6addrhiteratorhmapframehresponse0hsizehinthtostringhupgradedgboxbodyhdowncastgfromenvgfromstrhgraceful0hinternal0gisemptygrawauthgreadbufgsethosthshutdowngtobytesgtoowned000000000000000000000000htrailersgtryfrom000000000000000000000000000000000000000000000000000gtryinto000000000000000000000000000000000000000000000000000gtrypoll00000iasyncreadiborrowmuticollectediconnectediformatterigaifutureiheadermapiinterceptipartialeqisingletonitryfutureitrystreamiaggregate:99hinnermut006hintoiterhlocaldns0hmapframe0inegotiate0hpollnext00hpollread00000ireference;;hsizehint00000000htostring000hwithauth0jasyncwritejbodystreamjconnection0jequivalent0jextensionsjintofuturejsocketaddrjstreambodyjtokiotimer0ibasicauthiborrowmut000000000000000000000000000000000000000000000000000ibuildhttpicloneinto000000000000000000000000999igetextrasihalfcloseihttp1onlyihttp2only0ihyperutiliintoinner00000iintoowned0iisconnectiisproxiedikeepaliveilocaladdripollflush00000ipollframe00000000000ipollready0000000ipollwrite00000ipooltimerkgairesolverkheadervaluekhttpservicekwithhyperiokwithtokioiokcombinators0jfromsystemigetpinmut0jintofuture000000jmaxheadersjremoteaddrjsetnodelayjsleepuntillhttp1builderlhttp2builderlintoiteratorlwithtrailerskboxedunsynckconnectinfokenforcehttpkhttp1writevjmaxbufsizekwithheadersmclonetouninitmhttpconnectormreadbufcursormtokioexecutor0munsyncboxbodykisendstream0000000lnegotiatedh2lpollshutdown00000lsetinterfacelsetkeepalivektrypollnext00kwithhyperiokwithtokioiolwithtrailers0nbodydatastreamnh2clientfuturenresponsefuturelhttpbodyutillmaxframesizempipelineflushnadaptivewindowmclonetouninit000000000000000000000000A`gracefulshutdownA`invalidnameerrorA`lengthlimiterrornautodateheader0oexecuteh2streamohttp09responsesnintodatastreamnisnegotiatedh2oserveconnection00Aacaptureconnectionoexecuteh2future:::::ohttp1maxheadersoiswritevectored00000nmaxsendbufsizeonewwithresolveropoolidletimeoutosetlocaladdressosetreuseaddressAbgracefulconnectionAbhttpserverconnexec0:ohttp1maxbufsizeA`ishttp1availableA`ishttp2availableA`keepalivetimeoutA`titlecaseheaders0Achttp2clientconnexecAchttp2serverconnexecActowertohyperserviceAbconnectionmetadataAaheaderreadtimeoutAakeepaliveintervalAapollwritevectored00000AbsendoptimisticallyAasetconnecttimeoutAasetlocaladdressesAahttp2maxframesizeAamaxheaderlistsizeAbpreserveheadercase0AasetrecvbuffersizeAasetsendbuffersizeAeupgradeableconnectionAchttp2adaptivewindowAcsetkeepaliveretriesAdignoreinvalidheadersAdmaxconcurrentstreamsAbpoolmaxidleperhostAdsetkeepaliveintervalAeenableconnectprotocolAchttp2maxsendbufsizeAeretrycanceledrequestsAehttp1titlecaseheadersAehttp2keepalivetimeoutAitowertohyperservicefutureAehttp1readbufexactsizeAfhttp2keepaliveintervalAghttp1preserveheadercaseAfhttp2maxheaderlistsizeAginitialstreamwindowsizeAgsethappyeyeballstimeoutAghttp2keepalivewhileidleAiwaitforconnectionmetadataAimaxlocalerrorresetstreamsAjhttp2initialmaxsendstreamsAkinitialconnectionwindowsizeAkserveconnectionwithupgrades00Alhttp2initialstreamwindowsizeAlmaxpendingacceptresetstreamsAnhttp2maxconcurrentresetstreamsB`http2initialconnectionwindowsizeBahttp2maxpendingacceptresetstreamsBdhttp1ignoreinvalidheadersinresponsesBjhttp1allowspacesafterheadernameinresponsesBmhttp1allowobsoletemultilineheadersinresponses") \ No newline at end of file diff --git a/core/target/doc/search.index/path/2e44ec07c3e2.js b/core/target/doc/search.index/path/2e44ec07c3e2.js deleted file mode 100644 index a40223d3..00000000 --- a/core/target/doc/search.index/path/2e44ec07c3e2.js +++ /dev/null @@ -1 +0,0 @@ -rd_("f[1,\"\"]00A`[2,\"hyper_util\"]1Cg[2,\"hyper_util::client::legacy::connect::proxy::socks\"]0A`[10,\"core::any\"]Ba[5,\"alloc::boxed\",\"alloc::boxed\"]Cb[10,\"bytes::buf::buf_impl\",\"bytes::buf::buf_impl\"]Bc[6,\"alloc::borrow\",\"alloc::borrow\"]Dc[5,\"hyper_util::client::pool::map\",\"hyper_util::client::pool::map\"]Ak[5,\"core::pin\",\"core::pin\"]Ak[5,\"http::uri\",\"http::uri\"]Am[5,\"alloc::vec\",\"alloc::vec\"]Bi[2,\"hyper_util::client::legacy::connect\"]An[2,\"hyper_util::client::pool\"]f[0,\"\"]==A`[10,\"http_body\"]g[17,\"\"]Af[10,\"core::ops::drop\"]Ad[10,\"core::convert\"]Bk[5,\"http_body_util\",\"http_body_util::full\"]Aa[10,\"core::hash\"]24Ei[5,\"hyper_util::client::legacy::connect::dns\",\"hyper_util::client::legacy::connect::dns\"]Bi[6,\"core::task::poll\",\"core::task::poll\"]Ad[10,\"hyper::rt::io\"]Bb[10,\"core::marker\",\"core::marker\"]0An[2,\"hyper_util::server::conn\"]f[1,\"\"]Ah[2,\"hyper_util::server\"]Ad[2,\"http_body_util\"]Ai[2,\"hyper_util::service\"]Bi[2,\"hyper_util::client::legacy::connect\"]Ah[2,\"hyper_util::client\"]5Ba[5,\"bytes::bytes\",\"bytes::bytes\"]Ab[10,\"core::clone\"]A`[10,\"core::fmt\"]Bj[10,\"core::ops::deref\",\"core::ops::deref\"]Bl[5,\"http_body_util\",\"http_body_util::empty\"]g[17,\"\"]Ab[10,\"core::error\"]Be[5,\"std::io::error\",\"std::io::error\"]De[5,\"hyper_util::client::legacy\",\"hyper_util::client::legacy::client\"]Al[10,\"core::ops\",\"core::ops\"]Bi[5,\"http_body::frame\",\"http_body::frame\"]Df[5,\"http_body_util::combinators\",\"http_body_util::combinators::frame\"]Eg[5,\"hyper_util::server::conn::auto::upgrade\",\"hyper_util::server::conn::auto::upgrade\"]Bb[10,\"core::marker\",\"core::marker\"]Bj[10,\"hyper::rt::timer\",\"hyper::rt::timer\"]Ag[10,\"hyper::rt::timer\"]2Ad[10,\"hyper::rt::io\"]An[2,\"hyper_util::client::pool\"]Ad[2,\"http_body_util\"]Ba[2,\"http_body_util::combinators\"]Ah[2,\"hyper_util::client\"]Bi[2,\"hyper_util::client::legacy::connect\"]f[1,\"\"]Ad[2,\"hyper_util::rt\"]11Ac[10,\"core::borrow\"]De[5,\"hyper_util::client::legacy\",\"hyper_util::client::legacy::client\"]Bm[6,\"http_body_util\",\"http_body_util::either\"]Ak[10,\"core::future::future\"]An[10,\"core::hash\",\"core::hash\"]Bm[6,\"core::net::ip_addr\",\"core::net::ip_addr\"]Dh[5,\"http_body_util::combinators\",\"http_body_util::combinators::map_err\"]Ba[6,\"core::option\",\"core::option\"]g[17,\"\"]Ak[8,\"core::fmt\",\"core::fmt\"]Ba[6,\"core::result\",\"core::result\"]Ak[10,\"futures_core::stream\"]Bc[5,\"alloc::string\",\"alloc::string\"]4Fe[5,\"hyper_util::client::legacy::connect::proxy\",\"hyper_util::client::legacy::connect::proxy::tunnel\"]Ak[5,\"core::any\",\"core::any\"]A`[2,\"hyper_util\"]B`[2,\"hyper_util::client::legacy\"]Ad[2,\"http_body_util\"]Ah[2,\"hyper_util::client\"]Bi[2,\"hyper_util::client::legacy::connect\"]42C`[2,\"hyper_util::client::legacy::connect::proxy\"]Bf[10,\"http_body_util\",\"http_body_util\"]Di[5,\"http_body_util::combinators\",\"http_body_util::combinators::box_body\"]De[5,\"hyper_util::client::legacy\",\"hyper_util::client::legacy::client\"]Dm[5,\"hyper_util::client::proxy::matcher\",\"hyper_util::client::proxy::matcher\"]De[5,\"hyper_util::server::conn::auto\",\"hyper_util::server::conn::auto\"]Dh[5,\"http_body_util::combinators\",\"http_body_util::combinators::collect\"]Eh[10,\"hyper_util::client::legacy::connect\",\"hyper_util::client::legacy::connect::sealed\"]Bi[5,\"core::task::wake\",\"core::task::wake\"]Ad[10,\"core::default\"]A`[10,\"core::fmt\"]Ah[10,\"core::str::traits\"]Ak[5,\"std::time\",\"std::time\"]Ag[5,\"std::io\",\"std::io\"]Bn[5,\"http_body_util\",\"http_body_util::limited\"]:Bo[5,\"tokio::io::read_buf\",\"tokio::io::read_buf\"]Bc[5,\"http::request\",\"http::request\"]g[17,\"\"]An[10,\"hyper::service::service\"]Ad[10,\"tower_service\"]Fh[5,\"hyper_util::client::legacy::connect::proxy\",\"hyper_util::client::legacy::connect::proxy::socks::v4\"]Fh[5,\"hyper_util::client::legacy::connect::proxy\",\"hyper_util::client::legacy::connect::proxy::socks::v5\"]Ad[10,\"alloc::borrow\"]Cc[5,\"hyper_util::rt::tokio\",\"hyper_util::rt::tokio\"]Ad[10,\"core::convert\"]0Da[5,\"hyper_util::server::graceful\",\"hyper_util::server::graceful\"]Bi[2,\"hyper_util::client::legacy::connect\"]Ba[2,\"http_body_util::combinators\"]B`[2,\"hyper_util::client::legacy\"]Ad[2,\"http_body_util\"]2Ao[2,\"hyper_util::client::proxy\"]f[1,\"\"]A`[2,\"hyper_util\"]Bd[2,\"hyper_util::server::conn::auto\"]Am[5,\"core::time\",\"core::time\"]A`[10,\"hyper::rt\"]Ei[5,\"hyper_util::client::legacy::connect::dns\",\"hyper_util::client::legacy::connect::dns\"]Ci[5,\"hyper::proto::h2::server\",\"hyper::proto::h2::server\"]Ee[5,\"hyper_util::client::legacy::connect\",\"hyper_util::client::legacy::connect::http\"]Cc[5,\"hyper::body::incoming\",\"hyper::body::incoming\"]Bm[5,\"core::net::ip_addr\",\"core::net::ip_addr\"]0Bc[10,\"core::iter::traits::iterator\"]Dj[5,\"http_body_util::combinators\",\"http_body_util::combinators::map_frame\"]g[17,\"\"]Be[5,\"http::response\",\"http::response\"]Ca[5,\"http_body::size_hint\",\"http_body::size_hint\"]Ad[10,\"alloc::string\"]Be[5,\"hyper::upgrade\",\"hyper::upgrade\"]Ba[2,\"http_body_util::combinators\"]Ah[2,\"hyper_util::server\"]Be[2,\"hyper_util::client::pool::cache\"]Bi[2,\"hyper_util::client::pool::negotiate\"]Al[10,\"tokio::io::async_read\"]Ac[10,\"core::borrow\"]C`[5,\"http_body_util\",\"http_body_util::collected\"]Do[5,\"hyper_util::client::legacy::connect\",\"hyper_util::client::legacy::connect\"]Ak[5,\"core::fmt\",\"core::fmt\"]Ei[5,\"hyper_util::client::legacy::connect::dns\",\"hyper_util::client::legacy::connect::dns\"]Bk[5,\"http::header::map\",\"http::header::map\"]Dm[5,\"hyper_util::client::proxy::matcher\",\"hyper_util::client::proxy::matcher\"]A`[10,\"core::cmp\"]Do[5,\"hyper_util::client::pool::singleton\",\"hyper_util::client::pool::singleton\"]Ak[10,\"futures_core::future\"]Ak[10,\"futures_core::stream\"]Ad[2,\"http_body_util\"]Ba[2,\"http_body_util::combinators\"]An[2,\"hyper_util::client::pool\"]f[1,\"\"]1Am[10,\"tokio::io::async_write\"]Bm[5,\"http_body_util\",\"http_body_util::stream\"]E`[10,\"hyper_util::client::legacy::connect\",\"hyper_util::client::legacy::connect\"]De[5,\"hyper_util::server::conn::auto\",\"hyper_util::server::conn::auto\"]A`[10,\"hashbrown\"]Aa[10,\"equivalent\"]Bi[5,\"http::extensions\",\"http::extensions\"]B`[10,\"core::future::into_future\"]Ce[6,\"core::net::socket_addr\",\"core::net::socket_addr\"]7Cc[5,\"hyper_util::rt::tokio\",\"hyper_util::rt::tokio\"]f[3,\"\"]Ei[5,\"hyper_util::client::legacy::connect::dns\",\"hyper_util::client::legacy::connect::dns\"]Bo[5,\"http::header::value\",\"http::header::value\"]Ak[10,\"hyper::service::http\"]Db[5,\"hyper_util::rt::tokio\",\"hyper_util::rt::tokio::with_hyper_io\"]Db[5,\"hyper_util::rt::tokio\",\"hyper_util::rt::tokio::with_tokio_io\"]Ad[2,\"http_body_util\"]==Bb[10,\"core::iter::traits::collect\"]Dn[5,\"http_body_util::combinators\",\"http_body_util::combinators::with_trailers\"]Ab[10,\"core::clone\"]Ee[5,\"hyper_util::client::legacy::connect\",\"hyper_util::client::legacy::connect::http\"]Bc[5,\"hyper::rt::io\",\"hyper::rt::io\"]Settings

All

Rustdoc settings

Back
\ No newline at end of file diff --git a/core/target/doc/src-files.js b/core/target/doc/src-files.js deleted file mode 100644 index 24d86e8e..00000000 --- a/core/target/doc/src-files.js +++ /dev/null @@ -1,2 +0,0 @@ -createSrcSidebar('[["http_body_util",["",[["combinators",[],["box_body.rs","collect.rs","frame.rs","map_err.rs","map_frame.rs","mod.rs","with_trailers.rs"]]],["collected.rs","either.rs","empty.rs","full.rs","lib.rs","limited.rs","stream.rs","util.rs"]]],["hyper_util",["",[["client",[["legacy",[["connect",[["proxy",[["socks",[["v4",[],["errors.rs","messages.rs","mod.rs"]],["v5",[],["errors.rs","messages.rs","mod.rs"]]],["mod.rs"]]],["mod.rs","tunnel.rs"]]],["capture.rs","dns.rs","http.rs","mod.rs"]]],["client.rs","mod.rs","pool.rs"]],["pool",[],["cache.rs","map.rs","mod.rs","negotiate.rs","singleton.rs"]],["proxy",[],["matcher.rs","mod.rs"]]],["mod.rs"]],["common",[],["exec.rs","future.rs","lazy.rs","mod.rs","rewind.rs","sync.rs","timer.rs"]],["rt",[["tokio",[],["with_hyper_io.rs","with_tokio_io.rs"]]],["io.rs","mod.rs","tokio.rs"]],["server",[["conn",[["auto",[],["mod.rs","upgrade.rs"]]],["mod.rs"]]],["graceful.rs","mod.rs"]],["service",[],["glue.rs","mod.rs","oneshot.rs"]]],["error.rs","lib.rs"]]]]'); -//{"start":19,"fragment_lengths":[234,760]} \ No newline at end of file diff --git a/core/target/doc/src/http_body_util/collected.rs.html b/core/target/doc/src/http_body_util/collected.rs.html deleted file mode 100644 index 135b3b58..00000000 --- a/core/target/doc/src/http_body_util/collected.rs.html +++ /dev/null @@ -1,179 +0,0 @@ -collected.rs - source

http_body_util/
collected.rs

1use std::{
-2    convert::Infallible,
-3    pin::Pin,
-4    task::{Context, Poll},
-5};
-6
-7use bytes::{Buf, Bytes};
-8use http::HeaderMap;
-9use http_body::{Body, Frame};
-10
-11use crate::util::BufList;
-12
-13/// A collected body produced by [`BodyExt::collect`] which collects all the DATA frames
-14/// and trailers.
-15///
-16/// [`BodyExt::collect`]: crate::BodyExt::collect
-17#[derive(Debug)]
-18pub struct Collected<B> {
-19    bufs: BufList<B>,
-20    trailers: Option<HeaderMap>,
-21}
-22
-23impl<B: Buf> Collected<B> {
-24    /// If there is a trailers frame buffered, returns a reference to it.
-25    ///
-26    /// Returns `None` if the body contained no trailers.
-27    pub fn trailers(&self) -> Option<&HeaderMap> {
-28        self.trailers.as_ref()
-29    }
-30
-31    /// Aggregate this buffered into a [`Buf`].
-32    pub fn aggregate(self) -> impl Buf {
-33        self.bufs
-34    }
-35
-36    /// Convert this body into a [`Bytes`].
-37    pub fn to_bytes(mut self) -> Bytes {
-38        self.bufs.copy_to_bytes(self.bufs.remaining())
-39    }
-40
-41    pub(crate) fn push_frame(&mut self, frame: Frame<B>) {
-42        let frame = match frame.into_data() {
-43            Ok(data) => {
-44                // Only push this frame if it has some data in it, to avoid crashing on
-45                // `BufList::push`.
-46                if data.has_remaining() {
-47                    self.bufs.push(data);
-48                }
-49                return;
-50            }
-51            Err(frame) => frame,
-52        };
-53
-54        if let Ok(trailers) = frame.into_trailers() {
-55            if let Some(current) = &mut self.trailers {
-56                current.extend(trailers);
-57            } else {
-58                self.trailers = Some(trailers);
-59            }
-60        };
-61    }
-62}
-63
-64impl<B: Buf> Body for Collected<B> {
-65    type Data = B;
-66    type Error = Infallible;
-67
-68    fn poll_frame(
-69        mut self: Pin<&mut Self>,
-70        _: &mut Context<'_>,
-71    ) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>> {
-72        let frame = if let Some(data) = self.bufs.pop() {
-73            Frame::data(data)
-74        } else if let Some(trailers) = self.trailers.take() {
-75            Frame::trailers(trailers)
-76        } else {
-77            return Poll::Ready(None);
-78        };
-79
-80        Poll::Ready(Some(Ok(frame)))
-81    }
-82}
-83
-84impl<B> Default for Collected<B> {
-85    fn default() -> Self {
-86        Self {
-87            bufs: BufList::default(),
-88            trailers: None,
-89        }
-90    }
-91}
-92
-93impl<B> Unpin for Collected<B> {}
-94
-95#[cfg(test)]
-96mod tests {
-97    use std::convert::TryInto;
-98
-99    use futures_util::stream;
-100
-101    use crate::{BodyExt, Full, StreamBody};
-102
-103    use super::*;
-104
-105    #[tokio::test]
-106    async fn full_body() {
-107        let body = Full::new(&b"hello"[..]);
-108
-109        let buffered = body.collect().await.unwrap();
-110
-111        let mut buf = buffered.to_bytes();
-112
-113        assert_eq!(&buf.copy_to_bytes(buf.remaining())[..], &b"hello"[..]);
-114    }
-115
-116    #[tokio::test]
-117    async fn segmented_body() {
-118        let bufs = [&b"hello"[..], &b"world"[..], &b"!"[..]];
-119        let body = StreamBody::new(stream::iter(bufs.map(Frame::data).map(Ok::<_, Infallible>)));
-120
-121        let buffered = body.collect().await.unwrap();
-122
-123        let mut buf = buffered.to_bytes();
-124
-125        assert_eq!(&buf.copy_to_bytes(buf.remaining())[..], b"helloworld!");
-126    }
-127
-128    #[tokio::test]
-129    async fn delayed_segments() {
-130        let one = stream::once(async { Ok::<_, Infallible>(Frame::data(&b"hello "[..])) });
-131        let two = stream::once(async {
-132            // a yield just so its not ready immediately
-133            tokio::task::yield_now().await;
-134            Ok::<_, Infallible>(Frame::data(&b"world!"[..]))
-135        });
-136        let stream = futures_util::StreamExt::chain(one, two);
-137
-138        let body = StreamBody::new(stream);
-139
-140        let buffered = body.collect().await.unwrap();
-141
-142        let mut buf = buffered.to_bytes();
-143
-144        assert_eq!(&buf.copy_to_bytes(buf.remaining())[..], b"hello world!");
-145    }
-146
-147    #[tokio::test]
-148    async fn trailers() {
-149        let mut trailers = HeaderMap::new();
-150        trailers.insert("this", "a trailer".try_into().unwrap());
-151        let bufs = [
-152            Frame::data(&b"hello"[..]),
-153            Frame::data(&b"world!"[..]),
-154            Frame::trailers(trailers.clone()),
-155        ];
-156
-157        let body = StreamBody::new(stream::iter(bufs.map(Ok::<_, Infallible>)));
-158
-159        let buffered = body.collect().await.unwrap();
-160
-161        assert_eq!(&trailers, buffered.trailers().unwrap());
-162
-163        let mut buf = buffered.to_bytes();
-164
-165        assert_eq!(&buf.copy_to_bytes(buf.remaining())[..], b"helloworld!");
-166    }
-167
-168    /// Test for issue [#88](https://github.com/hyperium/http-body/issues/88).
-169    #[tokio::test]
-170    async fn empty_frame() {
-171        let bufs: [&[u8]; 1] = [&[]];
-172
-173        let body = StreamBody::new(stream::iter(bufs.map(Frame::data).map(Ok::<_, Infallible>)));
-174        let buffered = body.collect().await.unwrap();
-175
-176        assert_eq!(buffered.to_bytes().len(), 0);
-177    }
-178}
-
\ No newline at end of file diff --git a/core/target/doc/src/http_body_util/combinators/box_body.rs.html b/core/target/doc/src/http_body_util/combinators/box_body.rs.html deleted file mode 100644 index ca631f06..00000000 --- a/core/target/doc/src/http_body_util/combinators/box_body.rs.html +++ /dev/null @@ -1,123 +0,0 @@ -box_body.rs - source

http_body_util/combinators/
box_body.rs

1use crate::BodyExt as _;
-2
-3use bytes::Buf;
-4use http_body::{Body, Frame, SizeHint};
-5use std::{
-6    fmt,
-7    pin::Pin,
-8    task::{Context, Poll},
-9};
-10
-11/// A boxed [`Body`] trait object.
-12pub struct BoxBody<D, E> {
-13    inner: Pin<Box<dyn Body<Data = D, Error = E> + Send + Sync + 'static>>,
-14}
-15
-16/// A boxed [`Body`] trait object that is !Sync.
-17pub struct UnsyncBoxBody<D, E> {
-18    inner: Pin<Box<dyn Body<Data = D, Error = E> + Send + 'static>>,
-19}
-20
-21impl<D, E> BoxBody<D, E> {
-22    /// Create a new `BoxBody`.
-23    pub fn new<B>(body: B) -> Self
-24    where
-25        B: Body<Data = D, Error = E> + Send + Sync + 'static,
-26        D: Buf,
-27    {
-28        Self {
-29            inner: Box::pin(body),
-30        }
-31    }
-32}
-33
-34impl<D, E> fmt::Debug for BoxBody<D, E> {
-35    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-36        f.debug_struct("BoxBody").finish()
-37    }
-38}
-39
-40impl<D, E> Body for BoxBody<D, E>
-41where
-42    D: Buf,
-43{
-44    type Data = D;
-45    type Error = E;
-46
-47    fn poll_frame(
-48        mut self: Pin<&mut Self>,
-49        cx: &mut Context<'_>,
-50    ) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>> {
-51        self.inner.as_mut().poll_frame(cx)
-52    }
-53
-54    fn is_end_stream(&self) -> bool {
-55        self.inner.is_end_stream()
-56    }
-57
-58    fn size_hint(&self) -> SizeHint {
-59        self.inner.size_hint()
-60    }
-61}
-62
-63impl<D, E> Default for BoxBody<D, E>
-64where
-65    D: Buf + 'static,
-66{
-67    fn default() -> Self {
-68        BoxBody::new(crate::Empty::new().map_err(|err| match err {}))
-69    }
-70}
-71
-72// === UnsyncBoxBody ===
-73impl<D, E> UnsyncBoxBody<D, E> {
-74    /// Create a new `UnsyncBoxBody`.
-75    pub fn new<B>(body: B) -> Self
-76    where
-77        B: Body<Data = D, Error = E> + Send + 'static,
-78        D: Buf,
-79    {
-80        Self {
-81            inner: Box::pin(body),
-82        }
-83    }
-84}
-85
-86impl<D, E> fmt::Debug for UnsyncBoxBody<D, E> {
-87    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-88        f.debug_struct("UnsyncBoxBody").finish()
-89    }
-90}
-91
-92impl<D, E> Body for UnsyncBoxBody<D, E>
-93where
-94    D: Buf,
-95{
-96    type Data = D;
-97    type Error = E;
-98
-99    fn poll_frame(
-100        mut self: Pin<&mut Self>,
-101        cx: &mut Context<'_>,
-102    ) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>> {
-103        self.inner.as_mut().poll_frame(cx)
-104    }
-105
-106    fn is_end_stream(&self) -> bool {
-107        self.inner.is_end_stream()
-108    }
-109
-110    fn size_hint(&self) -> SizeHint {
-111        self.inner.size_hint()
-112    }
-113}
-114
-115impl<D, E> Default for UnsyncBoxBody<D, E>
-116where
-117    D: Buf + 'static,
-118{
-119    fn default() -> Self {
-120        UnsyncBoxBody::new(crate::Empty::new().map_err(|err| match err {}))
-121    }
-122}
-
\ No newline at end of file diff --git a/core/target/doc/src/http_body_util/combinators/collect.rs.html b/core/target/doc/src/http_body_util/combinators/collect.rs.html deleted file mode 100644 index 9de42561..00000000 --- a/core/target/doc/src/http_body_util/combinators/collect.rs.html +++ /dev/null @@ -1,45 +0,0 @@ -collect.rs - source

http_body_util/combinators/
collect.rs

1use std::{
-2    future::Future,
-3    pin::Pin,
-4    task::{Context, Poll},
-5};
-6
-7use futures_core::ready;
-8use http_body::Body;
-9use pin_project_lite::pin_project;
-10
-11pin_project! {
-12    /// Future that resolves into a [`Collected`].
-13    ///
-14    /// [`Collected`]: crate::Collected
-15    pub struct Collect<T>
-16    where
-17        T: Body,
-18        T: ?Sized,
-19    {
-20        pub(crate) collected: Option<crate::Collected<T::Data>>,
-21        #[pin]
-22        pub(crate) body: T,
-23    }
-24}
-25
-26impl<T: Body + ?Sized> Future for Collect<T> {
-27    type Output = Result<crate::Collected<T::Data>, T::Error>;
-28
-29    fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> std::task::Poll<Self::Output> {
-30        let mut me = self.project();
-31
-32        loop {
-33            let frame = ready!(me.body.as_mut().poll_frame(cx));
-34
-35            let frame = if let Some(frame) = frame {
-36                frame?
-37            } else {
-38                return Poll::Ready(Ok(me.collected.take().expect("polled after complete")));
-39            };
-40
-41            me.collected.as_mut().unwrap().push_frame(frame);
-42        }
-43    }
-44}
-
\ No newline at end of file diff --git a/core/target/doc/src/http_body_util/combinators/frame.rs.html b/core/target/doc/src/http_body_util/combinators/frame.rs.html deleted file mode 100644 index bdc38e43..00000000 --- a/core/target/doc/src/http_body_util/combinators/frame.rs.html +++ /dev/null @@ -1,19 +0,0 @@ -frame.rs - source

http_body_util/combinators/
frame.rs

1use http_body::Body;
-2
-3use core::future::Future;
-4use core::pin::Pin;
-5use core::task;
-6
-7#[must_use = "futures don't do anything unless polled"]
-8#[derive(Debug)]
-9/// Future that resolves to the next frame from a [`Body`].
-10pub struct Frame<'a, T: ?Sized>(pub(crate) &'a mut T);
-11
-12impl<T: Body + Unpin + ?Sized> Future for Frame<'_, T> {
-13    type Output = Option<Result<http_body::Frame<T::Data>, T::Error>>;
-14
-15    fn poll(mut self: Pin<&mut Self>, ctx: &mut task::Context<'_>) -> task::Poll<Self::Output> {
-16        Pin::new(&mut self.0).poll_frame(ctx)
-17    }
-18}
-
\ No newline at end of file diff --git a/core/target/doc/src/http_body_util/combinators/map_err.rs.html b/core/target/doc/src/http_body_util/combinators/map_err.rs.html deleted file mode 100644 index 7588cea0..00000000 --- a/core/target/doc/src/http_body_util/combinators/map_err.rs.html +++ /dev/null @@ -1,90 +0,0 @@ -map_err.rs - source

http_body_util/combinators/
map_err.rs

1use http_body::{Body, Frame, SizeHint};
-2use pin_project_lite::pin_project;
-3use std::{
-4    any::type_name,
-5    fmt,
-6    pin::Pin,
-7    task::{Context, Poll},
-8};
-9
-10pin_project! {
-11    /// Body returned by the [`map_err`] combinator.
-12    ///
-13    /// [`map_err`]: crate::BodyExt::map_err
-14    #[derive(Clone, Copy)]
-15    pub struct MapErr<B, F> {
-16        #[pin]
-17        inner: B,
-18        f: F
-19    }
-20}
-21
-22impl<B, F> MapErr<B, F> {
-23    #[inline]
-24    pub(crate) fn new(body: B, f: F) -> Self {
-25        Self { inner: body, f }
-26    }
-27
-28    /// Get a reference to the inner body
-29    pub fn get_ref(&self) -> &B {
-30        &self.inner
-31    }
-32
-33    /// Get a mutable reference to the inner body
-34    pub fn get_mut(&mut self) -> &mut B {
-35        &mut self.inner
-36    }
-37
-38    /// Get a pinned mutable reference to the inner body
-39    pub fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut B> {
-40        self.project().inner
-41    }
-42
-43    /// Consume `self`, returning the inner body
-44    pub fn into_inner(self) -> B {
-45        self.inner
-46    }
-47}
-48
-49impl<B, F, E> Body for MapErr<B, F>
-50where
-51    B: Body,
-52    F: FnMut(B::Error) -> E,
-53{
-54    type Data = B::Data;
-55    type Error = E;
-56
-57    fn poll_frame(
-58        self: Pin<&mut Self>,
-59        cx: &mut Context<'_>,
-60    ) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>> {
-61        let this = self.project();
-62        match this.inner.poll_frame(cx) {
-63            Poll::Pending => Poll::Pending,
-64            Poll::Ready(None) => Poll::Ready(None),
-65            Poll::Ready(Some(Ok(frame))) => Poll::Ready(Some(Ok(frame))),
-66            Poll::Ready(Some(Err(err))) => Poll::Ready(Some(Err((this.f)(err)))),
-67        }
-68    }
-69
-70    fn is_end_stream(&self) -> bool {
-71        self.inner.is_end_stream()
-72    }
-73
-74    fn size_hint(&self) -> SizeHint {
-75        self.inner.size_hint()
-76    }
-77}
-78
-79impl<B, F> fmt::Debug for MapErr<B, F>
-80where
-81    B: fmt::Debug,
-82{
-83    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-84        f.debug_struct("MapErr")
-85            .field("inner", &self.inner)
-86            .field("f", &type_name::<F>())
-87            .finish()
-88    }
-89}
-
\ No newline at end of file diff --git a/core/target/doc/src/http_body_util/combinators/map_frame.rs.html b/core/target/doc/src/http_body_util/combinators/map_frame.rs.html deleted file mode 100644 index af4b4a7f..00000000 --- a/core/target/doc/src/http_body_util/combinators/map_frame.rs.html +++ /dev/null @@ -1,88 +0,0 @@ -map_frame.rs - source

http_body_util/combinators/
map_frame.rs

1use bytes::Buf;
-2use http_body::{Body, Frame};
-3use pin_project_lite::pin_project;
-4use std::{
-5    any::type_name,
-6    fmt,
-7    pin::Pin,
-8    task::{Context, Poll},
-9};
-10
-11pin_project! {
-12    /// Body returned by the [`map_frame`] combinator.
-13    ///
-14    /// [`map_frame`]: crate::BodyExt::map_frame
-15    #[derive(Clone, Copy)]
-16    pub struct MapFrame<B, F> {
-17        #[pin]
-18        inner: B,
-19        f: F
-20    }
-21}
-22
-23impl<B, F> MapFrame<B, F> {
-24    #[inline]
-25    pub(crate) fn new(body: B, f: F) -> Self {
-26        Self { inner: body, f }
-27    }
-28
-29    /// Get a reference to the inner body
-30    pub fn get_ref(&self) -> &B {
-31        &self.inner
-32    }
-33
-34    /// Get a mutable reference to the inner body
-35    pub fn get_mut(&mut self) -> &mut B {
-36        &mut self.inner
-37    }
-38
-39    /// Get a pinned mutable reference to the inner body
-40    pub fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut B> {
-41        self.project().inner
-42    }
-43
-44    /// Consume `self`, returning the inner body
-45    pub fn into_inner(self) -> B {
-46        self.inner
-47    }
-48}
-49
-50impl<B, F, B2> Body for MapFrame<B, F>
-51where
-52    B: Body,
-53    F: FnMut(Frame<B::Data>) -> Frame<B2>,
-54    B2: Buf,
-55{
-56    type Data = B2;
-57    type Error = B::Error;
-58
-59    fn poll_frame(
-60        self: Pin<&mut Self>,
-61        cx: &mut Context<'_>,
-62    ) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>> {
-63        let this = self.project();
-64        match this.inner.poll_frame(cx) {
-65            Poll::Pending => Poll::Pending,
-66            Poll::Ready(None) => Poll::Ready(None),
-67            Poll::Ready(Some(Ok(frame))) => Poll::Ready(Some(Ok((this.f)(frame)))),
-68            Poll::Ready(Some(Err(err))) => Poll::Ready(Some(Err(err))),
-69        }
-70    }
-71
-72    fn is_end_stream(&self) -> bool {
-73        self.inner.is_end_stream()
-74    }
-75}
-76
-77impl<B, F> fmt::Debug for MapFrame<B, F>
-78where
-79    B: fmt::Debug,
-80{
-81    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-82        f.debug_struct("MapFrame")
-83            .field("inner", &self.inner)
-84            .field("f", &type_name::<F>())
-85            .finish()
-86    }
-87}
-
\ No newline at end of file diff --git a/core/target/doc/src/http_body_util/combinators/mod.rs.html b/core/target/doc/src/http_body_util/combinators/mod.rs.html deleted file mode 100644 index f0b00968..00000000 --- a/core/target/doc/src/http_body_util/combinators/mod.rs.html +++ /dev/null @@ -1,18 +0,0 @@ -mod.rs - source

http_body_util/combinators/
mod.rs

1//! Combinators for the `Body` trait.
-2
-3mod box_body;
-4mod collect;
-5mod frame;
-6mod map_err;
-7mod map_frame;
-8mod with_trailers;
-9
-10pub use self::{
-11    box_body::{BoxBody, UnsyncBoxBody},
-12    collect::Collect,
-13    frame::Frame,
-14    map_err::MapErr,
-15    map_frame::MapFrame,
-16    with_trailers::WithTrailers,
-17};
-
\ No newline at end of file diff --git a/core/target/doc/src/http_body_util/combinators/with_trailers.rs.html b/core/target/doc/src/http_body_util/combinators/with_trailers.rs.html deleted file mode 100644 index c3ebf954..00000000 --- a/core/target/doc/src/http_body_util/combinators/with_trailers.rs.html +++ /dev/null @@ -1,214 +0,0 @@ -with_trailers.rs - source

http_body_util/combinators/
with_trailers.rs

1use std::{
-2    future::Future,
-3    pin::Pin,
-4    task::{Context, Poll},
-5};
-6
-7use futures_core::ready;
-8use http::HeaderMap;
-9use http_body::{Body, Frame};
-10use pin_project_lite::pin_project;
-11
-12pin_project! {
-13    /// Adds trailers to a body.
-14    ///
-15    /// See [`BodyExt::with_trailers`] for more details.
-16    pub struct WithTrailers<T, F> {
-17        #[pin]
-18        state: State<T, F>,
-19    }
-20}
-21
-22impl<T, F> WithTrailers<T, F> {
-23    pub(crate) fn new(body: T, trailers: F) -> Self {
-24        Self {
-25            state: State::PollBody {
-26                body,
-27                trailers: Some(trailers),
-28            },
-29        }
-30    }
-31}
-32
-33pin_project! {
-34    #[project = StateProj]
-35    enum State<T, F> {
-36        PollBody {
-37            #[pin]
-38            body: T,
-39            trailers: Option<F>,
-40        },
-41        PollTrailers {
-42            #[pin]
-43            trailers: F,
-44            prev_trailers: Option<HeaderMap>,
-45        },
-46        Done,
-47    }
-48}
-49
-50impl<T, F> Body for WithTrailers<T, F>
-51where
-52    T: Body,
-53    F: Future<Output = Option<Result<HeaderMap, T::Error>>>,
-54{
-55    type Data = T::Data;
-56    type Error = T::Error;
-57
-58    fn poll_frame(
-59        mut self: Pin<&mut Self>,
-60        cx: &mut Context<'_>,
-61    ) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>> {
-62        loop {
-63            let mut this = self.as_mut().project();
-64
-65            match this.state.as_mut().project() {
-66                StateProj::PollBody { body, trailers } => match ready!(body.poll_frame(cx)?) {
-67                    Some(frame) => match frame.into_trailers() {
-68                        Ok(prev_trailers) => {
-69                            let trailers = trailers.take().unwrap();
-70                            this.state.set(State::PollTrailers {
-71                                trailers,
-72                                prev_trailers: Some(prev_trailers),
-73                            });
-74                        }
-75                        Err(frame) => {
-76                            return Poll::Ready(Some(Ok(frame)));
-77                        }
-78                    },
-79                    None => {
-80                        let trailers = trailers.take().unwrap();
-81                        this.state.set(State::PollTrailers {
-82                            trailers,
-83                            prev_trailers: None,
-84                        });
-85                    }
-86                },
-87                StateProj::PollTrailers {
-88                    trailers,
-89                    prev_trailers,
-90                } => {
-91                    let trailers = ready!(trailers.poll(cx)?);
-92                    match (trailers, prev_trailers.take()) {
-93                        (None, None) => return Poll::Ready(None),
-94                        (None, Some(trailers)) | (Some(trailers), None) => {
-95                            this.state.set(State::Done);
-96                            return Poll::Ready(Some(Ok(Frame::trailers(trailers))));
-97                        }
-98                        (Some(new_trailers), Some(mut prev_trailers)) => {
-99                            prev_trailers.extend(new_trailers);
-100                            this.state.set(State::Done);
-101                            return Poll::Ready(Some(Ok(Frame::trailers(prev_trailers))));
-102                        }
-103                    }
-104                }
-105                StateProj::Done => {
-106                    return Poll::Ready(None);
-107                }
-108            }
-109        }
-110    }
-111
-112    #[inline]
-113    fn size_hint(&self) -> http_body::SizeHint {
-114        match &self.state {
-115            State::PollBody { body, .. } => body.size_hint(),
-116            State::PollTrailers { .. } | State::Done => Default::default(),
-117        }
-118    }
-119}
-120
-121#[cfg(test)]
-122mod tests {
-123    use std::convert::Infallible;
-124
-125    use bytes::Bytes;
-126    use http::{HeaderName, HeaderValue};
-127
-128    use crate::{BodyExt, Empty, Full};
-129
-130    #[allow(unused_imports)]
-131    use super::*;
-132
-133    #[tokio::test]
-134    async fn works() {
-135        let mut trailers = HeaderMap::new();
-136        trailers.insert(
-137            HeaderName::from_static("foo"),
-138            HeaderValue::from_static("bar"),
-139        );
-140
-141        let body =
-142            Full::<Bytes>::from("hello").with_trailers(std::future::ready(Some(
-143                Ok::<_, Infallible>(trailers.clone()),
-144            )));
-145
-146        futures_util::pin_mut!(body);
-147        let waker = futures_util::task::noop_waker();
-148        let mut cx = Context::from_waker(&waker);
-149
-150        let data = unwrap_ready(body.as_mut().poll_frame(&mut cx))
-151            .unwrap()
-152            .unwrap()
-153            .into_data()
-154            .unwrap();
-155        assert_eq!(data, "hello");
-156
-157        let body_trailers = unwrap_ready(body.as_mut().poll_frame(&mut cx))
-158            .unwrap()
-159            .unwrap()
-160            .into_trailers()
-161            .unwrap();
-162        assert_eq!(body_trailers, trailers);
-163
-164        assert!(unwrap_ready(body.as_mut().poll_frame(&mut cx)).is_none());
-165    }
-166
-167    #[tokio::test]
-168    async fn merges_trailers() {
-169        let mut trailers_1 = HeaderMap::new();
-170        trailers_1.insert(
-171            HeaderName::from_static("foo"),
-172            HeaderValue::from_static("bar"),
-173        );
-174
-175        let mut trailers_2 = HeaderMap::new();
-176        trailers_2.insert(
-177            HeaderName::from_static("baz"),
-178            HeaderValue::from_static("qux"),
-179        );
-180
-181        let body = Empty::<Bytes>::new()
-182            .with_trailers(std::future::ready(Some(Ok::<_, Infallible>(
-183                trailers_1.clone(),
-184            ))))
-185            .with_trailers(std::future::ready(Some(Ok::<_, Infallible>(
-186                trailers_2.clone(),
-187            ))));
-188
-189        futures_util::pin_mut!(body);
-190        let waker = futures_util::task::noop_waker();
-191        let mut cx = Context::from_waker(&waker);
-192
-193        let body_trailers = unwrap_ready(body.as_mut().poll_frame(&mut cx))
-194            .unwrap()
-195            .unwrap()
-196            .into_trailers()
-197            .unwrap();
-198
-199        let mut all_trailers = HeaderMap::new();
-200        all_trailers.extend(trailers_1);
-201        all_trailers.extend(trailers_2);
-202        assert_eq!(body_trailers, all_trailers);
-203
-204        assert!(unwrap_ready(body.as_mut().poll_frame(&mut cx)).is_none());
-205    }
-206
-207    fn unwrap_ready<T>(poll: Poll<T>) -> T {
-208        match poll {
-209            Poll::Ready(t) => t,
-210            Poll::Pending => panic!("pending"),
-211        }
-212    }
-213}
-
\ No newline at end of file diff --git a/core/target/doc/src/http_body_util/either.rs.html b/core/target/doc/src/http_body_util/either.rs.html deleted file mode 100644 index cfb2817c..00000000 --- a/core/target/doc/src/http_body_util/either.rs.html +++ /dev/null @@ -1,187 +0,0 @@ -either.rs - source

http_body_util/
either.rs

1use std::error::Error;
-2use std::fmt::Debug;
-3use std::pin::Pin;
-4use std::task::{Context, Poll};
-5
-6use bytes::Buf;
-7use http_body::{Body, Frame, SizeHint};
-8use proj::EitherProj;
-9
-10/// Sum type with two cases: [`Left`] and [`Right`], used if a body can be one of
-11/// two distinct types.
-12///
-13/// [`Left`]: Either::Left
-14/// [`Right`]: Either::Right
-15#[derive(Debug, Clone, Copy)]
-16pub enum Either<L, R> {
-17    /// A value of type `L`
-18    Left(L),
-19    /// A value of type `R`
-20    Right(R),
-21}
-22
-23impl<L, R> Either<L, R> {
-24    /// This function is part of the generated code from `pin-project-lite`,
-25    /// for a more in depth explanation and the rest of the generated code refer
-26    /// to the [`proj`] module.
-27    pub(crate) fn project(self: Pin<&mut Self>) -> EitherProj<L, R> {
-28        unsafe {
-29            match self.get_unchecked_mut() {
-30                Self::Left(left) => EitherProj::Left(Pin::new_unchecked(left)),
-31                Self::Right(right) => EitherProj::Right(Pin::new_unchecked(right)),
-32            }
-33        }
-34    }
-35}
-36
-37impl<L> Either<L, L> {
-38    /// Convert [`Either`] into the inner type, if both `Left` and `Right` are
-39    /// of the same type.
-40    pub fn into_inner(self) -> L {
-41        match self {
-42            Either::Left(left) => left,
-43            Either::Right(right) => right,
-44        }
-45    }
-46}
-47
-48impl<L, R, Data> Body for Either<L, R>
-49where
-50    L: Body<Data = Data>,
-51    R: Body<Data = Data>,
-52    L::Error: Into<Box<dyn Error + Send + Sync>>,
-53    R::Error: Into<Box<dyn Error + Send + Sync>>,
-54    Data: Buf,
-55{
-56    type Data = Data;
-57    type Error = Box<dyn Error + Send + Sync>;
-58
-59    fn poll_frame(
-60        self: Pin<&mut Self>,
-61        cx: &mut Context<'_>,
-62    ) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>> {
-63        match self.project() {
-64            EitherProj::Left(left) => left
-65                .poll_frame(cx)
-66                .map(|poll| poll.map(|opt| opt.map_err(Into::into))),
-67            EitherProj::Right(right) => right
-68                .poll_frame(cx)
-69                .map(|poll| poll.map(|opt| opt.map_err(Into::into))),
-70        }
-71    }
-72
-73    fn is_end_stream(&self) -> bool {
-74        match self {
-75            Either::Left(left) => left.is_end_stream(),
-76            Either::Right(right) => right.is_end_stream(),
-77        }
-78    }
-79
-80    fn size_hint(&self) -> SizeHint {
-81        match self {
-82            Either::Left(left) => left.size_hint(),
-83            Either::Right(right) => right.size_hint(),
-84        }
-85    }
-86}
-87
-88pub(crate) mod proj {
-89    //! This code is the (cleaned output) generated by [pin-project-lite], as it
-90    //! does not support tuple variants.
-91    //!
-92    //! This is the altered expansion from the following snippet, expanded by
-93    //! `cargo-expand`:
-94    //!
-95    //! ```rust
-96    //! use pin_project_lite::pin_project;
-97    //!
-98    //! pin_project! {
-99    //!     #[project = EitherProj]
-100    //!     pub enum Either<L, R> {
-101    //!         Left {#[pin] left: L},
-102    //!         Right {#[pin] right: R}
-103    //!     }
-104    //! }
-105    //! ```
-106    //!
-107    //! [pin-project-lite]: https://docs.rs/pin-project-lite/latest/pin_project_lite/
-108    use std::marker::PhantomData;
-109    use std::pin::Pin;
-110
-111    use super::Either;
-112
-113    #[allow(dead_code)]
-114    #[allow(single_use_lifetimes)]
-115    #[allow(unknown_lints)]
-116    #[allow(clippy::mut_mut)]
-117    #[allow(clippy::redundant_pub_crate)]
-118    #[allow(clippy::ref_option_ref)]
-119    #[allow(clippy::type_repetition_in_bounds)]
-120    pub(crate) enum EitherProj<'__pin, L, R>
-121    where
-122        Either<L, R>: '__pin,
-123    {
-124        Left(Pin<&'__pin mut L>),
-125        Right(Pin<&'__pin mut R>),
-126    }
-127
-128    #[allow(single_use_lifetimes)]
-129    #[allow(unknown_lints)]
-130    #[allow(clippy::used_underscore_binding)]
-131    #[allow(missing_debug_implementations)]
-132    const _: () = {
-133        #[allow(non_snake_case)]
-134        pub struct __Origin<'__pin, L, R> {
-135            __dummy_lifetime: PhantomData<&'__pin ()>,
-136            _Left: L,
-137            _Right: R,
-138        }
-139        impl<'__pin, L, R> Unpin for Either<L, R> where __Origin<'__pin, L, R>: Unpin {}
-140
-141        trait MustNotImplDrop {}
-142        #[allow(drop_bounds)]
-143        impl<T: Drop> MustNotImplDrop for T {}
-144        impl<L, R> MustNotImplDrop for Either<L, R> {}
-145    };
-146}
-147
-148#[cfg(test)]
-149mod tests {
-150    use super::*;
-151    use crate::{BodyExt, Empty, Full};
-152
-153    #[tokio::test]
-154    async fn data_left() {
-155        let full = Full::new(&b"hello"[..]);
-156
-157        let mut value: Either<_, Empty<&[u8]>> = Either::Left(full);
-158
-159        assert_eq!(value.size_hint().exact(), Some(b"hello".len() as u64));
-160        assert_eq!(
-161            value.frame().await.unwrap().unwrap().into_data().unwrap(),
-162            &b"hello"[..]
-163        );
-164        assert!(value.frame().await.is_none());
-165    }
-166
-167    #[tokio::test]
-168    async fn data_right() {
-169        let full = Full::new(&b"hello!"[..]);
-170
-171        let mut value: Either<Empty<&[u8]>, _> = Either::Right(full);
-172
-173        assert_eq!(value.size_hint().exact(), Some(b"hello!".len() as u64));
-174        assert_eq!(
-175            value.frame().await.unwrap().unwrap().into_data().unwrap(),
-176            &b"hello!"[..]
-177        );
-178        assert!(value.frame().await.is_none());
-179    }
-180
-181    #[test]
-182    fn into_inner() {
-183        let a = Either::<i32, i32>::Left(2);
-184        assert_eq!(a.into_inner(), 2)
-185    }
-186}
-
\ No newline at end of file diff --git a/core/target/doc/src/http_body_util/empty.rs.html b/core/target/doc/src/http_body_util/empty.rs.html deleted file mode 100644 index 846d838e..00000000 --- a/core/target/doc/src/http_body_util/empty.rs.html +++ /dev/null @@ -1,65 +0,0 @@ -empty.rs - source

http_body_util/
empty.rs

1use bytes::Buf;
-2use http_body::{Body, Frame, SizeHint};
-3use std::{
-4    convert::Infallible,
-5    fmt,
-6    marker::PhantomData,
-7    pin::Pin,
-8    task::{Context, Poll},
-9};
-10
-11/// A body that is always empty.
-12pub struct Empty<D> {
-13    _marker: PhantomData<fn() -> D>,
-14}
-15
-16impl<D> Empty<D> {
-17    /// Create a new `Empty`.
-18    pub const fn new() -> Self {
-19        Self {
-20            _marker: PhantomData,
-21        }
-22    }
-23}
-24
-25impl<D: Buf> Body for Empty<D> {
-26    type Data = D;
-27    type Error = Infallible;
-28
-29    #[inline]
-30    fn poll_frame(
-31        self: Pin<&mut Self>,
-32        _cx: &mut Context<'_>,
-33    ) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>> {
-34        Poll::Ready(None)
-35    }
-36
-37    fn is_end_stream(&self) -> bool {
-38        true
-39    }
-40
-41    fn size_hint(&self) -> SizeHint {
-42        SizeHint::with_exact(0)
-43    }
-44}
-45
-46impl<D> fmt::Debug for Empty<D> {
-47    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-48        f.debug_struct("Empty").finish()
-49    }
-50}
-51
-52impl<D> Default for Empty<D> {
-53    fn default() -> Self {
-54        Self::new()
-55    }
-56}
-57
-58impl<D> Clone for Empty<D> {
-59    fn clone(&self) -> Self {
-60        *self
-61    }
-62}
-63
-64impl<D> Copy for Empty<D> {}
-
\ No newline at end of file diff --git a/core/target/doc/src/http_body_util/full.rs.html b/core/target/doc/src/http_body_util/full.rs.html deleted file mode 100644 index fc8738c9..00000000 --- a/core/target/doc/src/http_body_util/full.rs.html +++ /dev/null @@ -1,148 +0,0 @@ -full.rs - source

http_body_util/
full.rs

1use bytes::{Buf, Bytes};
-2use http_body::{Body, Frame, SizeHint};
-3use pin_project_lite::pin_project;
-4use std::borrow::Cow;
-5use std::convert::{Infallible, TryFrom};
-6use std::pin::Pin;
-7use std::task::{Context, Poll};
-8
-9pin_project! {
-10    /// A body that consists of a single chunk.
-11    #[derive(Clone, Copy, Debug)]
-12    pub struct Full<D> {
-13        data: Option<D>,
-14    }
-15}
-16
-17impl<D> Full<D>
-18where
-19    D: Buf,
-20{
-21    /// Create a new `Full`.
-22    pub fn new(data: D) -> Self {
-23        let data = if data.has_remaining() {
-24            Some(data)
-25        } else {
-26            None
-27        };
-28        Full { data }
-29    }
-30}
-31
-32impl<D> Body for Full<D>
-33where
-34    D: Buf,
-35{
-36    type Data = D;
-37    type Error = Infallible;
-38
-39    fn poll_frame(
-40        mut self: Pin<&mut Self>,
-41        _cx: &mut Context<'_>,
-42    ) -> Poll<Option<Result<Frame<D>, Self::Error>>> {
-43        Poll::Ready(self.data.take().map(|d| Ok(Frame::data(d))))
-44    }
-45
-46    fn is_end_stream(&self) -> bool {
-47        self.data.is_none()
-48    }
-49
-50    fn size_hint(&self) -> SizeHint {
-51        self.data
-52            .as_ref()
-53            .map(|data| SizeHint::with_exact(u64::try_from(data.remaining()).unwrap()))
-54            .unwrap_or_else(|| SizeHint::with_exact(0))
-55    }
-56}
-57
-58impl<D> Default for Full<D>
-59where
-60    D: Buf,
-61{
-62    /// Create an empty `Full`.
-63    fn default() -> Self {
-64        Full { data: None }
-65    }
-66}
-67
-68impl<D> From<Bytes> for Full<D>
-69where
-70    D: Buf + From<Bytes>,
-71{
-72    fn from(bytes: Bytes) -> Self {
-73        Full::new(D::from(bytes))
-74    }
-75}
-76
-77impl<D> From<Vec<u8>> for Full<D>
-78where
-79    D: Buf + From<Vec<u8>>,
-80{
-81    fn from(vec: Vec<u8>) -> Self {
-82        Full::new(D::from(vec))
-83    }
-84}
-85
-86impl<D> From<&'static [u8]> for Full<D>
-87where
-88    D: Buf + From<&'static [u8]>,
-89{
-90    fn from(slice: &'static [u8]) -> Self {
-91        Full::new(D::from(slice))
-92    }
-93}
-94
-95impl<D, B> From<Cow<'static, B>> for Full<D>
-96where
-97    D: Buf + From<&'static B> + From<B::Owned>,
-98    B: ToOwned + ?Sized,
-99{
-100    fn from(cow: Cow<'static, B>) -> Self {
-101        match cow {
-102            Cow::Borrowed(b) => Full::new(D::from(b)),
-103            Cow::Owned(o) => Full::new(D::from(o)),
-104        }
-105    }
-106}
-107
-108impl<D> From<String> for Full<D>
-109where
-110    D: Buf + From<String>,
-111{
-112    fn from(s: String) -> Self {
-113        Full::new(D::from(s))
-114    }
-115}
-116
-117impl<D> From<&'static str> for Full<D>
-118where
-119    D: Buf + From<&'static str>,
-120{
-121    fn from(slice: &'static str) -> Self {
-122        Full::new(D::from(slice))
-123    }
-124}
-125
-126#[cfg(test)]
-127mod tests {
-128    use super::*;
-129    use crate::BodyExt;
-130
-131    #[tokio::test]
-132    async fn full_returns_some() {
-133        let mut full = Full::new(&b"hello"[..]);
-134        assert_eq!(full.size_hint().exact(), Some(b"hello".len() as u64));
-135        assert_eq!(
-136            full.frame().await.unwrap().unwrap().into_data().unwrap(),
-137            &b"hello"[..]
-138        );
-139        assert!(full.frame().await.is_none());
-140    }
-141
-142    #[tokio::test]
-143    async fn empty_full_returns_none() {
-144        assert!(Full::<&[u8]>::default().frame().await.is_none());
-145        assert!(Full::new(&b""[..]).frame().await.is_none());
-146    }
-147}
-
\ No newline at end of file diff --git a/core/target/doc/src/http_body_util/lib.rs.html b/core/target/doc/src/http_body_util/lib.rs.html deleted file mode 100644 index 5715c9a1..00000000 --- a/core/target/doc/src/http_body_util/lib.rs.html +++ /dev/null @@ -1,148 +0,0 @@ -lib.rs - source

http_body_util/
lib.rs

1#![deny(missing_debug_implementations, missing_docs, unreachable_pub)]
-2#![cfg_attr(test, deny(warnings))]
-3
-4//! Utilities for [`http_body::Body`].
-5//!
-6//! [`BodyExt`] adds extensions to the common trait.
-7//!
-8//! [`Empty`] and [`Full`] provide simple implementations.
-9
-10mod collected;
-11pub mod combinators;
-12mod either;
-13mod empty;
-14mod full;
-15mod limited;
-16mod stream;
-17
-18#[cfg(feature = "channel")]
-19pub mod channel;
-20
-21mod util;
-22
-23use self::combinators::{BoxBody, MapErr, MapFrame, UnsyncBoxBody};
-24
-25pub use self::collected::Collected;
-26pub use self::either::Either;
-27pub use self::empty::Empty;
-28pub use self::full::Full;
-29pub use self::limited::{LengthLimitError, Limited};
-30pub use self::stream::{BodyDataStream, BodyStream, StreamBody};
-31
-32#[cfg(feature = "channel")]
-33pub use self::channel::Channel;
-34
-35/// An extension trait for [`http_body::Body`] adding various combinators and adapters
-36pub trait BodyExt: http_body::Body {
-37    /// Returns a future that resolves to the next [`Frame`], if any.
-38    ///
-39    /// [`Frame`]: combinators::Frame
-40    fn frame(&mut self) -> combinators::Frame<'_, Self>
-41    where
-42        Self: Unpin,
-43    {
-44        combinators::Frame(self)
-45    }
-46
-47    /// Maps this body's frame to a different kind.
-48    fn map_frame<F, B>(self, f: F) -> MapFrame<Self, F>
-49    where
-50        Self: Sized,
-51        F: FnMut(http_body::Frame<Self::Data>) -> http_body::Frame<B>,
-52        B: bytes::Buf,
-53    {
-54        MapFrame::new(self, f)
-55    }
-56
-57    /// Maps this body's error value to a different value.
-58    fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
-59    where
-60        Self: Sized,
-61        F: FnMut(Self::Error) -> E,
-62    {
-63        MapErr::new(self, f)
-64    }
-65
-66    /// Turn this body into a boxed trait object.
-67    fn boxed(self) -> BoxBody<Self::Data, Self::Error>
-68    where
-69        Self: Sized + Send + Sync + 'static,
-70    {
-71        BoxBody::new(self)
-72    }
-73
-74    /// Turn this body into a boxed trait object that is !Sync.
-75    fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
-76    where
-77        Self: Sized + Send + 'static,
-78    {
-79        UnsyncBoxBody::new(self)
-80    }
-81
-82    /// Turn this body into [`Collected`] body which will collect all the DATA frames
-83    /// and trailers.
-84    fn collect(self) -> combinators::Collect<Self>
-85    where
-86        Self: Sized,
-87    {
-88        combinators::Collect {
-89            body: self,
-90            collected: Some(crate::Collected::default()),
-91        }
-92    }
-93
-94    /// Add trailers to the body.
-95    ///
-96    /// The trailers will be sent when all previous frames have been sent and the `trailers` future
-97    /// resolves.
-98    ///
-99    /// # Example
-100    ///
-101    /// ```
-102    /// use http::HeaderMap;
-103    /// use http_body_util::{Full, BodyExt};
-104    /// use bytes::Bytes;
-105    ///
-106    /// # #[tokio::main]
-107    /// async fn main() {
-108    /// let (tx, rx) = tokio::sync::oneshot::channel::<HeaderMap>();
-109    ///
-110    /// let body = Full::<Bytes>::from("Hello, World!")
-111    ///     // add trailers via a future
-112    ///     .with_trailers(async move {
-113    ///         match rx.await {
-114    ///             Ok(trailers) => Some(Ok(trailers)),
-115    ///             Err(_err) => None,
-116    ///         }
-117    ///     });
-118    ///
-119    /// // compute the trailers in the background
-120    /// tokio::spawn(async move {
-121    ///     let _ = tx.send(compute_trailers().await);
-122    /// });
-123    ///
-124    /// async fn compute_trailers() -> HeaderMap {
-125    ///     // ...
-126    ///     # unimplemented!()
-127    /// }
-128    /// # }
-129    /// ```
-130    fn with_trailers<F>(self, trailers: F) -> combinators::WithTrailers<Self, F>
-131    where
-132        Self: Sized,
-133        F: std::future::Future<Output = Option<Result<http::HeaderMap, Self::Error>>>,
-134    {
-135        combinators::WithTrailers::new(self, trailers)
-136    }
-137
-138    /// Turn this body into [`BodyDataStream`].
-139    fn into_data_stream(self) -> BodyDataStream<Self>
-140    where
-141        Self: Sized,
-142    {
-143        BodyDataStream::new(self)
-144    }
-145}
-146
-147impl<T: ?Sized> BodyExt for T where T: http_body::Body {}
-
\ No newline at end of file diff --git a/core/target/doc/src/http_body_util/limited.rs.html b/core/target/doc/src/http_body_util/limited.rs.html deleted file mode 100644 index a9ab32d8..00000000 --- a/core/target/doc/src/http_body_util/limited.rs.html +++ /dev/null @@ -1,266 +0,0 @@ -limited.rs - source

http_body_util/
limited.rs

1use bytes::Buf;
-2use http_body::{Body, Frame, SizeHint};
-3use pin_project_lite::pin_project;
-4use std::error::Error;
-5use std::fmt;
-6use std::pin::Pin;
-7use std::task::{Context, Poll};
-8
-9pin_project! {
-10    /// A length limited body.
-11    ///
-12    /// This body will return an error if more than the configured number
-13    /// of bytes are returned on polling the wrapped body.
-14    #[derive(Clone, Copy, Debug)]
-15    pub struct Limited<B> {
-16        remaining: usize,
-17        #[pin]
-18        inner: B,
-19    }
-20}
-21
-22impl<B> Limited<B> {
-23    /// Create a new `Limited`.
-24    pub fn new(inner: B, limit: usize) -> Self {
-25        Self {
-26            remaining: limit,
-27            inner,
-28        }
-29    }
-30}
-31
-32impl<B> Body for Limited<B>
-33where
-34    B: Body,
-35    B::Error: Into<Box<dyn Error + Send + Sync>>,
-36{
-37    type Data = B::Data;
-38    type Error = Box<dyn Error + Send + Sync>;
-39
-40    fn poll_frame(
-41        self: Pin<&mut Self>,
-42        cx: &mut Context<'_>,
-43    ) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>> {
-44        let this = self.project();
-45        let res = match this.inner.poll_frame(cx) {
-46            Poll::Pending => return Poll::Pending,
-47            Poll::Ready(None) => None,
-48            Poll::Ready(Some(Ok(frame))) => {
-49                if let Some(data) = frame.data_ref() {
-50                    if data.remaining() > *this.remaining {
-51                        *this.remaining = 0;
-52                        Some(Err(LengthLimitError.into()))
-53                    } else {
-54                        *this.remaining -= data.remaining();
-55                        Some(Ok(frame))
-56                    }
-57                } else {
-58                    Some(Ok(frame))
-59                }
-60            }
-61            Poll::Ready(Some(Err(err))) => Some(Err(err.into())),
-62        };
-63
-64        Poll::Ready(res)
-65    }
-66
-67    fn is_end_stream(&self) -> bool {
-68        self.inner.is_end_stream()
-69    }
-70
-71    fn size_hint(&self) -> SizeHint {
-72        use std::convert::TryFrom;
-73        match u64::try_from(self.remaining) {
-74            Ok(n) => {
-75                let mut hint = self.inner.size_hint();
-76                if hint.lower() >= n {
-77                    hint.set_exact(n)
-78                } else if let Some(max) = hint.upper() {
-79                    hint.set_upper(n.min(max))
-80                } else {
-81                    hint.set_upper(n)
-82                }
-83                hint
-84            }
-85            Err(_) => self.inner.size_hint(),
-86        }
-87    }
-88}
-89
-90/// An error returned when body length exceeds the configured limit.
-91#[derive(Debug)]
-92#[non_exhaustive]
-93pub struct LengthLimitError;
-94
-95impl fmt::Display for LengthLimitError {
-96    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-97        f.write_str("length limit exceeded")
-98    }
-99}
-100
-101impl Error for LengthLimitError {}
-102
-103#[cfg(test)]
-104mod tests {
-105    use super::*;
-106    use crate::{BodyExt, Full, StreamBody};
-107    use bytes::Bytes;
-108    use std::convert::Infallible;
-109
-110    #[tokio::test]
-111    async fn read_for_body_under_limit_returns_data() {
-112        const DATA: &[u8] = b"testing";
-113        let inner = Full::new(Bytes::from(DATA));
-114        let body = &mut Limited::new(inner, 8);
-115
-116        let mut hint = SizeHint::new();
-117        hint.set_upper(7);
-118        assert_eq!(body.size_hint().upper(), hint.upper());
-119
-120        let data = body.frame().await.unwrap().unwrap().into_data().unwrap();
-121        assert_eq!(data, DATA);
-122        hint.set_upper(0);
-123        assert_eq!(body.size_hint().upper(), hint.upper());
-124
-125        assert!(body.frame().await.is_none());
-126    }
-127
-128    #[tokio::test]
-129    async fn read_for_body_over_limit_returns_error() {
-130        const DATA: &[u8] = b"testing a string that is too long";
-131        let inner = Full::new(Bytes::from(DATA));
-132        let body = &mut Limited::new(inner, 8);
-133
-134        let mut hint = SizeHint::new();
-135        hint.set_upper(8);
-136        assert_eq!(body.size_hint().upper(), hint.upper());
-137
-138        let error = body.frame().await.unwrap().unwrap_err();
-139        assert!(matches!(error.downcast_ref(), Some(LengthLimitError)));
-140    }
-141
-142    fn body_from_iter<I>(into_iter: I) -> impl Body<Data = Bytes, Error = Infallible>
-143    where
-144        I: IntoIterator,
-145        I::Item: Into<Bytes> + 'static,
-146        I::IntoIter: Send + 'static,
-147    {
-148        let iter = into_iter
-149            .into_iter()
-150            .map(|it| Frame::data(it.into()))
-151            .map(Ok::<_, Infallible>);
-152
-153        StreamBody::new(futures_util::stream::iter(iter))
-154    }
-155
-156    #[tokio::test]
-157    async fn read_for_chunked_body_around_limit_returns_first_chunk_but_returns_error_on_over_limit_chunk(
-158    ) {
-159        const DATA: [&[u8]; 2] = [b"testing ", b"a string that is too long"];
-160        let inner = body_from_iter(DATA);
-161        let body = &mut Limited::new(inner, 8);
-162
-163        let mut hint = SizeHint::new();
-164        hint.set_upper(8);
-165        assert_eq!(body.size_hint().upper(), hint.upper());
-166
-167        let data = body.frame().await.unwrap().unwrap().into_data().unwrap();
-168        assert_eq!(data, DATA[0]);
-169        hint.set_upper(0);
-170        assert_eq!(body.size_hint().upper(), hint.upper());
-171
-172        let error = body.frame().await.unwrap().unwrap_err();
-173        assert!(matches!(error.downcast_ref(), Some(LengthLimitError)));
-174    }
-175
-176    #[tokio::test]
-177    async fn read_for_chunked_body_over_limit_on_first_chunk_returns_error() {
-178        const DATA: [&[u8]; 2] = [b"testing a string", b" that is too long"];
-179        let inner = body_from_iter(DATA);
-180        let body = &mut Limited::new(inner, 8);
-181
-182        let mut hint = SizeHint::new();
-183        hint.set_upper(8);
-184        assert_eq!(body.size_hint().upper(), hint.upper());
-185
-186        let error = body.frame().await.unwrap().unwrap_err();
-187        assert!(matches!(error.downcast_ref(), Some(LengthLimitError)));
-188    }
-189
-190    #[tokio::test]
-191    async fn read_for_chunked_body_under_limit_is_okay() {
-192        const DATA: [&[u8]; 2] = [b"test", b"ing!"];
-193        let inner = body_from_iter(DATA);
-194        let body = &mut Limited::new(inner, 8);
-195
-196        let mut hint = SizeHint::new();
-197        hint.set_upper(8);
-198        assert_eq!(body.size_hint().upper(), hint.upper());
-199
-200        let data = body.frame().await.unwrap().unwrap().into_data().unwrap();
-201        assert_eq!(data, DATA[0]);
-202        hint.set_upper(4);
-203        assert_eq!(body.size_hint().upper(), hint.upper());
-204
-205        let data = body.frame().await.unwrap().unwrap().into_data().unwrap();
-206        assert_eq!(data, DATA[1]);
-207        hint.set_upper(0);
-208        assert_eq!(body.size_hint().upper(), hint.upper());
-209
-210        assert!(body.frame().await.is_none());
-211    }
-212
-213    struct SomeTrailers;
-214
-215    impl Body for SomeTrailers {
-216        type Data = Bytes;
-217        type Error = Infallible;
-218
-219        fn poll_frame(
-220            self: Pin<&mut Self>,
-221            _cx: &mut Context<'_>,
-222        ) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>> {
-223            Poll::Ready(Some(Ok(Frame::trailers(http::HeaderMap::new()))))
-224        }
-225    }
-226
-227    #[tokio::test]
-228    async fn read_for_trailers_propagates_inner_trailers() {
-229        let body = &mut Limited::new(SomeTrailers, 8);
-230        let frame = body.frame().await.unwrap().unwrap();
-231        assert!(frame.is_trailers());
-232    }
-233
-234    #[derive(Debug)]
-235    struct ErrorBodyError;
-236
-237    impl fmt::Display for ErrorBodyError {
-238        fn fmt(&self, _f: &mut fmt::Formatter) -> fmt::Result {
-239            Ok(())
-240        }
-241    }
-242
-243    impl Error for ErrorBodyError {}
-244
-245    struct ErrorBody;
-246
-247    impl Body for ErrorBody {
-248        type Data = &'static [u8];
-249        type Error = ErrorBodyError;
-250
-251        fn poll_frame(
-252            self: Pin<&mut Self>,
-253            _cx: &mut Context<'_>,
-254        ) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>> {
-255            Poll::Ready(Some(Err(ErrorBodyError)))
-256        }
-257    }
-258
-259    #[tokio::test]
-260    async fn read_for_body_returning_error_propagates_error() {
-261        let body = &mut Limited::new(ErrorBody, 8);
-262        let error = body.frame().await.unwrap().unwrap_err();
-263        assert!(matches!(error.downcast_ref(), Some(ErrorBodyError)));
-264    }
-265}
-
\ No newline at end of file diff --git a/core/target/doc/src/http_body_util/stream.rs.html b/core/target/doc/src/http_body_util/stream.rs.html deleted file mode 100644 index 17203c83..00000000 --- a/core/target/doc/src/http_body_util/stream.rs.html +++ /dev/null @@ -1,241 +0,0 @@ -stream.rs - source

http_body_util/
stream.rs

1use bytes::Buf;
-2use futures_core::{ready, stream::Stream};
-3use http_body::{Body, Frame};
-4use pin_project_lite::pin_project;
-5use std::{
-6    pin::Pin,
-7    task::{Context, Poll},
-8};
-9
-10pin_project! {
-11    /// A body created from a [`Stream`].
-12    #[derive(Clone, Copy, Debug)]
-13    pub struct StreamBody<S> {
-14        #[pin]
-15        stream: S,
-16    }
-17}
-18
-19impl<S> StreamBody<S> {
-20    /// Create a new `StreamBody`.
-21    pub fn new(stream: S) -> Self {
-22        Self { stream }
-23    }
-24}
-25
-26impl<S, D, E> Body for StreamBody<S>
-27where
-28    S: Stream<Item = Result<Frame<D>, E>>,
-29    D: Buf,
-30{
-31    type Data = D;
-32    type Error = E;
-33
-34    fn poll_frame(
-35        self: Pin<&mut Self>,
-36        cx: &mut Context<'_>,
-37    ) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>> {
-38        match self.project().stream.poll_next(cx) {
-39            Poll::Ready(Some(result)) => Poll::Ready(Some(result)),
-40            Poll::Ready(None) => Poll::Ready(None),
-41            Poll::Pending => Poll::Pending,
-42        }
-43    }
-44}
-45
-46impl<S: Stream> Stream for StreamBody<S> {
-47    type Item = S::Item;
-48
-49    fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
-50        self.project().stream.poll_next(cx)
-51    }
-52
-53    fn size_hint(&self) -> (usize, Option<usize>) {
-54        self.stream.size_hint()
-55    }
-56}
-57
-58pin_project! {
-59    /// A stream created from a [`Body`].
-60    #[derive(Clone, Copy, Debug)]
-61    pub struct BodyStream<B> {
-62        #[pin]
-63        body: B,
-64    }
-65}
-66
-67impl<B> BodyStream<B> {
-68    /// Create a new `BodyStream`.
-69    pub fn new(body: B) -> Self {
-70        Self { body }
-71    }
-72}
-73
-74impl<B> Body for BodyStream<B>
-75where
-76    B: Body,
-77{
-78    type Data = B::Data;
-79    type Error = B::Error;
-80
-81    fn poll_frame(
-82        self: Pin<&mut Self>,
-83        cx: &mut Context<'_>,
-84    ) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>> {
-85        self.project().body.poll_frame(cx)
-86    }
-87}
-88
-89impl<B> Stream for BodyStream<B>
-90where
-91    B: Body,
-92{
-93    type Item = Result<Frame<B::Data>, B::Error>;
-94
-95    fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
-96        match self.project().body.poll_frame(cx) {
-97            Poll::Ready(Some(frame)) => Poll::Ready(Some(frame)),
-98            Poll::Ready(None) => Poll::Ready(None),
-99            Poll::Pending => Poll::Pending,
-100        }
-101    }
-102}
-103
-104pin_project! {
-105    /// A data stream created from a [`Body`].
-106    #[derive(Clone, Copy, Debug)]
-107    pub struct BodyDataStream<B> {
-108        #[pin]
-109        body: B,
-110    }
-111}
-112
-113impl<B> BodyDataStream<B> {
-114    /// Create a new `BodyDataStream`
-115    pub fn new(body: B) -> Self {
-116        Self { body }
-117    }
-118}
-119
-120impl<B> Stream for BodyDataStream<B>
-121where
-122    B: Body,
-123{
-124    type Item = Result<B::Data, B::Error>;
-125
-126    fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
-127        loop {
-128            return match ready!(self.as_mut().project().body.poll_frame(cx)) {
-129                Some(Ok(frame)) => match frame.into_data() {
-130                    Ok(bytes) => Poll::Ready(Some(Ok(bytes))),
-131                    Err(_) => continue,
-132                },
-133                Some(Err(err)) => Poll::Ready(Some(Err(err))),
-134                None => Poll::Ready(None),
-135            };
-136        }
-137    }
-138}
-139
-140#[cfg(test)]
-141mod tests {
-142    use crate::{BodyExt, BodyStream, StreamBody};
-143    use bytes::Bytes;
-144    use futures_util::StreamExt;
-145    use http_body::Frame;
-146    use std::convert::Infallible;
-147
-148    #[tokio::test]
-149    async fn body_from_stream() {
-150        let chunks: Vec<Result<_, Infallible>> = vec![
-151            Ok(Frame::data(Bytes::from(vec![1]))),
-152            Ok(Frame::data(Bytes::from(vec![2]))),
-153            Ok(Frame::data(Bytes::from(vec![3]))),
-154        ];
-155        let stream = futures_util::stream::iter(chunks);
-156        let mut body = StreamBody::new(stream);
-157
-158        assert_eq!(
-159            body.frame()
-160                .await
-161                .unwrap()
-162                .unwrap()
-163                .into_data()
-164                .unwrap()
-165                .as_ref(),
-166            [1]
-167        );
-168        assert_eq!(
-169            body.frame()
-170                .await
-171                .unwrap()
-172                .unwrap()
-173                .into_data()
-174                .unwrap()
-175                .as_ref(),
-176            [2]
-177        );
-178        assert_eq!(
-179            body.frame()
-180                .await
-181                .unwrap()
-182                .unwrap()
-183                .into_data()
-184                .unwrap()
-185                .as_ref(),
-186            [3]
-187        );
-188
-189        assert!(body.frame().await.is_none());
-190    }
-191
-192    #[tokio::test]
-193    async fn stream_from_body() {
-194        let chunks: Vec<Result<_, Infallible>> = vec![
-195            Ok(Frame::data(Bytes::from(vec![1]))),
-196            Ok(Frame::data(Bytes::from(vec![2]))),
-197            Ok(Frame::data(Bytes::from(vec![3]))),
-198        ];
-199        let stream = futures_util::stream::iter(chunks);
-200        let body = StreamBody::new(stream);
-201
-202        let mut stream = BodyStream::new(body);
-203
-204        assert_eq!(
-205            stream
-206                .next()
-207                .await
-208                .unwrap()
-209                .unwrap()
-210                .into_data()
-211                .unwrap()
-212                .as_ref(),
-213            [1]
-214        );
-215        assert_eq!(
-216            stream
-217                .next()
-218                .await
-219                .unwrap()
-220                .unwrap()
-221                .into_data()
-222                .unwrap()
-223                .as_ref(),
-224            [2]
-225        );
-226        assert_eq!(
-227            stream
-228                .next()
-229                .await
-230                .unwrap()
-231                .unwrap()
-232                .into_data()
-233                .unwrap()
-234                .as_ref(),
-235            [3]
-236        );
-237
-238        assert!(stream.next().await.is_none());
-239    }
-240}
-
\ No newline at end of file diff --git a/core/target/doc/src/http_body_util/util.rs.html b/core/target/doc/src/http_body_util/util.rs.html deleted file mode 100644 index e9479f2f..00000000 --- a/core/target/doc/src/http_body_util/util.rs.html +++ /dev/null @@ -1,165 +0,0 @@ -util.rs - source

http_body_util/
util.rs

1use std::collections::VecDeque;
-2use std::io::IoSlice;
-3
-4use bytes::{Buf, BufMut, Bytes, BytesMut};
-5
-6#[derive(Debug)]
-7pub(crate) struct BufList<T> {
-8    bufs: VecDeque<T>,
-9}
-10
-11impl<T: Buf> BufList<T> {
-12    #[inline]
-13    pub(crate) fn push(&mut self, buf: T) {
-14        debug_assert!(buf.has_remaining());
-15        self.bufs.push_back(buf);
-16    }
-17
-18    #[inline]
-19    pub(crate) fn pop(&mut self) -> Option<T> {
-20        self.bufs.pop_front()
-21    }
-22}
-23
-24impl<T: Buf> Buf for BufList<T> {
-25    #[inline]
-26    fn remaining(&self) -> usize {
-27        self.bufs.iter().map(|buf| buf.remaining()).sum()
-28    }
-29
-30    #[inline]
-31    fn has_remaining(&self) -> bool {
-32        self.bufs.iter().any(|buf| buf.has_remaining())
-33    }
-34
-35    #[inline]
-36    fn chunk(&self) -> &[u8] {
-37        self.bufs.front().map(Buf::chunk).unwrap_or_default()
-38    }
-39
-40    #[inline]
-41    fn advance(&mut self, mut cnt: usize) {
-42        while cnt > 0 {
-43            {
-44                let front = &mut self.bufs[0];
-45                let rem = front.remaining();
-46                if rem > cnt {
-47                    front.advance(cnt);
-48                    return;
-49                } else {
-50                    front.advance(rem);
-51                    cnt -= rem;
-52                }
-53            }
-54            self.bufs.pop_front();
-55        }
-56    }
-57
-58    #[inline]
-59    fn chunks_vectored<'t>(&'t self, dst: &mut [IoSlice<'t>]) -> usize {
-60        if dst.is_empty() {
-61            return 0;
-62        }
-63        let mut vecs = 0;
-64        for buf in &self.bufs {
-65            vecs += buf.chunks_vectored(&mut dst[vecs..]);
-66            if vecs == dst.len() {
-67                break;
-68            }
-69        }
-70        vecs
-71    }
-72
-73    #[inline]
-74    fn copy_to_bytes(&mut self, len: usize) -> Bytes {
-75        // Our inner buffer may have an optimized version of copy_to_bytes, and if the whole
-76        // request can be fulfilled by the front buffer, we can take advantage.
-77        match self.bufs.front_mut() {
-78            Some(front) if front.remaining() == len => {
-79                let b = front.copy_to_bytes(len);
-80                self.bufs.pop_front();
-81                b
-82            }
-83            Some(front) if front.remaining() > len => front.copy_to_bytes(len),
-84            _ => {
-85                let rem = self.remaining();
-86                assert!(len <= rem, "`len` greater than remaining");
-87                let mut bm = BytesMut::with_capacity(len);
-88                if rem == len {
-89                    // .take() costs a lot more, so skip it if we don't need it
-90                    bm.put(self);
-91                } else {
-92                    bm.put(self.take(len));
-93                }
-94                bm.freeze()
-95            }
-96        }
-97    }
-98}
-99
-100impl<T> Default for BufList<T> {
-101    fn default() -> Self {
-102        BufList {
-103            bufs: VecDeque::new(),
-104        }
-105    }
-106}
-107
-108#[cfg(test)]
-109mod tests {
-110    use std::ptr;
-111
-112    use super::*;
-113
-114    fn hello_world_buf() -> BufList<Bytes> {
-115        BufList {
-116            bufs: vec![Bytes::from("Hello"), Bytes::from(" "), Bytes::from("World")].into(),
-117        }
-118    }
-119
-120    #[test]
-121    fn to_bytes_shorter() {
-122        let mut bufs = hello_world_buf();
-123        let old_ptr = bufs.chunk().as_ptr();
-124        let start = bufs.copy_to_bytes(4);
-125        assert_eq!(start, "Hell");
-126        assert!(ptr::eq(old_ptr, start.as_ptr()));
-127        assert_eq!(bufs.chunk(), b"o");
-128        assert!(ptr::eq(old_ptr.wrapping_add(4), bufs.chunk().as_ptr()));
-129        assert_eq!(bufs.remaining(), 7);
-130    }
-131
-132    #[test]
-133    fn to_bytes_eq() {
-134        let mut bufs = hello_world_buf();
-135        let old_ptr = bufs.chunk().as_ptr();
-136        let start = bufs.copy_to_bytes(5);
-137        assert_eq!(start, "Hello");
-138        assert!(ptr::eq(old_ptr, start.as_ptr()));
-139        assert_eq!(bufs.chunk(), b" ");
-140        assert_eq!(bufs.remaining(), 6);
-141    }
-142
-143    #[test]
-144    fn to_bytes_longer() {
-145        let mut bufs = hello_world_buf();
-146        let start = bufs.copy_to_bytes(7);
-147        assert_eq!(start, "Hello W");
-148        assert_eq!(bufs.remaining(), 4);
-149    }
-150
-151    #[test]
-152    fn one_long_buf_to_bytes() {
-153        let mut buf = BufList::default();
-154        buf.push(b"Hello World" as &[_]);
-155        assert_eq!(buf.copy_to_bytes(5), "Hello");
-156        assert_eq!(buf.chunk(), b" World");
-157    }
-158
-159    #[test]
-160    #[should_panic(expected = "`len` greater than remaining")]
-161    fn buf_to_bytes_too_many() {
-162        hello_world_buf().copy_to_bytes(42);
-163    }
-164}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/client/legacy/client.rs.html b/core/target/doc/src/hyper_util/client/legacy/client.rs.html deleted file mode 100644 index 5cd9aee5..00000000 --- a/core/target/doc/src/hyper_util/client/legacy/client.rs.html +++ /dev/null @@ -1,1672 +0,0 @@ -client.rs - source

hyper_util/client/legacy/
client.rs

1//! The legacy HTTP Client from 0.14.x
-2//!
-3//! This `Client` will eventually be deconstructed into more composable parts.
-4//! For now, to enable people to use hyper 1.0 quicker, this `Client` exists
-5//! in much the same way it did in hyper 0.14.
-6
-7use std::error::Error as StdError;
-8use std::fmt;
-9use std::future::Future;
-10use std::pin::Pin;
-11use std::task::{self, Poll};
-12use std::time::Duration;
-13
-14use futures_util::future::{self, Either, FutureExt, TryFutureExt};
-15use http::uri::Scheme;
-16use hyper::client::conn::TrySendError as ConnTrySendError;
-17use hyper::header::{HeaderValue, HOST};
-18use hyper::rt::Timer;
-19use hyper::{body::Body, Method, Request, Response, Uri, Version};
-20use tracing::{debug, trace, warn};
-21
-22use super::connect::capture::CaptureConnectionExtension;
-23#[cfg(feature = "tokio")]
-24use super::connect::HttpConnector;
-25use super::connect::{Alpn, Connect, Connected, Connection};
-26use super::pool::{self, Ver};
-27
-28use crate::common::future::poll_fn;
-29use crate::common::{lazy as hyper_lazy, timer, Exec, Lazy, SyncWrapper};
-30
-31type BoxSendFuture = Pin<Box<dyn Future<Output = ()> + Send>>;
-32
-33/// A Client to make outgoing HTTP requests.
-34///
-35/// `Client` is cheap to clone and cloning is the recommended way to share a `Client`. The
-36/// underlying connection pool will be reused.
-37#[cfg_attr(docsrs, doc(cfg(any(feature = "http1", feature = "http2"))))]
-38pub struct Client<C, B> {
-39    config: Config,
-40    connector: C,
-41    exec: Exec,
-42    #[cfg(feature = "http1")]
-43    h1_builder: hyper::client::conn::http1::Builder,
-44    #[cfg(feature = "http2")]
-45    h2_builder: hyper::client::conn::http2::Builder<Exec>,
-46    pool: pool::Pool<PoolClient<B>, PoolKey>,
-47}
-48
-49#[derive(Clone, Copy, Debug)]
-50struct Config {
-51    retry_canceled_requests: bool,
-52    set_host: bool,
-53    ver: Ver,
-54}
-55
-56/// Client errors
-57pub struct Error {
-58    kind: ErrorKind,
-59    source: Option<Box<dyn StdError + Send + Sync>>,
-60    #[cfg(any(feature = "http1", feature = "http2"))]
-61    connect_info: Option<Connected>,
-62}
-63
-64#[derive(Debug)]
-65enum ErrorKind {
-66    Canceled,
-67    ChannelClosed,
-68    Connect,
-69    UserUnsupportedRequestMethod,
-70    UserUnsupportedVersion,
-71    UserAbsoluteUriRequired,
-72    SendRequest,
-73}
-74
-75macro_rules! e {
-76    ($kind:ident) => {
-77        Error {
-78            kind: ErrorKind::$kind,
-79            source: None,
-80            connect_info: None,
-81        }
-82    };
-83    ($kind:ident, $src:expr) => {
-84        Error {
-85            kind: ErrorKind::$kind,
-86            source: Some($src.into()),
-87            connect_info: None,
-88        }
-89    };
-90}
-91
-92// We might change this... :shrug:
-93type PoolKey = (http::uri::Scheme, http::uri::Authority);
-94
-95enum TrySendError<B> {
-96    Retryable {
-97        error: Error,
-98        req: Request<B>,
-99        connection_reused: bool,
-100    },
-101    Nope(Error),
-102}
-103
-104/// A `Future` that will resolve to an HTTP Response.
-105///
-106/// This is returned by `Client::request` (and `Client::get`).
-107#[must_use = "futures do nothing unless polled"]
-108pub struct ResponseFuture {
-109    inner: SyncWrapper<
-110        Pin<Box<dyn Future<Output = Result<Response<hyper::body::Incoming>, Error>> + Send>>,
-111    >,
-112}
-113
-114// ===== impl Client =====
-115
-116impl Client<(), ()> {
-117    /// Create a builder to configure a new `Client`.
-118    ///
-119    /// # Example
-120    ///
-121    /// ```
-122    /// # #[cfg(feature = "tokio")]
-123    /// # fn run () {
-124    /// use std::time::Duration;
-125    /// use hyper_util::client::legacy::Client;
-126    /// use hyper_util::rt::{TokioExecutor, TokioTimer};
-127    ///
-128    /// let client = Client::builder(TokioExecutor::new())
-129    ///     .pool_timer(TokioTimer::new())
-130    ///     .pool_idle_timeout(Duration::from_secs(30))
-131    ///     .http2_only(true)
-132    ///     .build_http();
-133    /// # let infer: Client<_, http_body_util::Full<bytes::Bytes>> = client;
-134    /// # drop(infer);
-135    /// # }
-136    /// # fn main() {}
-137    /// ```
-138    pub fn builder<E>(executor: E) -> Builder
-139    where
-140        E: hyper::rt::Executor<BoxSendFuture> + Send + Sync + Clone + 'static,
-141    {
-142        Builder::new(executor)
-143    }
-144}
-145
-146impl<C, B> Client<C, B>
-147where
-148    C: Connect + Clone + Send + Sync + 'static,
-149    B: Body + Send + 'static + Unpin,
-150    B::Data: Send,
-151    B::Error: Into<Box<dyn StdError + Send + Sync>>,
-152{
-153    /// Send a `GET` request to the supplied `Uri`.
-154    ///
-155    /// # Note
-156    ///
-157    /// This requires that the `Body` type have a `Default` implementation.
-158    /// It *should* return an "empty" version of itself, such that
-159    /// `Body::is_end_stream` is `true`.
-160    ///
-161    /// # Example
-162    ///
-163    /// ```
-164    /// # #[cfg(feature = "tokio")]
-165    /// # fn run () {
-166    /// use hyper::Uri;
-167    /// use hyper_util::client::legacy::Client;
-168    /// use hyper_util::rt::TokioExecutor;
-169    /// use bytes::Bytes;
-170    /// use http_body_util::Full;
-171    ///
-172    /// let client: Client<_, Full<Bytes>> = Client::builder(TokioExecutor::new()).build_http();
-173    ///
-174    /// let future = client.get(Uri::from_static("http://httpbin.org/ip"));
-175    /// # }
-176    /// # fn main() {}
-177    /// ```
-178    pub fn get(&self, uri: Uri) -> ResponseFuture
-179    where
-180        B: Default,
-181    {
-182        let body = B::default();
-183        if !body.is_end_stream() {
-184            warn!("default Body used for get() does not return true for is_end_stream");
-185        }
-186
-187        let mut req = Request::new(body);
-188        *req.uri_mut() = uri;
-189        self.request(req)
-190    }
-191
-192    /// Send a constructed `Request` using this `Client`.
-193    ///
-194    /// # Example
-195    ///
-196    /// ```
-197    /// # #[cfg(feature = "tokio")]
-198    /// # fn run () {
-199    /// use hyper::{Method, Request};
-200    /// use hyper_util::client::legacy::Client;
-201    /// use http_body_util::Full;
-202    /// use hyper_util::rt::TokioExecutor;
-203    /// use bytes::Bytes;
-204    ///
-205    /// let client: Client<_, Full<Bytes>> = Client::builder(TokioExecutor::new()).build_http();
-206    ///
-207    /// let req: Request<Full<Bytes>> = Request::builder()
-208    ///     .method(Method::POST)
-209    ///     .uri("http://httpbin.org/post")
-210    ///     .body(Full::from("Hallo!"))
-211    ///     .expect("request builder");
-212    ///
-213    /// let future = client.request(req);
-214    /// # }
-215    /// # fn main() {}
-216    /// ```
-217    pub fn request(&self, mut req: Request<B>) -> ResponseFuture {
-218        let is_http_connect = req.method() == Method::CONNECT;
-219        match req.version() {
-220            Version::HTTP_11 => (),
-221            Version::HTTP_10 => {
-222                if is_http_connect {
-223                    warn!("CONNECT is not allowed for HTTP/1.0");
-224                    return ResponseFuture::new(future::err(e!(UserUnsupportedRequestMethod)));
-225                }
-226            }
-227            Version::HTTP_2 => (),
-228            // completely unsupported HTTP version (like HTTP/0.9)!
-229            other => return ResponseFuture::error_version(other),
-230        };
-231
-232        let pool_key = match extract_domain(req.uri_mut(), is_http_connect) {
-233            Ok(s) => s,
-234            Err(err) => {
-235                return ResponseFuture::new(future::err(err));
-236            }
-237        };
-238
-239        ResponseFuture::new(self.clone().send_request(req, pool_key))
-240    }
-241
-242    async fn send_request(
-243        self,
-244        mut req: Request<B>,
-245        pool_key: PoolKey,
-246    ) -> Result<Response<hyper::body::Incoming>, Error> {
-247        let uri = req.uri().clone();
-248
-249        loop {
-250            req = match self.try_send_request(req, pool_key.clone()).await {
-251                Ok(resp) => return Ok(resp),
-252                Err(TrySendError::Nope(err)) => return Err(err),
-253                Err(TrySendError::Retryable {
-254                    mut req,
-255                    error,
-256                    connection_reused,
-257                }) => {
-258                    if !self.config.retry_canceled_requests || !connection_reused {
-259                        // if client disabled, don't retry
-260                        // a fresh connection means we definitely can't retry
-261                        return Err(error);
-262                    }
-263
-264                    trace!(
-265                        "unstarted request canceled, trying again (reason={:?})",
-266                        error
-267                    );
-268                    *req.uri_mut() = uri.clone();
-269                    req
-270                }
-271            }
-272        }
-273    }
-274
-275    async fn try_send_request(
-276        &self,
-277        mut req: Request<B>,
-278        pool_key: PoolKey,
-279    ) -> Result<Response<hyper::body::Incoming>, TrySendError<B>> {
-280        let mut pooled = self
-281            .connection_for(pool_key)
-282            .await
-283            // `connection_for` already retries checkout errors, so if
-284            // it returns an error, there's not much else to retry
-285            .map_err(TrySendError::Nope)?;
-286
-287        if let Some(conn) = req.extensions_mut().get_mut::<CaptureConnectionExtension>() {
-288            conn.set(&pooled.conn_info);
-289        }
-290
-291        if pooled.is_http1() {
-292            if req.version() == Version::HTTP_2 {
-293                warn!("Connection is HTTP/1, but request requires HTTP/2");
-294                return Err(TrySendError::Nope(
-295                    e!(UserUnsupportedVersion).with_connect_info(pooled.conn_info.clone()),
-296                ));
-297            }
-298
-299            if self.config.set_host {
-300                let uri = req.uri().clone();
-301                req.headers_mut().entry(HOST).or_insert_with(|| {
-302                    let hostname = uri.host().expect("authority implies host");
-303                    if let Some(port) = get_non_default_port(&uri) {
-304                        let s = format!("{hostname}:{port}");
-305                        HeaderValue::from_maybe_shared(bytes::Bytes::from(s))
-306                    } else {
-307                        HeaderValue::from_str(hostname)
-308                    }
-309                    .expect("uri host is valid header value")
-310                });
-311            }
-312
-313            // CONNECT always sends authority-form, so check it first...
-314            if req.method() == Method::CONNECT {
-315                authority_form(req.uri_mut());
-316            } else if pooled.conn_info.is_proxied {
-317                absolute_form(req.uri_mut());
-318            } else {
-319                origin_form(req.uri_mut());
-320            }
-321        } else if req.method() == Method::CONNECT && !pooled.is_http2() {
-322            authority_form(req.uri_mut());
-323        }
-324
-325        let mut res = match pooled.try_send_request(req).await {
-326            Ok(res) => res,
-327            Err(mut err) => {
-328                return if let Some(req) = err.take_message() {
-329                    Err(TrySendError::Retryable {
-330                        connection_reused: pooled.is_reused(),
-331                        error: e!(Canceled, err.into_error())
-332                            .with_connect_info(pooled.conn_info.clone()),
-333                        req,
-334                    })
-335                } else {
-336                    Err(TrySendError::Nope(
-337                        e!(SendRequest, err.into_error())
-338                            .with_connect_info(pooled.conn_info.clone()),
-339                    ))
-340                }
-341            }
-342        };
-343
-344        // If the Connector included 'extra' info, add to Response...
-345        if let Some(extra) = &pooled.conn_info.extra {
-346            extra.set(res.extensions_mut());
-347        }
-348
-349        // If pooled is HTTP/2, we can toss this reference immediately.
-350        //
-351        // when pooled is dropped, it will try to insert back into the
-352        // pool. To delay that, spawn a future that completes once the
-353        // sender is ready again.
-354        //
-355        // This *should* only be once the related `Connection` has polled
-356        // for a new request to start.
-357        //
-358        // It won't be ready if there is a body to stream.
-359        if pooled.is_http2() || !pooled.is_pool_enabled() || pooled.is_ready() {
-360            drop(pooled);
-361        } else {
-362            let on_idle = poll_fn(move |cx| pooled.poll_ready(cx)).map(|_| ());
-363            self.exec.execute(on_idle);
-364        }
-365
-366        Ok(res)
-367    }
-368
-369    async fn connection_for(
-370        &self,
-371        pool_key: PoolKey,
-372    ) -> Result<pool::Pooled<PoolClient<B>, PoolKey>, Error> {
-373        loop {
-374            match self.one_connection_for(pool_key.clone()).await {
-375                Ok(pooled) => return Ok(pooled),
-376                Err(ClientConnectError::Normal(err)) => return Err(err),
-377                Err(ClientConnectError::CheckoutIsClosed(reason)) => {
-378                    if !self.config.retry_canceled_requests {
-379                        return Err(e!(Connect, reason));
-380                    }
-381
-382                    trace!(
-383                        "unstarted request canceled, trying again (reason={:?})",
-384                        reason,
-385                    );
-386                    continue;
-387                }
-388            };
-389        }
-390    }
-391
-392    async fn one_connection_for(
-393        &self,
-394        pool_key: PoolKey,
-395    ) -> Result<pool::Pooled<PoolClient<B>, PoolKey>, ClientConnectError> {
-396        // Return a single connection if pooling is not enabled
-397        if !self.pool.is_enabled() {
-398            return self
-399                .connect_to(pool_key)
-400                .await
-401                .map_err(ClientConnectError::Normal);
-402        }
-403
-404        // This actually races 2 different futures to try to get a ready
-405        // connection the fastest, and to reduce connection churn.
-406        //
-407        // - If the pool has an idle connection waiting, that's used
-408        //   immediately.
-409        // - Otherwise, the Connector is asked to start connecting to
-410        //   the destination Uri.
-411        // - Meanwhile, the pool Checkout is watching to see if any other
-412        //   request finishes and tries to insert an idle connection.
-413        // - If a new connection is started, but the Checkout wins after
-414        //   (an idle connection became available first), the started
-415        //   connection future is spawned into the runtime to complete,
-416        //   and then be inserted into the pool as an idle connection.
-417        let checkout = self.pool.checkout(pool_key.clone());
-418        let connect = self.connect_to(pool_key);
-419        let is_ver_h2 = self.config.ver == Ver::Http2;
-420
-421        // The order of the `select` is depended on below...
-422
-423        match future::select(checkout, connect).await {
-424            // Checkout won, connect future may have been started or not.
-425            //
-426            // If it has, let it finish and insert back into the pool,
-427            // so as to not waste the socket...
-428            Either::Left((Ok(checked_out), connecting)) => {
-429                // This depends on the `select` above having the correct
-430                // order, such that if the checkout future were ready
-431                // immediately, the connect future will never have been
-432                // started.
-433                //
-434                // If it *wasn't* ready yet, then the connect future will
-435                // have been started...
-436                if connecting.started() {
-437                    let bg = connecting
-438                        .map_err(|err| {
-439                            trace!("background connect error: {}", err);
-440                        })
-441                        .map(|_pooled| {
-442                            // dropping here should just place it in
-443                            // the Pool for us...
-444                        });
-445                    // An execute error here isn't important, we're just trying
-446                    // to prevent a waste of a socket...
-447                    self.exec.execute(bg);
-448                }
-449                Ok(checked_out)
-450            }
-451            // Connect won, checkout can just be dropped.
-452            Either::Right((Ok(connected), _checkout)) => Ok(connected),
-453            // Either checkout or connect could get canceled:
-454            //
-455            // 1. Connect is canceled if this is HTTP/2 and there is
-456            //    an outstanding HTTP/2 connecting task.
-457            // 2. Checkout is canceled if the pool cannot deliver an
-458            //    idle connection reliably.
-459            //
-460            // In both cases, we should just wait for the other future.
-461            Either::Left((Err(err), connecting)) => {
-462                if err.is_canceled() {
-463                    connecting.await.map_err(ClientConnectError::Normal)
-464                } else {
-465                    Err(ClientConnectError::Normal(e!(Connect, err)))
-466                }
-467            }
-468            Either::Right((Err(err), checkout)) => {
-469                if err.is_canceled() {
-470                    checkout.await.map_err(move |err| {
-471                        if is_ver_h2 && err.is_canceled() {
-472                            ClientConnectError::CheckoutIsClosed(err)
-473                        } else {
-474                            ClientConnectError::Normal(e!(Connect, err))
-475                        }
-476                    })
-477                } else {
-478                    Err(ClientConnectError::Normal(err))
-479                }
-480            }
-481        }
-482    }
-483
-484    #[cfg(any(feature = "http1", feature = "http2"))]
-485    fn connect_to(
-486        &self,
-487        pool_key: PoolKey,
-488    ) -> impl Lazy<Output = Result<pool::Pooled<PoolClient<B>, PoolKey>, Error>> + Send + Unpin
-489    {
-490        let executor = self.exec.clone();
-491        let pool = self.pool.clone();
-492        #[cfg(feature = "http1")]
-493        let h1_builder = self.h1_builder.clone();
-494        #[cfg(feature = "http2")]
-495        let h2_builder = self.h2_builder.clone();
-496        let ver = self.config.ver;
-497        let is_ver_h2 = ver == Ver::Http2;
-498        let connector = self.connector.clone();
-499        let dst = domain_as_uri(pool_key.clone());
-500        hyper_lazy(move || {
-501            // Try to take a "connecting lock".
-502            //
-503            // If the pool_key is for HTTP/2, and there is already a
-504            // connection being established, then this can't take a
-505            // second lock. The "connect_to" future is Canceled.
-506            let connecting = match pool.connecting(&pool_key, ver) {
-507                Some(lock) => lock,
-508                None => {
-509                    let canceled = e!(Canceled);
-510                    // TODO
-511                    //crate::Error::new_canceled().with("HTTP/2 connection in progress");
-512                    return Either::Right(future::err(canceled));
-513                }
-514            };
-515            Either::Left(
-516                connector
-517                    .connect(super::connect::sealed::Internal, dst)
-518                    .map_err(|src| e!(Connect, src))
-519                    .and_then(move |io| {
-520                        let connected = io.connected();
-521                        // If ALPN is h2 and we aren't http2_only already,
-522                        // then we need to convert our pool checkout into
-523                        // a single HTTP2 one.
-524                        let connecting = if connected.alpn == Alpn::H2 && !is_ver_h2 {
-525                            match connecting.alpn_h2(&pool) {
-526                                Some(lock) => {
-527                                    trace!("ALPN negotiated h2, updating pool");
-528                                    lock
-529                                }
-530                                None => {
-531                                    // Another connection has already upgraded,
-532                                    // the pool checkout should finish up for us.
-533                                    let canceled = e!(Canceled, "ALPN upgraded to HTTP/2");
-534                                    return Either::Right(future::err(canceled));
-535                                }
-536                            }
-537                        } else {
-538                            connecting
-539                        };
-540
-541                        #[cfg_attr(not(feature = "http2"), allow(unused))]
-542                        let is_h2 = is_ver_h2 || connected.alpn == Alpn::H2;
-543
-544                        Either::Left(Box::pin(async move {
-545                            let tx = if is_h2 {
-546                                #[cfg(feature = "http2")] {
-547                                    let (mut tx, conn) =
-548                                        h2_builder.handshake(io).await.map_err(Error::tx)?;
-549
-550                                    trace!(
-551                                        "http2 handshake complete, spawning background dispatcher task"
-552                                    );
-553                                    executor.execute(
-554                                        conn.map_err(|e| debug!("client connection error: {}", e))
-555                                            .map(|_| ()),
-556                                    );
-557
-558                                    // Wait for 'conn' to ready up before we
-559                                    // declare this tx as usable
-560                                    tx.ready().await.map_err(Error::tx)?;
-561                                    PoolTx::Http2(tx)
-562                                }
-563                                #[cfg(not(feature = "http2"))]
-564                                panic!("http2 feature is not enabled");
-565                            } else {
-566                                #[cfg(feature = "http1")] {
-567                                    // Perform the HTTP/1.1 handshake on the provided I/O stream.
-568                                    // Uses the h1_builder to establish a connection, returning a sender (tx) for requests
-569                                    // and a connection task (conn) that manages the connection lifecycle.
-570                                    let (mut tx, conn) =
-571                                        h1_builder.handshake(io).await.map_err(crate::client::legacy::client::Error::tx)?;
-572
-573                                    // Log that the HTTP/1.1 handshake has completed successfully.
-574                                    // This indicates the connection is established and ready for request processing.
-575                                    trace!(
-576                                        "http1 handshake complete, spawning background dispatcher task"
-577                                    );
-578                                    // Create a oneshot channel to communicate errors from the connection task.
-579                                    // err_tx sends errors from the connection task, and err_rx receives them
-580                                    // to correlate connection failures with request readiness errors.
-581                                    let (err_tx, err_rx) = tokio::sync::oneshot::channel();
-582                                    // Spawn the connection task in the background using the executor.
-583                                    // The task manages the HTTP/1.1 connection, including upgrades (e.g., WebSocket).
-584                                    // Errors are sent via err_tx to ensure they can be checked if the sender (tx) fails.
-585                                    executor.execute(
-586                                        conn.with_upgrades()
-587                                            .map_err(|e| {
-588                                                // Log the connection error at debug level for diagnostic purposes.
-589                                                debug!("client connection error: {:?}", e);
-590                                                // Log that the error is being sent to the error channel.
-591                                                trace!("sending connection error to error channel");
-592                                                // Send the error via the oneshot channel, ignoring send failures
-593                                                // (e.g., if the receiver is dropped, which is handled later).
-594                                                let _ =err_tx.send(e);
-595                                            })
-596                                            .map(|_| ()),
-597                                    );
-598                                    // Log that the client is waiting for the connection to be ready.
-599                                    // Readiness indicates the sender (tx) can accept a request without blocking.
-600                                    trace!("waiting for connection to be ready");
-601                                    // Check if the sender is ready to accept a request.
-602                                    // This ensures the connection is fully established before proceeding.
-603                                    // aka:
-604                                    // Wait for 'conn' to ready up before we
-605                                    // declare this tx as usable
-606                                    match tx.ready().await {
-607                                        // If ready, the connection is usable for sending requests.
-608                                        Ok(_) => {
-609                                            // Log that the connection is ready for use.
-610                                            trace!("connection is ready");
-611                                            // Drop the error receiver, as it’s no longer needed since the sender is ready.
-612                                            // This prevents waiting for errors that won’t occur in a successful case.
-613                                            drop(err_rx);
-614                                            // Wrap the sender in PoolTx::Http1 for use in the connection pool.
-615                                            PoolTx::Http1(tx)
-616                                        }
-617                                        // If the sender fails with a closed channel error, check for a specific connection error.
-618                                        // This distinguishes between a vague ChannelClosed error and an actual connection failure.
-619                                        Err(e) if e.is_closed() => {
-620                                            // Log that the channel is closed, indicating a potential connection issue.
-621                                            trace!("connection channel closed, checking for connection error");
-622                                            // Check the oneshot channel for a specific error from the connection task.
-623                                            match err_rx.await {
-624                                                // If an error was received, it’s a specific connection failure.
-625                                                Ok(err) => {
-626                                                     // Log the specific connection error for diagnostics.
-627                                                    trace!("received connection error: {:?}", err);
-628                                                    // Return the error wrapped in Error::tx to propagate it.
-629                                                    return Err(crate::client::legacy::client::Error::tx(err));
-630                                                }
-631                                                // If the error channel is closed, no specific error was sent.
-632                                                // Fall back to the vague ChannelClosed error.
-633                                                Err(_) => {
-634                                                    // Log that the error channel is closed, indicating no specific error.
-635                                                    trace!("error channel closed, returning the vague ChannelClosed error");
-636                                                    // Return the original error wrapped in Error::tx.
-637                                                    return Err(crate::client::legacy::client::Error::tx(e));
-638                                                }
-639                                            }
-640                                        }
-641                                        // For other errors (e.g., timeout, I/O issues), propagate them directly.
-642                                        // These are not ChannelClosed errors and don’t require error channel checks.
-643                                        Err(e) => {
-644                                            // Log the specific readiness failure for diagnostics.
-645                                            trace!("connection readiness failed: {:?}", e);
-646                                            // Return the error wrapped in Error::tx to propagate it.
-647                                            return Err(crate::client::legacy::client::Error::tx(e));
-648                                        }
-649                                    }
-650                                }
-651                                #[cfg(not(feature = "http1"))] {
-652                                    panic!("http1 feature is not enabled");
-653                                }
-654                            };
-655
-656                            Ok(pool.pooled(
-657                                connecting,
-658                                PoolClient {
-659                                    conn_info: connected,
-660                                    tx,
-661                                },
-662                            ))
-663                        }))
-664                    }),
-665            )
-666        })
-667    }
-668}
-669
-670impl<C, B> tower_service::Service<Request<B>> for Client<C, B>
-671where
-672    C: Connect + Clone + Send + Sync + 'static,
-673    B: Body + Send + 'static + Unpin,
-674    B::Data: Send,
-675    B::Error: Into<Box<dyn StdError + Send + Sync>>,
-676{
-677    type Response = Response<hyper::body::Incoming>;
-678    type Error = Error;
-679    type Future = ResponseFuture;
-680
-681    fn poll_ready(&mut self, _: &mut task::Context<'_>) -> Poll<Result<(), Self::Error>> {
-682        Poll::Ready(Ok(()))
-683    }
-684
-685    fn call(&mut self, req: Request<B>) -> Self::Future {
-686        self.request(req)
-687    }
-688}
-689
-690impl<C, B> tower_service::Service<Request<B>> for &'_ Client<C, B>
-691where
-692    C: Connect + Clone + Send + Sync + 'static,
-693    B: Body + Send + 'static + Unpin,
-694    B::Data: Send,
-695    B::Error: Into<Box<dyn StdError + Send + Sync>>,
-696{
-697    type Response = Response<hyper::body::Incoming>;
-698    type Error = Error;
-699    type Future = ResponseFuture;
-700
-701    fn poll_ready(&mut self, _: &mut task::Context<'_>) -> Poll<Result<(), Self::Error>> {
-702        Poll::Ready(Ok(()))
-703    }
-704
-705    fn call(&mut self, req: Request<B>) -> Self::Future {
-706        self.request(req)
-707    }
-708}
-709
-710impl<C: Clone, B> Clone for Client<C, B> {
-711    fn clone(&self) -> Client<C, B> {
-712        Client {
-713            config: self.config,
-714            exec: self.exec.clone(),
-715            #[cfg(feature = "http1")]
-716            h1_builder: self.h1_builder.clone(),
-717            #[cfg(feature = "http2")]
-718            h2_builder: self.h2_builder.clone(),
-719            connector: self.connector.clone(),
-720            pool: self.pool.clone(),
-721        }
-722    }
-723}
-724
-725impl<C, B> fmt::Debug for Client<C, B> {
-726    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-727        f.debug_struct("Client").finish()
-728    }
-729}
-730
-731// ===== impl ResponseFuture =====
-732
-733impl ResponseFuture {
-734    fn new<F>(value: F) -> Self
-735    where
-736        F: Future<Output = Result<Response<hyper::body::Incoming>, Error>> + Send + 'static,
-737    {
-738        Self {
-739            inner: SyncWrapper::new(Box::pin(value)),
-740        }
-741    }
-742
-743    fn error_version(ver: Version) -> Self {
-744        warn!("Request has unsupported version \"{:?}\"", ver);
-745        ResponseFuture::new(Box::pin(future::err(e!(UserUnsupportedVersion))))
-746    }
-747}
-748
-749impl fmt::Debug for ResponseFuture {
-750    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-751        f.pad("Future<Response>")
-752    }
-753}
-754
-755impl Future for ResponseFuture {
-756    type Output = Result<Response<hyper::body::Incoming>, Error>;
-757
-758    fn poll(mut self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Self::Output> {
-759        self.inner.get_mut().as_mut().poll(cx)
-760    }
-761}
-762
-763// ===== impl PoolClient =====
-764
-765// FIXME: allow() required due to `impl Trait` leaking types to this lint
-766#[allow(missing_debug_implementations)]
-767struct PoolClient<B> {
-768    conn_info: Connected,
-769    tx: PoolTx<B>,
-770}
-771
-772enum PoolTx<B> {
-773    #[cfg(feature = "http1")]
-774    Http1(hyper::client::conn::http1::SendRequest<B>),
-775    #[cfg(feature = "http2")]
-776    Http2(hyper::client::conn::http2::SendRequest<B>),
-777}
-778
-779impl<B> PoolClient<B> {
-780    fn poll_ready(
-781        &mut self,
-782        #[allow(unused_variables)] cx: &mut task::Context<'_>,
-783    ) -> Poll<Result<(), Error>> {
-784        match self.tx {
-785            #[cfg(feature = "http1")]
-786            PoolTx::Http1(ref mut tx) => tx.poll_ready(cx).map_err(Error::closed),
-787            #[cfg(feature = "http2")]
-788            PoolTx::Http2(_) => Poll::Ready(Ok(())),
-789        }
-790    }
-791
-792    fn is_http1(&self) -> bool {
-793        !self.is_http2()
-794    }
-795
-796    fn is_http2(&self) -> bool {
-797        match self.tx {
-798            #[cfg(feature = "http1")]
-799            PoolTx::Http1(_) => false,
-800            #[cfg(feature = "http2")]
-801            PoolTx::Http2(_) => true,
-802        }
-803    }
-804
-805    fn is_poisoned(&self) -> bool {
-806        self.conn_info.poisoned.poisoned()
-807    }
-808
-809    fn is_ready(&self) -> bool {
-810        match self.tx {
-811            #[cfg(feature = "http1")]
-812            PoolTx::Http1(ref tx) => tx.is_ready(),
-813            #[cfg(feature = "http2")]
-814            PoolTx::Http2(ref tx) => tx.is_ready(),
-815        }
-816    }
-817}
-818
-819impl<B: Body + 'static> PoolClient<B> {
-820    fn try_send_request(
-821        &mut self,
-822        req: Request<B>,
-823    ) -> impl Future<Output = Result<Response<hyper::body::Incoming>, ConnTrySendError<Request<B>>>>
-824    where
-825        B: Send,
-826    {
-827        #[cfg(all(feature = "http1", feature = "http2"))]
-828        return match self.tx {
-829            #[cfg(feature = "http1")]
-830            PoolTx::Http1(ref mut tx) => Either::Left(tx.try_send_request(req)),
-831            #[cfg(feature = "http2")]
-832            PoolTx::Http2(ref mut tx) => Either::Right(tx.try_send_request(req)),
-833        };
-834
-835        #[cfg(feature = "http1")]
-836        #[cfg(not(feature = "http2"))]
-837        return match self.tx {
-838            #[cfg(feature = "http1")]
-839            PoolTx::Http1(ref mut tx) => tx.try_send_request(req),
-840        };
-841
-842        #[cfg(not(feature = "http1"))]
-843        #[cfg(feature = "http2")]
-844        return match self.tx {
-845            #[cfg(feature = "http2")]
-846            PoolTx::Http2(ref mut tx) => tx.try_send_request(req),
-847        };
-848    }
-849}
-850
-851impl<B> pool::Poolable for PoolClient<B>
-852where
-853    B: Send + 'static,
-854{
-855    fn is_open(&self) -> bool {
-856        !self.is_poisoned() && self.is_ready()
-857    }
-858
-859    fn reserve(self) -> pool::Reservation<Self> {
-860        match self.tx {
-861            #[cfg(feature = "http1")]
-862            PoolTx::Http1(tx) => pool::Reservation::Unique(PoolClient {
-863                conn_info: self.conn_info,
-864                tx: PoolTx::Http1(tx),
-865            }),
-866            #[cfg(feature = "http2")]
-867            PoolTx::Http2(tx) => {
-868                let b = PoolClient {
-869                    conn_info: self.conn_info.clone(),
-870                    tx: PoolTx::Http2(tx.clone()),
-871                };
-872                let a = PoolClient {
-873                    conn_info: self.conn_info,
-874                    tx: PoolTx::Http2(tx),
-875                };
-876                pool::Reservation::Shared(a, b)
-877            }
-878        }
-879    }
-880
-881    fn can_share(&self) -> bool {
-882        self.is_http2()
-883    }
-884}
-885
-886enum ClientConnectError {
-887    Normal(Error),
-888    CheckoutIsClosed(pool::Error),
-889}
-890
-891fn origin_form(uri: &mut Uri) {
-892    let path = match uri.path_and_query() {
-893        Some(path) if path.as_str() != "/" => {
-894            let mut parts = ::http::uri::Parts::default();
-895            parts.path_and_query = Some(path.clone());
-896            Uri::from_parts(parts).expect("path is valid uri")
-897        }
-898        _none_or_just_slash => {
-899            debug_assert!(Uri::default() == "/");
-900            Uri::default()
-901        }
-902    };
-903    *uri = path
-904}
-905
-906fn absolute_form(uri: &mut Uri) {
-907    debug_assert!(uri.scheme().is_some(), "absolute_form needs a scheme");
-908    debug_assert!(
-909        uri.authority().is_some(),
-910        "absolute_form needs an authority"
-911    );
-912}
-913
-914fn authority_form(uri: &mut Uri) {
-915    if let Some(path) = uri.path_and_query() {
-916        // `https://hyper.rs` would parse with `/` path, don't
-917        // annoy people about that...
-918        if path != "/" {
-919            warn!("HTTP/1.1 CONNECT request stripping path: {:?}", path);
-920        }
-921    }
-922    *uri = match uri.authority() {
-923        Some(auth) => {
-924            let mut parts = ::http::uri::Parts::default();
-925            parts.authority = Some(auth.clone());
-926            Uri::from_parts(parts).expect("authority is valid")
-927        }
-928        None => {
-929            unreachable!("authority_form with relative uri");
-930        }
-931    };
-932}
-933
-934fn extract_domain(uri: &mut Uri, is_http_connect: bool) -> Result<PoolKey, Error> {
-935    let uri_clone = uri.clone();
-936    match (uri_clone.scheme(), uri_clone.authority()) {
-937        (Some(scheme), Some(auth)) => Ok((scheme.clone(), auth.clone())),
-938        (None, Some(auth)) if is_http_connect => {
-939            let scheme = match auth.port_u16() {
-940                Some(443) => {
-941                    set_scheme(uri, Scheme::HTTPS);
-942                    Scheme::HTTPS
-943                }
-944                _ => {
-945                    set_scheme(uri, Scheme::HTTP);
-946                    Scheme::HTTP
-947                }
-948            };
-949            Ok((scheme, auth.clone()))
-950        }
-951        _ => {
-952            debug!("Client requires absolute-form URIs, received: {:?}", uri);
-953            Err(e!(UserAbsoluteUriRequired))
-954        }
-955    }
-956}
-957
-958fn domain_as_uri((scheme, auth): PoolKey) -> Uri {
-959    http::uri::Builder::new()
-960        .scheme(scheme)
-961        .authority(auth)
-962        .path_and_query("/")
-963        .build()
-964        .expect("domain is valid Uri")
-965}
-966
-967fn set_scheme(uri: &mut Uri, scheme: Scheme) {
-968    debug_assert!(
-969        uri.scheme().is_none(),
-970        "set_scheme expects no existing scheme"
-971    );
-972    let old = std::mem::take(uri);
-973    let mut parts: ::http::uri::Parts = old.into();
-974    parts.scheme = Some(scheme);
-975    parts.path_and_query = Some("/".parse().expect("slash is a valid path"));
-976    *uri = Uri::from_parts(parts).expect("scheme is valid");
-977}
-978
-979fn get_non_default_port(uri: &Uri) -> Option<http::uri::Port<&str>> {
-980    match (uri.port().map(|p| p.as_u16()), is_schema_secure(uri)) {
-981        (Some(443), true) => None,
-982        (Some(80), false) => None,
-983        _ => uri.port(),
-984    }
-985}
-986
-987fn is_schema_secure(uri: &Uri) -> bool {
-988    uri.scheme_str()
-989        .map(|scheme_str| matches!(scheme_str, "wss" | "https"))
-990        .unwrap_or_default()
-991}
-992
-993/// A builder to configure a new [`Client`](Client).
-994///
-995/// # Example
-996///
-997/// ```
-998/// # #[cfg(feature = "tokio")]
-999/// # fn run () {
-1000/// use std::time::Duration;
-1001/// use hyper_util::client::legacy::Client;
-1002/// use hyper_util::rt::TokioExecutor;
-1003///
-1004/// let client = Client::builder(TokioExecutor::new())
-1005///     .pool_idle_timeout(Duration::from_secs(30))
-1006///     .http2_only(true)
-1007///     .build_http();
-1008/// # let infer: Client<_, http_body_util::Full<bytes::Bytes>> = client;
-1009/// # drop(infer);
-1010/// # }
-1011/// # fn main() {}
-1012/// ```
-1013#[cfg_attr(docsrs, doc(cfg(any(feature = "http1", feature = "http2"))))]
-1014#[derive(Clone)]
-1015pub struct Builder {
-1016    client_config: Config,
-1017    exec: Exec,
-1018    #[cfg(feature = "http1")]
-1019    h1_builder: hyper::client::conn::http1::Builder,
-1020    #[cfg(feature = "http2")]
-1021    h2_builder: hyper::client::conn::http2::Builder<Exec>,
-1022    pool_config: pool::Config,
-1023    pool_timer: Option<timer::Timer>,
-1024}
-1025
-1026impl Builder {
-1027    /// Construct a new Builder.
-1028    pub fn new<E>(executor: E) -> Self
-1029    where
-1030        E: hyper::rt::Executor<BoxSendFuture> + Send + Sync + Clone + 'static,
-1031    {
-1032        let exec = Exec::new(executor);
-1033        Self {
-1034            client_config: Config {
-1035                retry_canceled_requests: true,
-1036                set_host: true,
-1037                ver: Ver::Auto,
-1038            },
-1039            exec: exec.clone(),
-1040            #[cfg(feature = "http1")]
-1041            h1_builder: hyper::client::conn::http1::Builder::new(),
-1042            #[cfg(feature = "http2")]
-1043            h2_builder: hyper::client::conn::http2::Builder::new(exec),
-1044            pool_config: pool::Config {
-1045                idle_timeout: Some(Duration::from_secs(90)),
-1046                max_idle_per_host: usize::MAX,
-1047            },
-1048            pool_timer: None,
-1049        }
-1050    }
-1051    /// Set an optional timeout for idle sockets being kept-alive.
-1052    /// A `Timer` is required for this to take effect. See `Builder::pool_timer`
-1053    ///
-1054    /// Pass `None` to disable timeout.
-1055    ///
-1056    /// Default is 90 seconds.
-1057    ///
-1058    /// # Example
-1059    ///
-1060    /// ```
-1061    /// # #[cfg(feature = "tokio")]
-1062    /// # fn run () {
-1063    /// use std::time::Duration;
-1064    /// use hyper_util::client::legacy::Client;
-1065    /// use hyper_util::rt::{TokioExecutor, TokioTimer};
-1066    ///
-1067    /// let client = Client::builder(TokioExecutor::new())
-1068    ///     .pool_idle_timeout(Duration::from_secs(30))
-1069    ///     .pool_timer(TokioTimer::new())
-1070    ///     .build_http();
-1071    ///
-1072    /// # let infer: Client<_, http_body_util::Full<bytes::Bytes>> = client;
-1073    /// # }
-1074    /// # fn main() {}
-1075    /// ```
-1076    pub fn pool_idle_timeout<D>(&mut self, val: D) -> &mut Self
-1077    where
-1078        D: Into<Option<Duration>>,
-1079    {
-1080        self.pool_config.idle_timeout = val.into();
-1081        self
-1082    }
-1083
-1084    #[doc(hidden)]
-1085    #[deprecated(note = "renamed to `pool_max_idle_per_host`")]
-1086    pub fn max_idle_per_host(&mut self, max_idle: usize) -> &mut Self {
-1087        self.pool_config.max_idle_per_host = max_idle;
-1088        self
-1089    }
-1090
-1091    /// Sets the maximum idle connection per host allowed in the pool.
-1092    ///
-1093    /// Default is `usize::MAX` (no limit).
-1094    pub fn pool_max_idle_per_host(&mut self, max_idle: usize) -> &mut Self {
-1095        self.pool_config.max_idle_per_host = max_idle;
-1096        self
-1097    }
-1098
-1099    // HTTP/1 options
-1100
-1101    /// Sets the exact size of the read buffer to *always* use.
-1102    ///
-1103    /// Note that setting this option unsets the `http1_max_buf_size` option.
-1104    ///
-1105    /// Default is an adaptive read buffer.
-1106    #[cfg(feature = "http1")]
-1107    #[cfg_attr(docsrs, doc(cfg(feature = "http1")))]
-1108    pub fn http1_read_buf_exact_size(&mut self, sz: usize) -> &mut Self {
-1109        self.h1_builder.read_buf_exact_size(Some(sz));
-1110        self
-1111    }
-1112
-1113    /// Set the maximum buffer size for the connection.
-1114    ///
-1115    /// Default is ~400kb.
-1116    ///
-1117    /// Note that setting this option unsets the `http1_read_exact_buf_size` option.
-1118    ///
-1119    /// # Panics
-1120    ///
-1121    /// The minimum value allowed is 8192. This method panics if the passed `max` is less than the minimum.
-1122    #[cfg(feature = "http1")]
-1123    #[cfg_attr(docsrs, doc(cfg(feature = "http1")))]
-1124    pub fn http1_max_buf_size(&mut self, max: usize) -> &mut Self {
-1125        self.h1_builder.max_buf_size(max);
-1126        self
-1127    }
-1128
-1129    /// Set whether HTTP/1 connections will accept spaces between header names
-1130    /// and the colon that follow them in responses.
-1131    ///
-1132    /// Newline codepoints (`\r` and `\n`) will be transformed to spaces when
-1133    /// parsing.
-1134    ///
-1135    /// You probably don't need this, here is what [RFC 7230 Section 3.2.4.] has
-1136    /// to say about it:
-1137    ///
-1138    /// > No whitespace is allowed between the header field-name and colon. In
-1139    /// > the past, differences in the handling of such whitespace have led to
-1140    /// > security vulnerabilities in request routing and response handling. A
-1141    /// > server MUST reject any received request message that contains
-1142    /// > whitespace between a header field-name and colon with a response code
-1143    /// > of 400 (Bad Request). A proxy MUST remove any such whitespace from a
-1144    /// > response message before forwarding the message downstream.
-1145    ///
-1146    /// Note that this setting does not affect HTTP/2.
-1147    ///
-1148    /// Default is false.
-1149    ///
-1150    /// [RFC 7230 Section 3.2.4.]: https://tools.ietf.org/html/rfc7230#section-3.2.4
-1151    #[cfg(feature = "http1")]
-1152    #[cfg_attr(docsrs, doc(cfg(feature = "http1")))]
-1153    pub fn http1_allow_spaces_after_header_name_in_responses(&mut self, val: bool) -> &mut Self {
-1154        self.h1_builder
-1155            .allow_spaces_after_header_name_in_responses(val);
-1156        self
-1157    }
-1158
-1159    /// Set whether HTTP/1 connections will accept obsolete line folding for
-1160    /// header values.
-1161    ///
-1162    /// You probably don't need this, here is what [RFC 7230 Section 3.2.4.] has
-1163    /// to say about it:
-1164    ///
-1165    /// > A server that receives an obs-fold in a request message that is not
-1166    /// > within a message/http container MUST either reject the message by
-1167    /// > sending a 400 (Bad Request), preferably with a representation
-1168    /// > explaining that obsolete line folding is unacceptable, or replace
-1169    /// > each received obs-fold with one or more SP octets prior to
-1170    /// > interpreting the field value or forwarding the message downstream.
-1171    ///
-1172    /// > A proxy or gateway that receives an obs-fold in a response message
-1173    /// > that is not within a message/http container MUST either discard the
-1174    /// > message and replace it with a 502 (Bad Gateway) response, preferably
-1175    /// > with a representation explaining that unacceptable line folding was
-1176    /// > received, or replace each received obs-fold with one or more SP
-1177    /// > octets prior to interpreting the field value or forwarding the
-1178    /// > message downstream.
-1179    ///
-1180    /// > A user agent that receives an obs-fold in a response message that is
-1181    /// > not within a message/http container MUST replace each received
-1182    /// > obs-fold with one or more SP octets prior to interpreting the field
-1183    /// > value.
-1184    ///
-1185    /// Note that this setting does not affect HTTP/2.
-1186    ///
-1187    /// Default is false.
-1188    ///
-1189    /// [RFC 7230 Section 3.2.4.]: https://tools.ietf.org/html/rfc7230#section-3.2.4
-1190    #[cfg(feature = "http1")]
-1191    #[cfg_attr(docsrs, doc(cfg(feature = "http1")))]
-1192    pub fn http1_allow_obsolete_multiline_headers_in_responses(&mut self, val: bool) -> &mut Self {
-1193        self.h1_builder
-1194            .allow_obsolete_multiline_headers_in_responses(val);
-1195        self
-1196    }
-1197
-1198    /// Sets whether invalid header lines should be silently ignored in HTTP/1 responses.
-1199    ///
-1200    /// This mimics the behaviour of major browsers. You probably don't want this.
-1201    /// You should only want this if you are implementing a proxy whose main
-1202    /// purpose is to sit in front of browsers whose users access arbitrary content
-1203    /// which may be malformed, and they expect everything that works without
-1204    /// the proxy to keep working with the proxy.
-1205    ///
-1206    /// This option will prevent Hyper's client from returning an error encountered
-1207    /// when parsing a header, except if the error was caused by the character NUL
-1208    /// (ASCII code 0), as Chrome specifically always reject those.
-1209    ///
-1210    /// The ignorable errors are:
-1211    /// * empty header names;
-1212    /// * characters that are not allowed in header names, except for `\0` and `\r`;
-1213    /// * when `allow_spaces_after_header_name_in_responses` is not enabled,
-1214    ///   spaces and tabs between the header name and the colon;
-1215    /// * missing colon between header name and colon;
-1216    /// * characters that are not allowed in header values except for `\0` and `\r`.
-1217    ///
-1218    /// If an ignorable error is encountered, the parser tries to find the next
-1219    /// line in the input to resume parsing the rest of the headers. An error
-1220    /// will be emitted nonetheless if it finds `\0` or a lone `\r` while
-1221    /// looking for the next line.
-1222    #[cfg(feature = "http1")]
-1223    #[cfg_attr(docsrs, doc(cfg(feature = "http1")))]
-1224    pub fn http1_ignore_invalid_headers_in_responses(&mut self, val: bool) -> &mut Builder {
-1225        self.h1_builder.ignore_invalid_headers_in_responses(val);
-1226        self
-1227    }
-1228
-1229    /// Set whether HTTP/1 connections should try to use vectored writes,
-1230    /// or always flatten into a single buffer.
-1231    ///
-1232    /// Note that setting this to false may mean more copies of body data,
-1233    /// but may also improve performance when an IO transport doesn't
-1234    /// support vectored writes well, such as most TLS implementations.
-1235    ///
-1236    /// Setting this to true will force hyper to use queued strategy
-1237    /// which may eliminate unnecessary cloning on some TLS backends
-1238    ///
-1239    /// Default is `auto`. In this mode hyper will try to guess which
-1240    /// mode to use
-1241    #[cfg(feature = "http1")]
-1242    #[cfg_attr(docsrs, doc(cfg(feature = "http1")))]
-1243    pub fn http1_writev(&mut self, enabled: bool) -> &mut Builder {
-1244        self.h1_builder.writev(enabled);
-1245        self
-1246    }
-1247
-1248    /// Set whether HTTP/1 connections will write header names as title case at
-1249    /// the socket level.
-1250    ///
-1251    /// Note that this setting does not affect HTTP/2.
-1252    ///
-1253    /// Default is false.
-1254    #[cfg(feature = "http1")]
-1255    #[cfg_attr(docsrs, doc(cfg(feature = "http1")))]
-1256    pub fn http1_title_case_headers(&mut self, val: bool) -> &mut Self {
-1257        self.h1_builder.title_case_headers(val);
-1258        self
-1259    }
-1260
-1261    /// Set whether to support preserving original header cases.
-1262    ///
-1263    /// Currently, this will record the original cases received, and store them
-1264    /// in a private extension on the `Response`. It will also look for and use
-1265    /// such an extension in any provided `Request`.
-1266    ///
-1267    /// Since the relevant extension is still private, there is no way to
-1268    /// interact with the original cases. The only effect this can have now is
-1269    /// to forward the cases in a proxy-like fashion.
-1270    ///
-1271    /// Note that this setting does not affect HTTP/2.
-1272    ///
-1273    /// Default is false.
-1274    #[cfg(feature = "http1")]
-1275    #[cfg_attr(docsrs, doc(cfg(feature = "http1")))]
-1276    pub fn http1_preserve_header_case(&mut self, val: bool) -> &mut Self {
-1277        self.h1_builder.preserve_header_case(val);
-1278        self
-1279    }
-1280
-1281    /// Set the maximum number of headers.
-1282    ///
-1283    /// When a response is received, the parser will reserve a buffer to store headers for optimal
-1284    /// performance.
-1285    ///
-1286    /// If client receives more headers than the buffer size, the error "message header too large"
-1287    /// is returned.
-1288    ///
-1289    /// The headers is allocated on the stack by default, which has higher performance. After
-1290    /// setting this value, headers will be allocated in heap memory, that is, heap memory
-1291    /// allocation will occur for each response, and there will be a performance drop of about 5%.
-1292    ///
-1293    /// Note that this setting does not affect HTTP/2.
-1294    ///
-1295    /// Default is 100.
-1296    #[cfg(feature = "http1")]
-1297    #[cfg_attr(docsrs, doc(cfg(feature = "http1")))]
-1298    pub fn http1_max_headers(&mut self, val: usize) -> &mut Self {
-1299        self.h1_builder.max_headers(val);
-1300        self
-1301    }
-1302
-1303    /// Set whether HTTP/0.9 responses should be tolerated.
-1304    ///
-1305    /// Default is false.
-1306    #[cfg(feature = "http1")]
-1307    #[cfg_attr(docsrs, doc(cfg(feature = "http1")))]
-1308    pub fn http09_responses(&mut self, val: bool) -> &mut Self {
-1309        self.h1_builder.http09_responses(val);
-1310        self
-1311    }
-1312
-1313    /// Set whether the connection **must** use HTTP/2.
-1314    ///
-1315    /// The destination must either allow HTTP2 Prior Knowledge, or the
-1316    /// `Connect` should be configured to do use ALPN to upgrade to `h2`
-1317    /// as part of the connection process. This will not make the `Client`
-1318    /// utilize ALPN by itself.
-1319    ///
-1320    /// Note that setting this to true prevents HTTP/1 from being allowed.
-1321    ///
-1322    /// Default is false.
-1323    #[cfg(feature = "http2")]
-1324    #[cfg_attr(docsrs, doc(cfg(feature = "http2")))]
-1325    pub fn http2_only(&mut self, val: bool) -> &mut Self {
-1326        self.client_config.ver = if val { Ver::Http2 } else { Ver::Auto };
-1327        self
-1328    }
-1329
-1330    /// Configures the maximum number of pending reset streams allowed before a GOAWAY will be sent.
-1331    ///
-1332    /// This will default to the default value set by the [`h2` crate](https://crates.io/crates/h2).
-1333    /// As of v0.4.0, it is 20.
-1334    ///
-1335    /// See <https://github.com/hyperium/hyper/issues/2877> for more information.
-1336    #[cfg(feature = "http2")]
-1337    #[cfg_attr(docsrs, doc(cfg(feature = "http2")))]
-1338    pub fn http2_max_pending_accept_reset_streams(
-1339        &mut self,
-1340        max: impl Into<Option<usize>>,
-1341    ) -> &mut Self {
-1342        self.h2_builder.max_pending_accept_reset_streams(max.into());
-1343        self
-1344    }
-1345
-1346    /// Sets the [`SETTINGS_INITIAL_WINDOW_SIZE`][spec] option for HTTP2
-1347    /// stream-level flow control.
-1348    ///
-1349    /// Passing `None` will do nothing.
-1350    ///
-1351    /// If not set, hyper will use a default.
-1352    ///
-1353    /// [spec]: https://http2.github.io/http2-spec/#SETTINGS_INITIAL_WINDOW_SIZE
-1354    #[cfg(feature = "http2")]
-1355    #[cfg_attr(docsrs, doc(cfg(feature = "http2")))]
-1356    pub fn http2_initial_stream_window_size(&mut self, sz: impl Into<Option<u32>>) -> &mut Self {
-1357        self.h2_builder.initial_stream_window_size(sz.into());
-1358        self
-1359    }
-1360
-1361    /// Sets the max connection-level flow control for HTTP2
-1362    ///
-1363    /// Passing `None` will do nothing.
-1364    ///
-1365    /// If not set, hyper will use a default.
-1366    #[cfg(feature = "http2")]
-1367    #[cfg_attr(docsrs, doc(cfg(feature = "http2")))]
-1368    pub fn http2_initial_connection_window_size(
-1369        &mut self,
-1370        sz: impl Into<Option<u32>>,
-1371    ) -> &mut Self {
-1372        self.h2_builder.initial_connection_window_size(sz.into());
-1373        self
-1374    }
-1375
-1376    /// Sets the initial maximum of locally initiated (send) streams.
-1377    ///
-1378    /// This value will be overwritten by the value included in the initial
-1379    /// SETTINGS frame received from the peer as part of a [connection preface].
-1380    ///
-1381    /// Passing `None` will do nothing.
-1382    ///
-1383    /// If not set, hyper will use a default.
-1384    ///
-1385    /// [connection preface]: https://httpwg.org/specs/rfc9113.html#preface
-1386    #[cfg(feature = "http2")]
-1387    #[cfg_attr(docsrs, doc(cfg(feature = "http2")))]
-1388    pub fn http2_initial_max_send_streams(
-1389        &mut self,
-1390        initial: impl Into<Option<usize>>,
-1391    ) -> &mut Self {
-1392        self.h2_builder.initial_max_send_streams(initial);
-1393        self
-1394    }
-1395
-1396    /// Sets whether to use an adaptive flow control.
-1397    ///
-1398    /// Enabling this will override the limits set in
-1399    /// `http2_initial_stream_window_size` and
-1400    /// `http2_initial_connection_window_size`.
-1401    #[cfg(feature = "http2")]
-1402    #[cfg_attr(docsrs, doc(cfg(feature = "http2")))]
-1403    pub fn http2_adaptive_window(&mut self, enabled: bool) -> &mut Self {
-1404        self.h2_builder.adaptive_window(enabled);
-1405        self
-1406    }
-1407
-1408    /// Sets the maximum frame size to use for HTTP2.
-1409    ///
-1410    /// Passing `None` will do nothing.
-1411    ///
-1412    /// If not set, hyper will use a default.
-1413    #[cfg(feature = "http2")]
-1414    #[cfg_attr(docsrs, doc(cfg(feature = "http2")))]
-1415    pub fn http2_max_frame_size(&mut self, sz: impl Into<Option<u32>>) -> &mut Self {
-1416        self.h2_builder.max_frame_size(sz);
-1417        self
-1418    }
-1419
-1420    /// Sets the max size of received header frames for HTTP2.
-1421    ///
-1422    /// Default is currently 16KB, but can change.
-1423    #[cfg(feature = "http2")]
-1424    #[cfg_attr(docsrs, doc(cfg(feature = "http2")))]
-1425    pub fn http2_max_header_list_size(&mut self, max: u32) -> &mut Self {
-1426        self.h2_builder.max_header_list_size(max);
-1427        self
-1428    }
-1429
-1430    /// Sets an interval for HTTP2 Ping frames should be sent to keep a
-1431    /// connection alive.
-1432    ///
-1433    /// Pass `None` to disable HTTP2 keep-alive.
-1434    ///
-1435    /// Default is currently disabled.
-1436    ///
-1437    /// # Cargo Feature
-1438    ///
-1439    /// Requires the `tokio` cargo feature to be enabled.
-1440    #[cfg(feature = "tokio")]
-1441    #[cfg(feature = "http2")]
-1442    #[cfg_attr(docsrs, doc(cfg(feature = "http2")))]
-1443    pub fn http2_keep_alive_interval(
-1444        &mut self,
-1445        interval: impl Into<Option<Duration>>,
-1446    ) -> &mut Self {
-1447        self.h2_builder.keep_alive_interval(interval);
-1448        self
-1449    }
-1450
-1451    /// Sets a timeout for receiving an acknowledgement of the keep-alive ping.
-1452    ///
-1453    /// If the ping is not acknowledged within the timeout, the connection will
-1454    /// be closed. Does nothing if `http2_keep_alive_interval` is disabled.
-1455    ///
-1456    /// Default is 20 seconds.
-1457    ///
-1458    /// # Cargo Feature
-1459    ///
-1460    /// Requires the `tokio` cargo feature to be enabled.
-1461    #[cfg(feature = "tokio")]
-1462    #[cfg(feature = "http2")]
-1463    #[cfg_attr(docsrs, doc(cfg(feature = "http2")))]
-1464    pub fn http2_keep_alive_timeout(&mut self, timeout: Duration) -> &mut Self {
-1465        self.h2_builder.keep_alive_timeout(timeout);
-1466        self
-1467    }
-1468
-1469    /// Sets whether HTTP2 keep-alive should apply while the connection is idle.
-1470    ///
-1471    /// If disabled, keep-alive pings are only sent while there are open
-1472    /// request/responses streams. If enabled, pings are also sent when no
-1473    /// streams are active. Does nothing if `http2_keep_alive_interval` is
-1474    /// disabled.
-1475    ///
-1476    /// Default is `false`.
-1477    ///
-1478    /// # Cargo Feature
-1479    ///
-1480    /// Requires the `tokio` cargo feature to be enabled.
-1481    #[cfg(feature = "tokio")]
-1482    #[cfg(feature = "http2")]
-1483    #[cfg_attr(docsrs, doc(cfg(feature = "http2")))]
-1484    pub fn http2_keep_alive_while_idle(&mut self, enabled: bool) -> &mut Self {
-1485        self.h2_builder.keep_alive_while_idle(enabled);
-1486        self
-1487    }
-1488
-1489    /// Sets the maximum number of HTTP2 concurrent locally reset streams.
-1490    ///
-1491    /// See the documentation of [`h2::client::Builder::max_concurrent_reset_streams`] for more
-1492    /// details.
-1493    ///
-1494    /// The default value is determined by the `h2` crate.
-1495    ///
-1496    /// [`h2::client::Builder::max_concurrent_reset_streams`]: https://docs.rs/h2/client/struct.Builder.html#method.max_concurrent_reset_streams
-1497    #[cfg(feature = "http2")]
-1498    #[cfg_attr(docsrs, doc(cfg(feature = "http2")))]
-1499    pub fn http2_max_concurrent_reset_streams(&mut self, max: usize) -> &mut Self {
-1500        self.h2_builder.max_concurrent_reset_streams(max);
-1501        self
-1502    }
-1503
-1504    /// Provide a timer to be used for h2
-1505    ///
-1506    /// See the documentation of [`h2::client::Builder::timer`] for more
-1507    /// details.
-1508    ///
-1509    /// [`h2::client::Builder::timer`]: https://docs.rs/h2/client/struct.Builder.html#method.timer
-1510    pub fn timer<M>(&mut self, timer: M) -> &mut Self
-1511    where
-1512        M: Timer + Send + Sync + 'static,
-1513    {
-1514        #[cfg(feature = "http2")]
-1515        self.h2_builder.timer(timer);
-1516        self
-1517    }
-1518
-1519    /// Provide a timer to be used for timeouts and intervals in connection pools.
-1520    pub fn pool_timer<M>(&mut self, timer: M) -> &mut Self
-1521    where
-1522        M: Timer + Clone + Send + Sync + 'static,
-1523    {
-1524        self.pool_timer = Some(timer::Timer::new(timer.clone()));
-1525        self
-1526    }
-1527
-1528    /// Set the maximum write buffer size for each HTTP/2 stream.
-1529    ///
-1530    /// Default is currently 1MB, but may change.
-1531    ///
-1532    /// # Panics
-1533    ///
-1534    /// The value must be no larger than `u32::MAX`.
-1535    #[cfg(feature = "http2")]
-1536    #[cfg_attr(docsrs, doc(cfg(feature = "http2")))]
-1537    pub fn http2_max_send_buf_size(&mut self, max: usize) -> &mut Self {
-1538        self.h2_builder.max_send_buf_size(max);
-1539        self
-1540    }
-1541
-1542    /// Set whether to retry requests that get disrupted before ever starting
-1543    /// to write.
-1544    ///
-1545    /// This means a request that is queued, and gets given an idle, reused
-1546    /// connection, and then encounters an error immediately as the idle
-1547    /// connection was found to be unusable.
-1548    ///
-1549    /// When this is set to `false`, the related `ResponseFuture` would instead
-1550    /// resolve to an `Error::Cancel`.
-1551    ///
-1552    /// Default is `true`.
-1553    #[inline]
-1554    pub fn retry_canceled_requests(&mut self, val: bool) -> &mut Self {
-1555        self.client_config.retry_canceled_requests = val;
-1556        self
-1557    }
-1558
-1559    /// Set whether to automatically add the `Host` header to requests.
-1560    ///
-1561    /// If true, and a request does not include a `Host` header, one will be
-1562    /// added automatically, derived from the authority of the `Uri`.
-1563    ///
-1564    /// Default is `true`.
-1565    #[inline]
-1566    pub fn set_host(&mut self, val: bool) -> &mut Self {
-1567        self.client_config.set_host = val;
-1568        self
-1569    }
-1570
-1571    /// Build a client with this configuration and the default `HttpConnector`.
-1572    #[cfg(feature = "tokio")]
-1573    pub fn build_http<B>(&self) -> Client<HttpConnector, B>
-1574    where
-1575        B: Body + Send,
-1576        B::Data: Send,
-1577    {
-1578        let mut connector = HttpConnector::new();
-1579        if self.pool_config.is_enabled() {
-1580            connector.set_keepalive(self.pool_config.idle_timeout);
-1581        }
-1582        self.build(connector)
-1583    }
-1584
-1585    /// Combine the configuration of this builder with a connector to create a `Client`.
-1586    pub fn build<C, B>(&self, connector: C) -> Client<C, B>
-1587    where
-1588        C: Connect + Clone,
-1589        B: Body + Send,
-1590        B::Data: Send,
-1591    {
-1592        let exec = self.exec.clone();
-1593        let timer = self.pool_timer.clone();
-1594        Client {
-1595            config: self.client_config,
-1596            exec: exec.clone(),
-1597            #[cfg(feature = "http1")]
-1598            h1_builder: self.h1_builder.clone(),
-1599            #[cfg(feature = "http2")]
-1600            h2_builder: self.h2_builder.clone(),
-1601            connector,
-1602            pool: pool::Pool::new(self.pool_config, exec, timer),
-1603        }
-1604    }
-1605}
-1606
-1607impl fmt::Debug for Builder {
-1608    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-1609        f.debug_struct("Builder")
-1610            .field("client_config", &self.client_config)
-1611            .field("pool_config", &self.pool_config)
-1612            .finish()
-1613    }
-1614}
-1615
-1616// ==== impl Error ====
-1617
-1618impl fmt::Debug for Error {
-1619    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-1620        let mut f = f.debug_tuple("hyper_util::client::legacy::Error");
-1621        f.field(&self.kind);
-1622        if let Some(ref cause) = self.source {
-1623            f.field(cause);
-1624        }
-1625        f.finish()
-1626    }
-1627}
-1628
-1629impl fmt::Display for Error {
-1630    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-1631        write!(f, "client error ({:?})", self.kind)
-1632    }
-1633}
-1634
-1635impl StdError for Error {
-1636    fn source(&self) -> Option<&(dyn StdError + 'static)> {
-1637        self.source.as_ref().map(|e| &**e as _)
-1638    }
-1639}
-1640
-1641impl Error {
-1642    /// Returns true if this was an error from `Connect`.
-1643    pub fn is_connect(&self) -> bool {
-1644        matches!(self.kind, ErrorKind::Connect)
-1645    }
-1646
-1647    /// Returns the info of the client connection on which this error occurred.
-1648    #[cfg(any(feature = "http1", feature = "http2"))]
-1649    pub fn connect_info(&self) -> Option<&Connected> {
-1650        self.connect_info.as_ref()
-1651    }
-1652
-1653    #[cfg(any(feature = "http1", feature = "http2"))]
-1654    fn with_connect_info(self, connect_info: Connected) -> Self {
-1655        Self {
-1656            connect_info: Some(connect_info),
-1657            ..self
-1658        }
-1659    }
-1660    fn is_canceled(&self) -> bool {
-1661        matches!(self.kind, ErrorKind::Canceled)
-1662    }
-1663
-1664    fn tx(src: hyper::Error) -> Self {
-1665        e!(SendRequest, src)
-1666    }
-1667
-1668    fn closed(src: hyper::Error) -> Self {
-1669        e!(ChannelClosed, src)
-1670    }
-1671}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/client/legacy/connect/capture.rs.html b/core/target/doc/src/hyper_util/client/legacy/connect/capture.rs.html deleted file mode 100644 index a6e5953e..00000000 --- a/core/target/doc/src/hyper_util/client/legacy/connect/capture.rs.html +++ /dev/null @@ -1,188 +0,0 @@ -capture.rs - source

hyper_util/client/legacy/connect/
capture.rs

1use std::{ops::Deref, sync::Arc};
-2
-3use http::Request;
-4use tokio::sync::watch;
-5
-6use super::Connected;
-7
-8/// [`CaptureConnection`] allows callers to capture [`Connected`] information
-9///
-10/// To capture a connection for a request, use [`capture_connection`].
-11#[derive(Debug, Clone)]
-12pub struct CaptureConnection {
-13    rx: watch::Receiver<Option<Connected>>,
-14}
-15
-16/// Capture the connection for a given request
-17///
-18/// When making a request with Hyper, the underlying connection must implement the [`Connection`] trait.
-19/// [`capture_connection`] allows a caller to capture the returned [`Connected`] structure as soon
-20/// as the connection is established.
-21///
-22/// [`Connection`]: crate::client::legacy::connect::Connection
-23///
-24/// *Note*: If establishing a connection fails, [`CaptureConnection::connection_metadata`] will always return none.
-25///
-26/// # Examples
-27///
-28/// **Synchronous access**:
-29/// The [`CaptureConnection::connection_metadata`] method allows callers to check if a connection has been
-30/// established. This is ideal for situations where you are certain the connection has already
-31/// been established (e.g. after the response future has already completed).
-32/// ```rust
-33/// use hyper_util::client::legacy::connect::capture_connection;
-34/// let mut request = http::Request::builder()
-35///   .uri("http://foo.com")
-36///   .body(())
-37///   .unwrap();
-38///
-39/// let captured_connection = capture_connection(&mut request);
-40/// // some time later after the request has been sent...
-41/// let connection_info = captured_connection.connection_metadata();
-42/// println!("we are connected! {:?}", connection_info.as_ref());
-43/// ```
-44///
-45/// **Asynchronous access**:
-46/// The [`CaptureConnection::wait_for_connection_metadata`] method returns a future resolves as soon as the
-47/// connection is available.
-48///
-49/// ```rust
-50/// # #[cfg(feature  = "tokio")]
-51/// # async fn example() {
-52/// use hyper_util::client::legacy::connect::capture_connection;
-53/// use hyper_util::client::legacy::Client;
-54/// use hyper_util::rt::TokioExecutor;
-55/// use bytes::Bytes;
-56/// use http_body_util::Empty;
-57/// let mut request = http::Request::builder()
-58///   .uri("http://foo.com")
-59///   .body(Empty::<Bytes>::new())
-60///   .unwrap();
-61///
-62/// let mut captured = capture_connection(&mut request);
-63/// tokio::task::spawn(async move {
-64///     let connection_info = captured.wait_for_connection_metadata().await;
-65///     println!("we are connected! {:?}", connection_info.as_ref());
-66/// });
-67///
-68/// let client = Client::builder(TokioExecutor::new()).build_http();
-69/// client.request(request).await.expect("request failed");
-70/// # }
-71/// ```
-72pub fn capture_connection<B>(request: &mut Request<B>) -> CaptureConnection {
-73    let (tx, rx) = CaptureConnection::new();
-74    request.extensions_mut().insert(tx);
-75    rx
-76}
-77
-78/// TxSide for [`CaptureConnection`]
-79///
-80/// This is inserted into `Extensions` to allow Hyper to back channel connection info
-81#[derive(Clone)]
-82pub(crate) struct CaptureConnectionExtension {
-83    tx: Arc<watch::Sender<Option<Connected>>>,
-84}
-85
-86impl CaptureConnectionExtension {
-87    pub(crate) fn set(&self, connected: &Connected) {
-88        self.tx.send_replace(Some(connected.clone()));
-89    }
-90}
-91
-92impl CaptureConnection {
-93    /// Internal API to create the tx and rx half of [`CaptureConnection`]
-94    pub(crate) fn new() -> (CaptureConnectionExtension, Self) {
-95        let (tx, rx) = watch::channel(None);
-96        (
-97            CaptureConnectionExtension { tx: Arc::new(tx) },
-98            CaptureConnection { rx },
-99        )
-100    }
-101
-102    /// Retrieve the connection metadata, if available
-103    pub fn connection_metadata(&self) -> impl Deref<Target = Option<Connected>> + '_ {
-104        self.rx.borrow()
-105    }
-106
-107    /// Wait for the connection to be established
-108    ///
-109    /// If a connection was established, this will always return `Some(...)`. If the request never
-110    /// successfully connected (e.g. DNS resolution failure), this method will never return.
-111    pub async fn wait_for_connection_metadata(
-112        &mut self,
-113    ) -> impl Deref<Target = Option<Connected>> + '_ {
-114        if self.rx.borrow().is_some() {
-115            return self.rx.borrow();
-116        }
-117        let _ = self.rx.changed().await;
-118        self.rx.borrow()
-119    }
-120}
-121
-122#[cfg(test)]
-123mod test {
-124    use super::*;
-125
-126    #[test]
-127    fn test_sync_capture_connection() {
-128        let (tx, rx) = CaptureConnection::new();
-129        assert!(
-130            rx.connection_metadata().is_none(),
-131            "connection has not been set"
-132        );
-133        tx.set(&Connected::new().proxy(true));
-134        assert!(rx
-135            .connection_metadata()
-136            .as_ref()
-137            .expect("connected should be set")
-138            .is_proxied());
-139
-140        // ensure it can be called multiple times
-141        assert!(rx
-142            .connection_metadata()
-143            .as_ref()
-144            .expect("connected should be set")
-145            .is_proxied());
-146    }
-147
-148    #[tokio::test]
-149    async fn async_capture_connection() {
-150        let (tx, mut rx) = CaptureConnection::new();
-151        assert!(
-152            rx.connection_metadata().is_none(),
-153            "connection has not been set"
-154        );
-155        let test_task = tokio::spawn(async move {
-156            assert!(rx
-157                .wait_for_connection_metadata()
-158                .await
-159                .as_ref()
-160                .expect("connection should be set")
-161                .is_proxied());
-162            // can be awaited multiple times
-163            assert!(
-164                rx.wait_for_connection_metadata().await.is_some(),
-165                "should be awaitable multiple times"
-166            );
-167
-168            assert!(rx.connection_metadata().is_some());
-169        });
-170        // can't be finished, we haven't set the connection yet
-171        assert!(!test_task.is_finished());
-172        tx.set(&Connected::new().proxy(true));
-173
-174        assert!(test_task.await.is_ok());
-175    }
-176
-177    #[tokio::test]
-178    async fn capture_connection_sender_side_dropped() {
-179        let (tx, mut rx) = CaptureConnection::new();
-180        assert!(
-181            rx.connection_metadata().is_none(),
-182            "connection has not been set"
-183        );
-184        drop(tx);
-185        assert!(rx.wait_for_connection_metadata().await.is_none());
-186    }
-187}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/client/legacy/connect/dns.rs.html b/core/target/doc/src/hyper_util/client/legacy/connect/dns.rs.html deleted file mode 100644 index d22733d3..00000000 --- a/core/target/doc/src/hyper_util/client/legacy/connect/dns.rs.html +++ /dev/null @@ -1,361 +0,0 @@ -dns.rs - source

hyper_util/client/legacy/connect/
dns.rs

1//! DNS Resolution used by the `HttpConnector`.
-2//!
-3//! This module contains:
-4//!
-5//! - A [`GaiResolver`] that is the default resolver for the `HttpConnector`.
-6//! - The `Name` type used as an argument to custom resolvers.
-7//!
-8//! # Resolvers are `Service`s
-9//!
-10//! A resolver is just a
-11//! `Service<Name, Response = impl Iterator<Item = SocketAddr>>`.
-12//!
-13//! A simple resolver that ignores the name and always returns a specific
-14//! address:
-15//!
-16//! ```rust,ignore
-17//! use std::{convert::Infallible, iter, net::SocketAddr};
-18//!
-19//! let resolver = tower::service_fn(|_name| async {
-20//!     Ok::<_, Infallible>(iter::once(SocketAddr::from(([127, 0, 0, 1], 8080))))
-21//! });
-22//! ```
-23use std::error::Error;
-24use std::future::Future;
-25use std::net::{Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6, ToSocketAddrs};
-26use std::pin::Pin;
-27use std::str::FromStr;
-28use std::task::{self, Poll};
-29use std::{fmt, io, vec};
-30
-31use tokio::task::JoinHandle;
-32use tower_service::Service;
-33
-34pub(super) use self::sealed::Resolve;
-35
-36/// A domain name to resolve into IP addresses.
-37#[derive(Clone, Hash, Eq, PartialEq)]
-38pub struct Name {
-39    host: Box<str>,
-40}
-41
-42/// A resolver using blocking `getaddrinfo` calls in a threadpool.
-43#[derive(Clone)]
-44pub struct GaiResolver {
-45    _priv: (),
-46}
-47
-48/// An iterator of IP addresses returned from `getaddrinfo`.
-49pub struct GaiAddrs {
-50    inner: SocketAddrs,
-51}
-52
-53/// A future to resolve a name returned by `GaiResolver`.
-54pub struct GaiFuture {
-55    inner: JoinHandle<Result<SocketAddrs, io::Error>>,
-56}
-57
-58impl Name {
-59    pub(super) fn new(host: Box<str>) -> Name {
-60        Name { host }
-61    }
-62
-63    /// View the hostname as a string slice.
-64    pub fn as_str(&self) -> &str {
-65        &self.host
-66    }
-67}
-68
-69impl fmt::Debug for Name {
-70    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-71        fmt::Debug::fmt(&self.host, f)
-72    }
-73}
-74
-75impl fmt::Display for Name {
-76    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-77        fmt::Display::fmt(&self.host, f)
-78    }
-79}
-80
-81impl FromStr for Name {
-82    type Err = InvalidNameError;
-83
-84    fn from_str(host: &str) -> Result<Self, Self::Err> {
-85        // Possibly add validation later
-86        Ok(Name::new(host.into()))
-87    }
-88}
-89
-90/// Error indicating a given string was not a valid domain name.
-91#[derive(Debug)]
-92pub struct InvalidNameError(());
-93
-94impl fmt::Display for InvalidNameError {
-95    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-96        f.write_str("Not a valid domain name")
-97    }
-98}
-99
-100impl Error for InvalidNameError {}
-101
-102impl GaiResolver {
-103    /// Construct a new `GaiResolver`.
-104    pub fn new() -> Self {
-105        GaiResolver { _priv: () }
-106    }
-107}
-108
-109impl Service<Name> for GaiResolver {
-110    type Response = GaiAddrs;
-111    type Error = io::Error;
-112    type Future = GaiFuture;
-113
-114    fn poll_ready(&mut self, _cx: &mut task::Context<'_>) -> Poll<Result<(), io::Error>> {
-115        Poll::Ready(Ok(()))
-116    }
-117
-118    fn call(&mut self, name: Name) -> Self::Future {
-119        let blocking = tokio::task::spawn_blocking(move || {
-120            (&*name.host, 0)
-121                .to_socket_addrs()
-122                .map(|i| SocketAddrs { iter: i })
-123        });
-124
-125        GaiFuture { inner: blocking }
-126    }
-127}
-128
-129impl fmt::Debug for GaiResolver {
-130    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-131        f.pad("GaiResolver")
-132    }
-133}
-134
-135impl Future for GaiFuture {
-136    type Output = Result<GaiAddrs, io::Error>;
-137
-138    fn poll(mut self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Self::Output> {
-139        Pin::new(&mut self.inner).poll(cx).map(|res| match res {
-140            Ok(Ok(addrs)) => Ok(GaiAddrs { inner: addrs }),
-141            Ok(Err(err)) => Err(err),
-142            Err(join_err) => {
-143                if join_err.is_cancelled() {
-144                    Err(io::Error::new(io::ErrorKind::Interrupted, join_err))
-145                } else {
-146                    panic!("gai background task failed: {join_err:?}")
-147                }
-148            }
-149        })
-150    }
-151}
-152
-153impl fmt::Debug for GaiFuture {
-154    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-155        f.pad("GaiFuture")
-156    }
-157}
-158
-159impl Drop for GaiFuture {
-160    fn drop(&mut self) {
-161        self.inner.abort();
-162    }
-163}
-164
-165impl Iterator for GaiAddrs {
-166    type Item = SocketAddr;
-167
-168    fn next(&mut self) -> Option<Self::Item> {
-169        self.inner.next()
-170    }
-171}
-172
-173impl fmt::Debug for GaiAddrs {
-174    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-175        f.pad("GaiAddrs")
-176    }
-177}
-178
-179pub(super) struct SocketAddrs {
-180    iter: vec::IntoIter<SocketAddr>,
-181}
-182
-183impl SocketAddrs {
-184    pub(super) fn new(addrs: Vec<SocketAddr>) -> Self {
-185        SocketAddrs {
-186            iter: addrs.into_iter(),
-187        }
-188    }
-189
-190    pub(super) fn try_parse(host: &str, port: u16) -> Option<SocketAddrs> {
-191        if let Ok(addr) = host.parse::<Ipv4Addr>() {
-192            let addr = SocketAddrV4::new(addr, port);
-193            return Some(SocketAddrs {
-194                iter: vec![SocketAddr::V4(addr)].into_iter(),
-195            });
-196        }
-197        if let Ok(addr) = host.parse::<Ipv6Addr>() {
-198            let addr = SocketAddrV6::new(addr, port, 0, 0);
-199            return Some(SocketAddrs {
-200                iter: vec![SocketAddr::V6(addr)].into_iter(),
-201            });
-202        }
-203        None
-204    }
-205
-206    #[inline]
-207    fn filter(self, predicate: impl FnMut(&SocketAddr) -> bool) -> SocketAddrs {
-208        SocketAddrs::new(self.iter.filter(predicate).collect())
-209    }
-210
-211    pub(super) fn split_by_preference(
-212        self,
-213        local_addr_ipv4: Option<Ipv4Addr>,
-214        local_addr_ipv6: Option<Ipv6Addr>,
-215    ) -> (SocketAddrs, SocketAddrs) {
-216        match (local_addr_ipv4, local_addr_ipv6) {
-217            (Some(_), None) => (self.filter(SocketAddr::is_ipv4), SocketAddrs::new(vec![])),
-218            (None, Some(_)) => (self.filter(SocketAddr::is_ipv6), SocketAddrs::new(vec![])),
-219            _ => {
-220                let preferring_v6 = self
-221                    .iter
-222                    .as_slice()
-223                    .first()
-224                    .map(SocketAddr::is_ipv6)
-225                    .unwrap_or(false);
-226
-227                let (preferred, fallback) = self
-228                    .iter
-229                    .partition::<Vec<_>, _>(|addr| addr.is_ipv6() == preferring_v6);
-230
-231                (SocketAddrs::new(preferred), SocketAddrs::new(fallback))
-232            }
-233        }
-234    }
-235
-236    pub(super) fn is_empty(&self) -> bool {
-237        self.iter.as_slice().is_empty()
-238    }
-239
-240    pub(super) fn len(&self) -> usize {
-241        self.iter.as_slice().len()
-242    }
-243}
-244
-245impl Iterator for SocketAddrs {
-246    type Item = SocketAddr;
-247    #[inline]
-248    fn next(&mut self) -> Option<SocketAddr> {
-249        self.iter.next()
-250    }
-251}
-252
-253mod sealed {
-254    use std::future::Future;
-255    use std::task::{self, Poll};
-256
-257    use super::{Name, SocketAddr};
-258    use tower_service::Service;
-259
-260    // "Trait alias" for `Service<Name, Response = Addrs>`
-261    pub trait Resolve {
-262        type Addrs: Iterator<Item = SocketAddr>;
-263        type Error: Into<Box<dyn std::error::Error + Send + Sync>>;
-264        type Future: Future<Output = Result<Self::Addrs, Self::Error>>;
-265
-266        fn poll_ready(&mut self, cx: &mut task::Context<'_>) -> Poll<Result<(), Self::Error>>;
-267        fn resolve(&mut self, name: Name) -> Self::Future;
-268    }
-269
-270    impl<S> Resolve for S
-271    where
-272        S: Service<Name>,
-273        S::Response: Iterator<Item = SocketAddr>,
-274        S::Error: Into<Box<dyn std::error::Error + Send + Sync>>,
-275    {
-276        type Addrs = S::Response;
-277        type Error = S::Error;
-278        type Future = S::Future;
-279
-280        fn poll_ready(&mut self, cx: &mut task::Context<'_>) -> Poll<Result<(), Self::Error>> {
-281            Service::poll_ready(self, cx)
-282        }
-283
-284        fn resolve(&mut self, name: Name) -> Self::Future {
-285            Service::call(self, name)
-286        }
-287    }
-288}
-289
-290pub(super) async fn resolve<R>(resolver: &mut R, name: Name) -> Result<R::Addrs, R::Error>
-291where
-292    R: Resolve,
-293{
-294    crate::common::future::poll_fn(|cx| resolver.poll_ready(cx)).await?;
-295    resolver.resolve(name).await
-296}
-297
-298#[cfg(test)]
-299mod tests {
-300    use super::*;
-301    use std::net::{Ipv4Addr, Ipv6Addr};
-302
-303    #[test]
-304    fn test_ip_addrs_split_by_preference() {
-305        let ip_v4 = Ipv4Addr::new(127, 0, 0, 1);
-306        let ip_v6 = Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1);
-307        let v4_addr = (ip_v4, 80).into();
-308        let v6_addr = (ip_v6, 80).into();
-309
-310        let (mut preferred, mut fallback) = SocketAddrs {
-311            iter: vec![v4_addr, v6_addr].into_iter(),
-312        }
-313        .split_by_preference(None, None);
-314        assert!(preferred.next().unwrap().is_ipv4());
-315        assert!(fallback.next().unwrap().is_ipv6());
-316
-317        let (mut preferred, mut fallback) = SocketAddrs {
-318            iter: vec![v6_addr, v4_addr].into_iter(),
-319        }
-320        .split_by_preference(None, None);
-321        assert!(preferred.next().unwrap().is_ipv6());
-322        assert!(fallback.next().unwrap().is_ipv4());
-323
-324        let (mut preferred, mut fallback) = SocketAddrs {
-325            iter: vec![v4_addr, v6_addr].into_iter(),
-326        }
-327        .split_by_preference(Some(ip_v4), Some(ip_v6));
-328        assert!(preferred.next().unwrap().is_ipv4());
-329        assert!(fallback.next().unwrap().is_ipv6());
-330
-331        let (mut preferred, mut fallback) = SocketAddrs {
-332            iter: vec![v6_addr, v4_addr].into_iter(),
-333        }
-334        .split_by_preference(Some(ip_v4), Some(ip_v6));
-335        assert!(preferred.next().unwrap().is_ipv6());
-336        assert!(fallback.next().unwrap().is_ipv4());
-337
-338        let (mut preferred, fallback) = SocketAddrs {
-339            iter: vec![v4_addr, v6_addr].into_iter(),
-340        }
-341        .split_by_preference(Some(ip_v4), None);
-342        assert!(preferred.next().unwrap().is_ipv4());
-343        assert!(fallback.is_empty());
-344
-345        let (mut preferred, fallback) = SocketAddrs {
-346            iter: vec![v4_addr, v6_addr].into_iter(),
-347        }
-348        .split_by_preference(None, Some(ip_v6));
-349        assert!(preferred.next().unwrap().is_ipv6());
-350        assert!(fallback.is_empty());
-351    }
-352
-353    #[test]
-354    fn test_name_from_str() {
-355        const DOMAIN: &str = "test.example.com";
-356        let name = Name::from_str(DOMAIN).expect("Should be a valid domain");
-357        assert_eq!(name.as_str(), DOMAIN);
-358        assert_eq!(name.to_string(), DOMAIN);
-359    }
-360}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/client/legacy/connect/http.rs.html b/core/target/doc/src/hyper_util/client/legacy/connect/http.rs.html deleted file mode 100644 index f232b3a7..00000000 --- a/core/target/doc/src/hyper_util/client/legacy/connect/http.rs.html +++ /dev/null @@ -1,1451 +0,0 @@ -http.rs - source

hyper_util/client/legacy/connect/
http.rs

1use std::error::Error as StdError;
-2use std::fmt;
-3use std::future::Future;
-4use std::io;
-5use std::marker::PhantomData;
-6use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr};
-7use std::pin::Pin;
-8use std::sync::Arc;
-9use std::task::{self, Poll};
-10use std::time::Duration;
-11
-12use futures_core::ready;
-13use futures_util::future::Either;
-14use http::uri::{Scheme, Uri};
-15use pin_project_lite::pin_project;
-16use socket2::TcpKeepalive;
-17use tokio::net::{TcpSocket, TcpStream};
-18use tokio::time::Sleep;
-19use tracing::{debug, trace, warn};
-20
-21use super::dns::{self, resolve, GaiResolver, Resolve};
-22use super::{Connected, Connection};
-23use crate::rt::TokioIo;
-24
-25/// A connector for the `http` scheme.
-26///
-27/// Performs DNS resolution in a thread pool, and then connects over TCP.
-28///
-29/// # Note
-30///
-31/// Sets the [`HttpInfo`](HttpInfo) value on responses, which includes
-32/// transport information such as the remote socket address used.
-33#[derive(Clone)]
-34pub struct HttpConnector<R = GaiResolver> {
-35    config: Arc<Config>,
-36    resolver: R,
-37}
-38
-39/// Extra information about the transport when an HttpConnector is used.
-40///
-41/// # Example
-42///
-43/// ```
-44/// # fn doc(res: http::Response<()>) {
-45/// use hyper_util::client::legacy::connect::HttpInfo;
-46///
-47/// // res = http::Response
-48/// res
-49///     .extensions()
-50///     .get::<HttpInfo>()
-51///     .map(|info| {
-52///         println!("remote addr = {}", info.remote_addr());
-53///     });
-54/// # }
-55/// ```
-56///
-57/// # Note
-58///
-59/// If a different connector is used besides [`HttpConnector`](HttpConnector),
-60/// this value will not exist in the extensions. Consult that specific
-61/// connector to see what "extra" information it might provide to responses.
-62#[derive(Clone, Debug)]
-63pub struct HttpInfo {
-64    remote_addr: SocketAddr,
-65    local_addr: SocketAddr,
-66}
-67
-68#[derive(Clone)]
-69struct Config {
-70    connect_timeout: Option<Duration>,
-71    enforce_http: bool,
-72    happy_eyeballs_timeout: Option<Duration>,
-73    tcp_keepalive_config: TcpKeepaliveConfig,
-74    local_address_ipv4: Option<Ipv4Addr>,
-75    local_address_ipv6: Option<Ipv6Addr>,
-76    nodelay: bool,
-77    reuse_address: bool,
-78    send_buffer_size: Option<usize>,
-79    recv_buffer_size: Option<usize>,
-80    #[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
-81    interface: Option<String>,
-82    #[cfg(any(
-83        target_os = "illumos",
-84        target_os = "ios",
-85        target_os = "macos",
-86        target_os = "solaris",
-87        target_os = "tvos",
-88        target_os = "visionos",
-89        target_os = "watchos",
-90    ))]
-91    interface: Option<std::ffi::CString>,
-92    #[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
-93    tcp_user_timeout: Option<Duration>,
-94}
-95
-96#[derive(Default, Debug, Clone, Copy)]
-97struct TcpKeepaliveConfig {
-98    time: Option<Duration>,
-99    interval: Option<Duration>,
-100    retries: Option<u32>,
-101}
-102
-103impl TcpKeepaliveConfig {
-104    /// Converts into a `socket2::TcpKeealive` if there is any keep alive configuration.
-105    fn into_tcpkeepalive(self) -> Option<TcpKeepalive> {
-106        let mut dirty = false;
-107        let mut ka = TcpKeepalive::new();
-108        if let Some(time) = self.time {
-109            ka = ka.with_time(time);
-110            dirty = true
-111        }
-112        if let Some(interval) = self.interval {
-113            ka = Self::ka_with_interval(ka, interval, &mut dirty)
-114        };
-115        if let Some(retries) = self.retries {
-116            ka = Self::ka_with_retries(ka, retries, &mut dirty)
-117        };
-118        if dirty {
-119            Some(ka)
-120        } else {
-121            None
-122        }
-123    }
-124
-125    #[cfg(
-126        // See https://docs.rs/socket2/0.5.8/src/socket2/lib.rs.html#511-525
-127        any(
-128            target_os = "android",
-129            target_os = "dragonfly",
-130            target_os = "freebsd",
-131            target_os = "fuchsia",
-132            target_os = "illumos",
-133            target_os = "ios",
-134            target_os = "visionos",
-135            target_os = "linux",
-136            target_os = "macos",
-137            target_os = "netbsd",
-138            target_os = "tvos",
-139            target_os = "watchos",
-140            target_os = "windows",
-141        )
-142    )]
-143    fn ka_with_interval(ka: TcpKeepalive, interval: Duration, dirty: &mut bool) -> TcpKeepalive {
-144        *dirty = true;
-145        ka.with_interval(interval)
-146    }
-147
-148    #[cfg(not(
-149         // See https://docs.rs/socket2/0.5.8/src/socket2/lib.rs.html#511-525
-150        any(
-151            target_os = "android",
-152            target_os = "dragonfly",
-153            target_os = "freebsd",
-154            target_os = "fuchsia",
-155            target_os = "illumos",
-156            target_os = "ios",
-157            target_os = "visionos",
-158            target_os = "linux",
-159            target_os = "macos",
-160            target_os = "netbsd",
-161            target_os = "tvos",
-162            target_os = "watchos",
-163            target_os = "windows",
-164        )
-165    ))]
-166    fn ka_with_interval(ka: TcpKeepalive, _: Duration, _: &mut bool) -> TcpKeepalive {
-167        ka // no-op as keepalive interval is not supported on this platform
-168    }
-169
-170    #[cfg(
-171        // See https://docs.rs/socket2/0.5.8/src/socket2/lib.rs.html#557-570
-172        any(
-173            target_os = "android",
-174            target_os = "dragonfly",
-175            target_os = "freebsd",
-176            target_os = "fuchsia",
-177            target_os = "illumos",
-178            target_os = "ios",
-179            target_os = "visionos",
-180            target_os = "linux",
-181            target_os = "macos",
-182            target_os = "netbsd",
-183            target_os = "tvos",
-184            target_os = "watchos",
-185        )
-186    )]
-187    fn ka_with_retries(ka: TcpKeepalive, retries: u32, dirty: &mut bool) -> TcpKeepalive {
-188        *dirty = true;
-189        ka.with_retries(retries)
-190    }
-191
-192    #[cfg(not(
-193        // See https://docs.rs/socket2/0.5.8/src/socket2/lib.rs.html#557-570
-194        any(
-195            target_os = "android",
-196            target_os = "dragonfly",
-197            target_os = "freebsd",
-198            target_os = "fuchsia",
-199            target_os = "illumos",
-200            target_os = "ios",
-201            target_os = "visionos",
-202            target_os = "linux",
-203            target_os = "macos",
-204            target_os = "netbsd",
-205            target_os = "tvos",
-206            target_os = "watchos",
-207        )
-208    ))]
-209    fn ka_with_retries(ka: TcpKeepalive, _: u32, _: &mut bool) -> TcpKeepalive {
-210        ka // no-op as keepalive retries is not supported on this platform
-211    }
-212}
-213
-214// ===== impl HttpConnector =====
-215
-216impl HttpConnector {
-217    /// Construct a new HttpConnector.
-218    pub fn new() -> HttpConnector {
-219        HttpConnector::new_with_resolver(GaiResolver::new())
-220    }
-221}
-222
-223impl<R> HttpConnector<R> {
-224    /// Construct a new HttpConnector.
-225    ///
-226    /// Takes a [`Resolver`](crate::client::legacy::connect::dns#resolvers-are-services) to handle DNS lookups.
-227    pub fn new_with_resolver(resolver: R) -> HttpConnector<R> {
-228        HttpConnector {
-229            config: Arc::new(Config {
-230                connect_timeout: None,
-231                enforce_http: true,
-232                happy_eyeballs_timeout: Some(Duration::from_millis(300)),
-233                tcp_keepalive_config: TcpKeepaliveConfig::default(),
-234                local_address_ipv4: None,
-235                local_address_ipv6: None,
-236                nodelay: false,
-237                reuse_address: false,
-238                send_buffer_size: None,
-239                recv_buffer_size: None,
-240                #[cfg(any(
-241                    target_os = "android",
-242                    target_os = "fuchsia",
-243                    target_os = "illumos",
-244                    target_os = "ios",
-245                    target_os = "linux",
-246                    target_os = "macos",
-247                    target_os = "solaris",
-248                    target_os = "tvos",
-249                    target_os = "visionos",
-250                    target_os = "watchos",
-251                ))]
-252                interface: None,
-253                #[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
-254                tcp_user_timeout: None,
-255            }),
-256            resolver,
-257        }
-258    }
-259
-260    /// Option to enforce all `Uri`s have the `http` scheme.
-261    ///
-262    /// Enabled by default.
-263    #[inline]
-264    pub fn enforce_http(&mut self, is_enforced: bool) {
-265        self.config_mut().enforce_http = is_enforced;
-266    }
-267
-268    /// Set that all sockets have `SO_KEEPALIVE` set with the supplied duration
-269    /// to remain idle before sending TCP keepalive probes.
-270    ///
-271    /// If `None`, keepalive is disabled.
-272    ///
-273    /// Default is `None`.
-274    #[inline]
-275    pub fn set_keepalive(&mut self, time: Option<Duration>) {
-276        self.config_mut().tcp_keepalive_config.time = time;
-277    }
-278
-279    /// Set the duration between two successive TCP keepalive retransmissions,
-280    /// if acknowledgement to the previous keepalive transmission is not received.
-281    #[inline]
-282    pub fn set_keepalive_interval(&mut self, interval: Option<Duration>) {
-283        self.config_mut().tcp_keepalive_config.interval = interval;
-284    }
-285
-286    /// Set the number of retransmissions to be carried out before declaring that remote end is not available.
-287    #[inline]
-288    pub fn set_keepalive_retries(&mut self, retries: Option<u32>) {
-289        self.config_mut().tcp_keepalive_config.retries = retries;
-290    }
-291
-292    /// Set that all sockets have `SO_NODELAY` set to the supplied value `nodelay`.
-293    ///
-294    /// Default is `false`.
-295    #[inline]
-296    pub fn set_nodelay(&mut self, nodelay: bool) {
-297        self.config_mut().nodelay = nodelay;
-298    }
-299
-300    /// Sets the value of the SO_SNDBUF option on the socket.
-301    #[inline]
-302    pub fn set_send_buffer_size(&mut self, size: Option<usize>) {
-303        self.config_mut().send_buffer_size = size;
-304    }
-305
-306    /// Sets the value of the SO_RCVBUF option on the socket.
-307    #[inline]
-308    pub fn set_recv_buffer_size(&mut self, size: Option<usize>) {
-309        self.config_mut().recv_buffer_size = size;
-310    }
-311
-312    /// Set that all sockets are bound to the configured address before connection.
-313    ///
-314    /// If `None`, the sockets will not be bound.
-315    ///
-316    /// Default is `None`.
-317    #[inline]
-318    pub fn set_local_address(&mut self, addr: Option<IpAddr>) {
-319        let (v4, v6) = match addr {
-320            Some(IpAddr::V4(a)) => (Some(a), None),
-321            Some(IpAddr::V6(a)) => (None, Some(a)),
-322            _ => (None, None),
-323        };
-324
-325        let cfg = self.config_mut();
-326
-327        cfg.local_address_ipv4 = v4;
-328        cfg.local_address_ipv6 = v6;
-329    }
-330
-331    /// Set that all sockets are bound to the configured IPv4 or IPv6 address (depending on host's
-332    /// preferences) before connection.
-333    #[inline]
-334    pub fn set_local_addresses(&mut self, addr_ipv4: Ipv4Addr, addr_ipv6: Ipv6Addr) {
-335        let cfg = self.config_mut();
-336
-337        cfg.local_address_ipv4 = Some(addr_ipv4);
-338        cfg.local_address_ipv6 = Some(addr_ipv6);
-339    }
-340
-341    /// Set the connect timeout.
-342    ///
-343    /// If a domain resolves to multiple IP addresses, the timeout will be
-344    /// evenly divided across them.
-345    ///
-346    /// Default is `None`.
-347    #[inline]
-348    pub fn set_connect_timeout(&mut self, dur: Option<Duration>) {
-349        self.config_mut().connect_timeout = dur;
-350    }
-351
-352    /// Set timeout for [RFC 6555 (Happy Eyeballs)][RFC 6555] algorithm.
-353    ///
-354    /// If hostname resolves to both IPv4 and IPv6 addresses and connection
-355    /// cannot be established using preferred address family before timeout
-356    /// elapses, then connector will in parallel attempt connection using other
-357    /// address family.
-358    ///
-359    /// If `None`, parallel connection attempts are disabled.
-360    ///
-361    /// Default is 300 milliseconds.
-362    ///
-363    /// [RFC 6555]: https://tools.ietf.org/html/rfc6555
-364    #[inline]
-365    pub fn set_happy_eyeballs_timeout(&mut self, dur: Option<Duration>) {
-366        self.config_mut().happy_eyeballs_timeout = dur;
-367    }
-368
-369    /// Set that all socket have `SO_REUSEADDR` set to the supplied value `reuse_address`.
-370    ///
-371    /// Default is `false`.
-372    #[inline]
-373    pub fn set_reuse_address(&mut self, reuse_address: bool) -> &mut Self {
-374        self.config_mut().reuse_address = reuse_address;
-375        self
-376    }
-377
-378    /// Sets the name of the interface to bind sockets produced by this
-379    /// connector.
-380    ///
-381    /// On Linux, this sets the `SO_BINDTODEVICE` option on this socket (see
-382    /// [`man 7 socket`] for details). On macOS (and macOS-derived systems like
-383    /// iOS), illumos, and Solaris, this will instead use the `IP_BOUND_IF`
-384    /// socket option (see [`man 7p ip`]).
-385    ///
-386    /// If a socket is bound to an interface, only packets received from that particular
-387    /// interface are processed by the socket. Note that this only works for some socket
-388    /// types, particularly `AF_INET`` sockets.
-389    ///
-390    /// On Linux it can be used to specify a [VRF], but the binary needs
-391    /// to either have `CAP_NET_RAW` or to be run as root.
-392    ///
-393    /// This function is only available on the following operating systems:
-394    /// - Linux, including Android
-395    /// - Fuchsia
-396    /// - illumos and Solaris
-397    /// - macOS, iOS, visionOS, watchOS, and tvOS
-398    ///
-399    /// [VRF]: https://www.kernel.org/doc/Documentation/networking/vrf.txt
-400    /// [`man 7 socket`] https://man7.org/linux/man-pages/man7/socket.7.html
-401    /// [`man 7p ip`]: https://docs.oracle.com/cd/E86824_01/html/E54777/ip-7p.html
-402    #[cfg(any(
-403        target_os = "android",
-404        target_os = "fuchsia",
-405        target_os = "illumos",
-406        target_os = "ios",
-407        target_os = "linux",
-408        target_os = "macos",
-409        target_os = "solaris",
-410        target_os = "tvos",
-411        target_os = "visionos",
-412        target_os = "watchos",
-413    ))]
-414    #[inline]
-415    pub fn set_interface<S: Into<String>>(&mut self, interface: S) -> &mut Self {
-416        let interface = interface.into();
-417        #[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
-418        {
-419            self.config_mut().interface = Some(interface);
-420        }
-421        #[cfg(not(any(target_os = "android", target_os = "fuchsia", target_os = "linux")))]
-422        {
-423            let interface = std::ffi::CString::new(interface)
-424                .expect("interface name should not have nulls in it");
-425            self.config_mut().interface = Some(interface);
-426        }
-427        self
-428    }
-429
-430    /// Sets the value of the TCP_USER_TIMEOUT option on the socket.
-431    #[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
-432    #[inline]
-433    pub fn set_tcp_user_timeout(&mut self, time: Option<Duration>) {
-434        self.config_mut().tcp_user_timeout = time;
-435    }
-436
-437    // private
-438
-439    fn config_mut(&mut self) -> &mut Config {
-440        // If the are HttpConnector clones, this will clone the inner
-441        // config. So mutating the config won't ever affect previous
-442        // clones.
-443        Arc::make_mut(&mut self.config)
-444    }
-445}
-446
-447static INVALID_NOT_HTTP: &str = "invalid URL, scheme is not http";
-448static INVALID_MISSING_SCHEME: &str = "invalid URL, scheme is missing";
-449static INVALID_MISSING_HOST: &str = "invalid URL, host is missing";
-450
-451// R: Debug required for now to allow adding it to debug output later...
-452impl<R: fmt::Debug> fmt::Debug for HttpConnector<R> {
-453    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-454        f.debug_struct("HttpConnector").finish()
-455    }
-456}
-457
-458impl<R> tower_service::Service<Uri> for HttpConnector<R>
-459where
-460    R: Resolve + Clone + Send + Sync + 'static,
-461    R::Future: Send,
-462{
-463    type Response = TokioIo<TcpStream>;
-464    type Error = ConnectError;
-465    type Future = HttpConnecting<R>;
-466
-467    fn poll_ready(&mut self, cx: &mut task::Context<'_>) -> Poll<Result<(), Self::Error>> {
-468        ready!(self.resolver.poll_ready(cx)).map_err(ConnectError::dns)?;
-469        Poll::Ready(Ok(()))
-470    }
-471
-472    fn call(&mut self, dst: Uri) -> Self::Future {
-473        let mut self_ = self.clone();
-474        HttpConnecting {
-475            fut: Box::pin(async move { self_.call_async(dst).await }),
-476            _marker: PhantomData,
-477        }
-478    }
-479}
-480
-481fn get_host_port<'u>(config: &Config, dst: &'u Uri) -> Result<(&'u str, u16), ConnectError> {
-482    trace!(
-483        "Http::connect; scheme={:?}, host={:?}, port={:?}",
-484        dst.scheme(),
-485        dst.host(),
-486        dst.port(),
-487    );
-488
-489    if config.enforce_http {
-490        if dst.scheme() != Some(&Scheme::HTTP) {
-491            return Err(ConnectError {
-492                msg: INVALID_NOT_HTTP,
-493                addr: None,
-494                cause: None,
-495            });
-496        }
-497    } else if dst.scheme().is_none() {
-498        return Err(ConnectError {
-499            msg: INVALID_MISSING_SCHEME,
-500            addr: None,
-501            cause: None,
-502        });
-503    }
-504
-505    let host = match dst.host() {
-506        Some(s) => s,
-507        None => {
-508            return Err(ConnectError {
-509                msg: INVALID_MISSING_HOST,
-510                addr: None,
-511                cause: None,
-512            });
-513        }
-514    };
-515    let port = match dst.port() {
-516        Some(port) => port.as_u16(),
-517        None => {
-518            if dst.scheme() == Some(&Scheme::HTTPS) {
-519                443
-520            } else {
-521                80
-522            }
-523        }
-524    };
-525
-526    Ok((host, port))
-527}
-528
-529impl<R> HttpConnector<R>
-530where
-531    R: Resolve,
-532{
-533    async fn call_async(&mut self, dst: Uri) -> Result<TokioIo<TcpStream>, ConnectError> {
-534        let config = &self.config;
-535
-536        let (host, port) = get_host_port(config, &dst)?;
-537        let host = host.trim_start_matches('[').trim_end_matches(']');
-538
-539        // If the host is already an IP addr (v4 or v6),
-540        // skip resolving the dns and start connecting right away.
-541        let addrs = if let Some(addrs) = dns::SocketAddrs::try_parse(host, port) {
-542            addrs
-543        } else {
-544            let addrs = resolve(&mut self.resolver, dns::Name::new(host.into()))
-545                .await
-546                .map_err(ConnectError::dns)?;
-547            let addrs = addrs
-548                .map(|mut addr| {
-549                    set_port(&mut addr, port, dst.port().is_some());
-550
-551                    addr
-552                })
-553                .collect();
-554            dns::SocketAddrs::new(addrs)
-555        };
-556
-557        let c = ConnectingTcp::new(addrs, config);
-558
-559        let sock = c.connect().await?;
-560
-561        if let Err(e) = sock.set_nodelay(config.nodelay) {
-562            warn!("tcp set_nodelay error: {}", e);
-563        }
-564
-565        Ok(TokioIo::new(sock))
-566    }
-567}
-568
-569impl Connection for TcpStream {
-570    fn connected(&self) -> Connected {
-571        let connected = Connected::new();
-572        if let (Ok(remote_addr), Ok(local_addr)) = (self.peer_addr(), self.local_addr()) {
-573            connected.extra(HttpInfo {
-574                remote_addr,
-575                local_addr,
-576            })
-577        } else {
-578            connected
-579        }
-580    }
-581}
-582
-583#[cfg(unix)]
-584impl Connection for tokio::net::UnixStream {
-585    fn connected(&self) -> Connected {
-586        Connected::new()
-587    }
-588}
-589
-590#[cfg(windows)]
-591impl Connection for tokio::net::windows::named_pipe::NamedPipeClient {
-592    fn connected(&self) -> Connected {
-593        Connected::new()
-594    }
-595}
-596
-597// Implement `Connection` for generic `TokioIo<T>` so that external crates can
-598// implement their own `HttpConnector` with `TokioIo<CustomTcpStream>`.
-599impl<T> Connection for TokioIo<T>
-600where
-601    T: Connection,
-602{
-603    fn connected(&self) -> Connected {
-604        self.inner().connected()
-605    }
-606}
-607
-608impl HttpInfo {
-609    /// Get the remote address of the transport used.
-610    pub fn remote_addr(&self) -> SocketAddr {
-611        self.remote_addr
-612    }
-613
-614    /// Get the local address of the transport used.
-615    pub fn local_addr(&self) -> SocketAddr {
-616        self.local_addr
-617    }
-618}
-619
-620pin_project! {
-621    // Not publicly exported (so missing_docs doesn't trigger).
-622    //
-623    // We return this `Future` instead of the `Pin<Box<dyn Future>>` directly
-624    // so that users don't rely on it fitting in a `Pin<Box<dyn Future>>` slot
-625    // (and thus we can change the type in the future).
-626    #[must_use = "futures do nothing unless polled"]
-627    #[allow(missing_debug_implementations)]
-628    pub struct HttpConnecting<R> {
-629        #[pin]
-630        fut: BoxConnecting,
-631        _marker: PhantomData<R>,
-632    }
-633}
-634
-635type ConnectResult = Result<TokioIo<TcpStream>, ConnectError>;
-636type BoxConnecting = Pin<Box<dyn Future<Output = ConnectResult> + Send>>;
-637
-638impl<R: Resolve> Future for HttpConnecting<R> {
-639    type Output = ConnectResult;
-640
-641    fn poll(self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Self::Output> {
-642        self.project().fut.poll(cx)
-643    }
-644}
-645
-646// Not publicly exported (so missing_docs doesn't trigger).
-647pub struct ConnectError {
-648    msg: &'static str,
-649    addr: Option<SocketAddr>,
-650    cause: Option<Box<dyn StdError + Send + Sync>>,
-651}
-652
-653impl ConnectError {
-654    fn new<E>(msg: &'static str, cause: E) -> ConnectError
-655    where
-656        E: Into<Box<dyn StdError + Send + Sync>>,
-657    {
-658        ConnectError {
-659            msg,
-660            addr: None,
-661            cause: Some(cause.into()),
-662        }
-663    }
-664
-665    fn dns<E>(cause: E) -> ConnectError
-666    where
-667        E: Into<Box<dyn StdError + Send + Sync>>,
-668    {
-669        ConnectError::new("dns error", cause)
-670    }
-671
-672    fn m<E>(msg: &'static str) -> impl FnOnce(E) -> ConnectError
-673    where
-674        E: Into<Box<dyn StdError + Send + Sync>>,
-675    {
-676        move |cause| ConnectError::new(msg, cause)
-677    }
-678}
-679
-680impl fmt::Debug for ConnectError {
-681    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-682        let mut b = f.debug_tuple("ConnectError");
-683        b.field(&self.msg);
-684        if let Some(ref addr) = self.addr {
-685            b.field(addr);
-686        }
-687        if let Some(ref cause) = self.cause {
-688            b.field(cause);
-689        }
-690        b.finish()
-691    }
-692}
-693
-694impl fmt::Display for ConnectError {
-695    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-696        f.write_str(self.msg)
-697    }
-698}
-699
-700impl StdError for ConnectError {
-701    fn source(&self) -> Option<&(dyn StdError + 'static)> {
-702        self.cause.as_ref().map(|e| &**e as _)
-703    }
-704}
-705
-706struct ConnectingTcp<'a> {
-707    preferred: ConnectingTcpRemote,
-708    fallback: Option<ConnectingTcpFallback>,
-709    config: &'a Config,
-710}
-711
-712impl<'a> ConnectingTcp<'a> {
-713    fn new(remote_addrs: dns::SocketAddrs, config: &'a Config) -> Self {
-714        if let Some(fallback_timeout) = config.happy_eyeballs_timeout {
-715            let (preferred_addrs, fallback_addrs) = remote_addrs
-716                .split_by_preference(config.local_address_ipv4, config.local_address_ipv6);
-717            if fallback_addrs.is_empty() {
-718                return ConnectingTcp {
-719                    preferred: ConnectingTcpRemote::new(preferred_addrs, config.connect_timeout),
-720                    fallback: None,
-721                    config,
-722                };
-723            }
-724
-725            ConnectingTcp {
-726                preferred: ConnectingTcpRemote::new(preferred_addrs, config.connect_timeout),
-727                fallback: Some(ConnectingTcpFallback {
-728                    delay: tokio::time::sleep(fallback_timeout),
-729                    remote: ConnectingTcpRemote::new(fallback_addrs, config.connect_timeout),
-730                }),
-731                config,
-732            }
-733        } else {
-734            ConnectingTcp {
-735                preferred: ConnectingTcpRemote::new(remote_addrs, config.connect_timeout),
-736                fallback: None,
-737                config,
-738            }
-739        }
-740    }
-741}
-742
-743struct ConnectingTcpFallback {
-744    delay: Sleep,
-745    remote: ConnectingTcpRemote,
-746}
-747
-748struct ConnectingTcpRemote {
-749    addrs: dns::SocketAddrs,
-750    connect_timeout: Option<Duration>,
-751}
-752
-753impl ConnectingTcpRemote {
-754    fn new(addrs: dns::SocketAddrs, connect_timeout: Option<Duration>) -> Self {
-755        let connect_timeout = connect_timeout.and_then(|t| t.checked_div(addrs.len() as u32));
-756
-757        Self {
-758            addrs,
-759            connect_timeout,
-760        }
-761    }
-762}
-763
-764impl ConnectingTcpRemote {
-765    async fn connect(&mut self, config: &Config) -> Result<TcpStream, ConnectError> {
-766        let mut err = None;
-767        for addr in &mut self.addrs {
-768            debug!("connecting to {}", addr);
-769            match connect(&addr, config, self.connect_timeout)?.await {
-770                Ok(tcp) => {
-771                    debug!("connected to {}", addr);
-772                    return Ok(tcp);
-773                }
-774                Err(mut e) => {
-775                    trace!("connect error for {}: {:?}", addr, e);
-776                    e.addr = Some(addr);
-777                    // only return the first error, we assume it's the most relevant
-778                    if err.is_none() {
-779                        err = Some(e);
-780                    }
-781                }
-782            }
-783        }
-784
-785        match err {
-786            Some(e) => Err(e),
-787            None => Err(ConnectError::new(
-788                "tcp connect error",
-789                std::io::Error::new(std::io::ErrorKind::NotConnected, "Network unreachable"),
-790            )),
-791        }
-792    }
-793}
-794
-795fn bind_local_address(
-796    socket: &socket2::Socket,
-797    dst_addr: &SocketAddr,
-798    local_addr_ipv4: &Option<Ipv4Addr>,
-799    local_addr_ipv6: &Option<Ipv6Addr>,
-800) -> io::Result<()> {
-801    match (*dst_addr, local_addr_ipv4, local_addr_ipv6) {
-802        (SocketAddr::V4(_), Some(addr), _) => {
-803            socket.bind(&SocketAddr::new((*addr).into(), 0).into())?;
-804        }
-805        (SocketAddr::V6(_), _, Some(addr)) => {
-806            socket.bind(&SocketAddr::new((*addr).into(), 0).into())?;
-807        }
-808        _ => {
-809            if cfg!(windows) {
-810                // Windows requires a socket be bound before calling connect
-811                let any: SocketAddr = match *dst_addr {
-812                    SocketAddr::V4(_) => ([0, 0, 0, 0], 0).into(),
-813                    SocketAddr::V6(_) => ([0, 0, 0, 0, 0, 0, 0, 0], 0).into(),
-814                };
-815                socket.bind(&any.into())?;
-816            }
-817        }
-818    }
-819
-820    Ok(())
-821}
-822
-823fn connect(
-824    addr: &SocketAddr,
-825    config: &Config,
-826    connect_timeout: Option<Duration>,
-827) -> Result<impl Future<Output = Result<TcpStream, ConnectError>>, ConnectError> {
-828    // TODO(eliza): if Tokio's `TcpSocket` gains support for setting the
-829    // keepalive timeout, it would be nice to use that instead of socket2,
-830    // and avoid the unsafe `into_raw_fd`/`from_raw_fd` dance...
-831    use socket2::{Domain, Protocol, Socket, Type};
-832
-833    let domain = Domain::for_address(*addr);
-834    let socket = Socket::new(domain, Type::STREAM, Some(Protocol::TCP))
-835        .map_err(ConnectError::m("tcp open error"))?;
-836
-837    // When constructing a Tokio `TcpSocket` from a raw fd/socket, the user is
-838    // responsible for ensuring O_NONBLOCK is set.
-839    socket
-840        .set_nonblocking(true)
-841        .map_err(ConnectError::m("tcp set_nonblocking error"))?;
-842
-843    if let Some(tcp_keepalive) = &config.tcp_keepalive_config.into_tcpkeepalive() {
-844        if let Err(e) = socket.set_tcp_keepalive(tcp_keepalive) {
-845            warn!("tcp set_keepalive error: {}", e);
-846        }
-847    }
-848
-849    // That this only works for some socket types, particularly AF_INET sockets.
-850    #[cfg(any(
-851        target_os = "android",
-852        target_os = "fuchsia",
-853        target_os = "illumos",
-854        target_os = "ios",
-855        target_os = "linux",
-856        target_os = "macos",
-857        target_os = "solaris",
-858        target_os = "tvos",
-859        target_os = "visionos",
-860        target_os = "watchos",
-861    ))]
-862    if let Some(interface) = &config.interface {
-863        // On Linux-like systems, set the interface to bind using
-864        // `SO_BINDTODEVICE`.
-865        #[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
-866        socket
-867            .bind_device(Some(interface.as_bytes()))
-868            .map_err(ConnectError::m("tcp bind interface error"))?;
-869
-870        // On macOS-like and Solaris-like systems, we instead use `IP_BOUND_IF`.
-871        // This socket option desires an integer index for the interface, so we
-872        // must first determine the index of the requested interface name using
-873        // `if_nametoindex`.
-874        #[cfg(any(
-875            target_os = "illumos",
-876            target_os = "ios",
-877            target_os = "macos",
-878            target_os = "solaris",
-879            target_os = "tvos",
-880            target_os = "visionos",
-881            target_os = "watchos",
-882        ))]
-883        {
-884            let idx = unsafe { libc::if_nametoindex(interface.as_ptr()) };
-885            let idx = std::num::NonZeroU32::new(idx).ok_or_else(|| {
-886                // If the index is 0, check errno and return an I/O error.
-887                ConnectError::new(
-888                    "error converting interface name to index",
-889                    io::Error::last_os_error(),
-890                )
-891            })?;
-892            // Different setsockopt calls are necessary depending on whether the
-893            // address is IPv4 or IPv6.
-894            match addr {
-895                SocketAddr::V4(_) => socket.bind_device_by_index_v4(Some(idx)),
-896                SocketAddr::V6(_) => socket.bind_device_by_index_v6(Some(idx)),
-897            }
-898            .map_err(ConnectError::m("tcp bind interface error"))?;
-899        }
-900    }
-901
-902    #[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
-903    if let Some(tcp_user_timeout) = &config.tcp_user_timeout {
-904        if let Err(e) = socket.set_tcp_user_timeout(Some(*tcp_user_timeout)) {
-905            warn!("tcp set_tcp_user_timeout error: {}", e);
-906        }
-907    }
-908
-909    bind_local_address(
-910        &socket,
-911        addr,
-912        &config.local_address_ipv4,
-913        &config.local_address_ipv6,
-914    )
-915    .map_err(ConnectError::m("tcp bind local error"))?;
-916
-917    // Convert the `Socket` to a Tokio `TcpSocket`.
-918    let socket = TcpSocket::from_std_stream(socket.into());
-919
-920    if config.reuse_address {
-921        if let Err(e) = socket.set_reuseaddr(true) {
-922            warn!("tcp set_reuse_address error: {}", e);
-923        }
-924    }
-925
-926    if let Some(size) = config.send_buffer_size {
-927        if let Err(e) = socket.set_send_buffer_size(size.try_into().unwrap_or(u32::MAX)) {
-928            warn!("tcp set_buffer_size error: {}", e);
-929        }
-930    }
-931
-932    if let Some(size) = config.recv_buffer_size {
-933        if let Err(e) = socket.set_recv_buffer_size(size.try_into().unwrap_or(u32::MAX)) {
-934            warn!("tcp set_recv_buffer_size error: {}", e);
-935        }
-936    }
-937
-938    let connect = socket.connect(*addr);
-939    Ok(async move {
-940        match connect_timeout {
-941            Some(dur) => match tokio::time::timeout(dur, connect).await {
-942                Ok(Ok(s)) => Ok(s),
-943                Ok(Err(e)) => Err(e),
-944                Err(e) => Err(io::Error::new(io::ErrorKind::TimedOut, e)),
-945            },
-946            None => connect.await,
-947        }
-948        .map_err(ConnectError::m("tcp connect error"))
-949    })
-950}
-951
-952impl ConnectingTcp<'_> {
-953    async fn connect(mut self) -> Result<TcpStream, ConnectError> {
-954        match self.fallback {
-955            None => self.preferred.connect(self.config).await,
-956            Some(mut fallback) => {
-957                let preferred_fut = self.preferred.connect(self.config);
-958                futures_util::pin_mut!(preferred_fut);
-959
-960                let fallback_fut = fallback.remote.connect(self.config);
-961                futures_util::pin_mut!(fallback_fut);
-962
-963                let fallback_delay = fallback.delay;
-964                futures_util::pin_mut!(fallback_delay);
-965
-966                let (result, future) =
-967                    match futures_util::future::select(preferred_fut, fallback_delay).await {
-968                        Either::Left((result, _fallback_delay)) => {
-969                            (result, Either::Right(fallback_fut))
-970                        }
-971                        Either::Right(((), preferred_fut)) => {
-972                            // Delay is done, start polling both the preferred and the fallback
-973                            futures_util::future::select(preferred_fut, fallback_fut)
-974                                .await
-975                                .factor_first()
-976                        }
-977                    };
-978
-979                if result.is_err() {
-980                    // Fallback to the remaining future (could be preferred or fallback)
-981                    // if we get an error
-982                    future.await
-983                } else {
-984                    result
-985                }
-986            }
-987        }
-988    }
-989}
-990
-991/// Respect explicit ports in the URI, if none, either
-992/// keep non `0` ports resolved from a custom dns resolver,
-993/// or use the default port for the scheme.
-994fn set_port(addr: &mut SocketAddr, host_port: u16, explicit: bool) {
-995    if explicit || addr.port() == 0 {
-996        addr.set_port(host_port)
-997    };
-998}
-999
-1000#[cfg(test)]
-1001mod tests {
-1002    use std::io;
-1003    use std::net::SocketAddr;
-1004
-1005    use ::http::Uri;
-1006
-1007    use crate::client::legacy::connect::http::TcpKeepaliveConfig;
-1008
-1009    use super::super::sealed::{Connect, ConnectSvc};
-1010    use super::{Config, ConnectError, HttpConnector};
-1011
-1012    use super::set_port;
-1013
-1014    async fn connect<C>(
-1015        connector: C,
-1016        dst: Uri,
-1017    ) -> Result<<C::_Svc as ConnectSvc>::Connection, <C::_Svc as ConnectSvc>::Error>
-1018    where
-1019        C: Connect,
-1020    {
-1021        connector.connect(super::super::sealed::Internal, dst).await
-1022    }
-1023
-1024    #[tokio::test]
-1025    async fn test_errors_enforce_http() {
-1026        let dst = "https://example.domain/foo/bar?baz".parse().unwrap();
-1027        let connector = HttpConnector::new();
-1028
-1029        let err = connect(connector, dst).await.unwrap_err();
-1030        assert_eq!(&*err.msg, super::INVALID_NOT_HTTP);
-1031    }
-1032
-1033    #[cfg(any(target_os = "linux", target_os = "macos"))]
-1034    fn get_local_ips() -> (Option<std::net::Ipv4Addr>, Option<std::net::Ipv6Addr>) {
-1035        use std::net::{IpAddr, TcpListener};
-1036
-1037        let mut ip_v4 = None;
-1038        let mut ip_v6 = None;
-1039
-1040        let ips = pnet_datalink::interfaces()
-1041            .into_iter()
-1042            .flat_map(|i| i.ips.into_iter().map(|n| n.ip()));
-1043
-1044        for ip in ips {
-1045            match ip {
-1046                IpAddr::V4(ip) if TcpListener::bind((ip, 0)).is_ok() => ip_v4 = Some(ip),
-1047                IpAddr::V6(ip) if TcpListener::bind((ip, 0)).is_ok() => ip_v6 = Some(ip),
-1048                _ => (),
-1049            }
-1050
-1051            if ip_v4.is_some() && ip_v6.is_some() {
-1052                break;
-1053            }
-1054        }
-1055
-1056        (ip_v4, ip_v6)
-1057    }
-1058
-1059    #[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
-1060    fn default_interface() -> Option<String> {
-1061        pnet_datalink::interfaces()
-1062            .iter()
-1063            .find(|e| e.is_up() && !e.is_loopback() && !e.ips.is_empty())
-1064            .map(|e| e.name.clone())
-1065    }
-1066
-1067    #[tokio::test]
-1068    async fn test_errors_missing_scheme() {
-1069        let dst = "example.domain".parse().unwrap();
-1070        let mut connector = HttpConnector::new();
-1071        connector.enforce_http(false);
-1072
-1073        let err = connect(connector, dst).await.unwrap_err();
-1074        assert_eq!(&*err.msg, super::INVALID_MISSING_SCHEME);
-1075    }
-1076
-1077    // NOTE: pnet crate that we use in this test doesn't compile on Windows
-1078    #[cfg(any(target_os = "linux", target_os = "macos"))]
-1079    #[cfg_attr(miri, ignore)]
-1080    #[tokio::test]
-1081    async fn local_address() {
-1082        use std::net::{IpAddr, TcpListener};
-1083
-1084        let (bind_ip_v4, bind_ip_v6) = get_local_ips();
-1085        let server4 = TcpListener::bind("127.0.0.1:0").unwrap();
-1086        let port = server4.local_addr().unwrap().port();
-1087        let server6 = TcpListener::bind(format!("[::1]:{port}")).unwrap();
-1088
-1089        let assert_client_ip = |dst: String, server: TcpListener, expected_ip: IpAddr| async move {
-1090            let mut connector = HttpConnector::new();
-1091
-1092            match (bind_ip_v4, bind_ip_v6) {
-1093                (Some(v4), Some(v6)) => connector.set_local_addresses(v4, v6),
-1094                (Some(v4), None) => connector.set_local_address(Some(v4.into())),
-1095                (None, Some(v6)) => connector.set_local_address(Some(v6.into())),
-1096                _ => unreachable!(),
-1097            }
-1098
-1099            connect(connector, dst.parse().unwrap()).await.unwrap();
-1100
-1101            let (_, client_addr) = server.accept().unwrap();
-1102
-1103            assert_eq!(client_addr.ip(), expected_ip);
-1104        };
-1105
-1106        if let Some(ip) = bind_ip_v4 {
-1107            assert_client_ip(format!("http://127.0.0.1:{port}"), server4, ip.into()).await;
-1108        }
-1109
-1110        if let Some(ip) = bind_ip_v6 {
-1111            assert_client_ip(format!("http://[::1]:{port}"), server6, ip.into()).await;
-1112        }
-1113    }
-1114
-1115    // NOTE: pnet crate that we use in this test doesn't compile on Windows
-1116    #[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
-1117    #[tokio::test]
-1118    #[ignore = "setting `SO_BINDTODEVICE` requires the `CAP_NET_RAW` capability (works when running as root)"]
-1119    async fn interface() {
-1120        use socket2::{Domain, Protocol, Socket, Type};
-1121        use std::net::TcpListener;
-1122
-1123        let interface: Option<String> = default_interface();
-1124
-1125        let server4 = TcpListener::bind("127.0.0.1:0").unwrap();
-1126        let port = server4.local_addr().unwrap().port();
-1127
-1128        let server6 = TcpListener::bind(format!("[::1]:{port}")).unwrap();
-1129
-1130        let assert_interface_name =
-1131            |dst: String,
-1132             server: TcpListener,
-1133             bind_iface: Option<String>,
-1134             expected_interface: Option<String>| async move {
-1135                let mut connector = HttpConnector::new();
-1136                if let Some(iface) = bind_iface {
-1137                    connector.set_interface(iface);
-1138                }
-1139
-1140                connect(connector, dst.parse().unwrap()).await.unwrap();
-1141                let domain = Domain::for_address(server.local_addr().unwrap());
-1142                let socket = Socket::new(domain, Type::STREAM, Some(Protocol::TCP)).unwrap();
-1143
-1144                assert_eq!(
-1145                    socket.device().unwrap().as_deref(),
-1146                    expected_interface.as_deref().map(|val| val.as_bytes())
-1147                );
-1148            };
-1149
-1150        assert_interface_name(
-1151            format!("http://127.0.0.1:{port}"),
-1152            server4,
-1153            interface.clone(),
-1154            interface.clone(),
-1155        )
-1156        .await;
-1157        assert_interface_name(
-1158            format!("http://[::1]:{port}"),
-1159            server6,
-1160            interface.clone(),
-1161            interface.clone(),
-1162        )
-1163        .await;
-1164    }
-1165
-1166    #[test]
-1167    #[ignore] // TODO
-1168    #[cfg_attr(not(feature = "__internal_happy_eyeballs_tests"), ignore)]
-1169    fn client_happy_eyeballs() {
-1170        use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, TcpListener};
-1171        use std::time::{Duration, Instant};
-1172
-1173        use super::dns;
-1174        use super::ConnectingTcp;
-1175
-1176        let server4 = TcpListener::bind("127.0.0.1:0").unwrap();
-1177        let addr = server4.local_addr().unwrap();
-1178        let _server6 = TcpListener::bind(format!("[::1]:{}", addr.port())).unwrap();
-1179        let rt = tokio::runtime::Builder::new_current_thread()
-1180            .enable_all()
-1181            .build()
-1182            .unwrap();
-1183
-1184        let local_timeout = Duration::default();
-1185        let unreachable_v4_timeout = measure_connect(unreachable_ipv4_addr()).1;
-1186        let unreachable_v6_timeout = measure_connect(unreachable_ipv6_addr()).1;
-1187        let fallback_timeout = std::cmp::max(unreachable_v4_timeout, unreachable_v6_timeout)
-1188            + Duration::from_millis(250);
-1189
-1190        let scenarios = &[
-1191            // Fast primary, without fallback.
-1192            (&[local_ipv4_addr()][..], 4, local_timeout, false),
-1193            (&[local_ipv6_addr()][..], 6, local_timeout, false),
-1194            // Fast primary, with (unused) fallback.
-1195            (
-1196                &[local_ipv4_addr(), local_ipv6_addr()][..],
-1197                4,
-1198                local_timeout,
-1199                false,
-1200            ),
-1201            (
-1202                &[local_ipv6_addr(), local_ipv4_addr()][..],
-1203                6,
-1204                local_timeout,
-1205                false,
-1206            ),
-1207            // Unreachable + fast primary, without fallback.
-1208            (
-1209                &[unreachable_ipv4_addr(), local_ipv4_addr()][..],
-1210                4,
-1211                unreachable_v4_timeout,
-1212                false,
-1213            ),
-1214            (
-1215                &[unreachable_ipv6_addr(), local_ipv6_addr()][..],
-1216                6,
-1217                unreachable_v6_timeout,
-1218                false,
-1219            ),
-1220            // Unreachable + fast primary, with (unused) fallback.
-1221            (
-1222                &[
-1223                    unreachable_ipv4_addr(),
-1224                    local_ipv4_addr(),
-1225                    local_ipv6_addr(),
-1226                ][..],
-1227                4,
-1228                unreachable_v4_timeout,
-1229                false,
-1230            ),
-1231            (
-1232                &[
-1233                    unreachable_ipv6_addr(),
-1234                    local_ipv6_addr(),
-1235                    local_ipv4_addr(),
-1236                ][..],
-1237                6,
-1238                unreachable_v6_timeout,
-1239                true,
-1240            ),
-1241            // Slow primary, with (used) fallback.
-1242            (
-1243                &[slow_ipv4_addr(), local_ipv4_addr(), local_ipv6_addr()][..],
-1244                6,
-1245                fallback_timeout,
-1246                false,
-1247            ),
-1248            (
-1249                &[slow_ipv6_addr(), local_ipv6_addr(), local_ipv4_addr()][..],
-1250                4,
-1251                fallback_timeout,
-1252                true,
-1253            ),
-1254            // Slow primary, with (used) unreachable + fast fallback.
-1255            (
-1256                &[slow_ipv4_addr(), unreachable_ipv6_addr(), local_ipv6_addr()][..],
-1257                6,
-1258                fallback_timeout + unreachable_v6_timeout,
-1259                false,
-1260            ),
-1261            (
-1262                &[slow_ipv6_addr(), unreachable_ipv4_addr(), local_ipv4_addr()][..],
-1263                4,
-1264                fallback_timeout + unreachable_v4_timeout,
-1265                true,
-1266            ),
-1267        ];
-1268
-1269        // Scenarios for IPv6 -> IPv4 fallback require that host can access IPv6 network.
-1270        // Otherwise, connection to "slow" IPv6 address will error-out immediately.
-1271        let ipv6_accessible = measure_connect(slow_ipv6_addr()).0;
-1272
-1273        for &(hosts, family, timeout, needs_ipv6_access) in scenarios {
-1274            if needs_ipv6_access && !ipv6_accessible {
-1275                continue;
-1276            }
-1277
-1278            let (start, stream) = rt
-1279                .block_on(async move {
-1280                    let addrs = hosts
-1281                        .iter()
-1282                        .map(|host| (*host, addr.port()).into())
-1283                        .collect();
-1284                    let cfg = Config {
-1285                        local_address_ipv4: None,
-1286                        local_address_ipv6: None,
-1287                        connect_timeout: None,
-1288                        tcp_keepalive_config: TcpKeepaliveConfig::default(),
-1289                        happy_eyeballs_timeout: Some(fallback_timeout),
-1290                        nodelay: false,
-1291                        reuse_address: false,
-1292                        enforce_http: false,
-1293                        send_buffer_size: None,
-1294                        recv_buffer_size: None,
-1295                        #[cfg(any(
-1296                            target_os = "android",
-1297                            target_os = "fuchsia",
-1298                            target_os = "linux"
-1299                        ))]
-1300                        interface: None,
-1301                        #[cfg(any(
-1302                            target_os = "illumos",
-1303                            target_os = "ios",
-1304                            target_os = "macos",
-1305                            target_os = "solaris",
-1306                            target_os = "tvos",
-1307                            target_os = "visionos",
-1308                            target_os = "watchos",
-1309                        ))]
-1310                        interface: None,
-1311                        #[cfg(any(
-1312                            target_os = "android",
-1313                            target_os = "fuchsia",
-1314                            target_os = "linux"
-1315                        ))]
-1316                        tcp_user_timeout: None,
-1317                    };
-1318                    let connecting_tcp = ConnectingTcp::new(dns::SocketAddrs::new(addrs), &cfg);
-1319                    let start = Instant::now();
-1320                    Ok::<_, ConnectError>((start, ConnectingTcp::connect(connecting_tcp).await?))
-1321                })
-1322                .unwrap();
-1323            let res = if stream.peer_addr().unwrap().is_ipv4() {
-1324                4
-1325            } else {
-1326                6
-1327            };
-1328            let duration = start.elapsed();
-1329
-1330            // Allow actual duration to be +/- 150ms off.
-1331            let min_duration = if timeout >= Duration::from_millis(150) {
-1332                timeout - Duration::from_millis(150)
-1333            } else {
-1334                Duration::default()
-1335            };
-1336            let max_duration = timeout + Duration::from_millis(150);
-1337
-1338            assert_eq!(res, family);
-1339            assert!(duration >= min_duration);
-1340            assert!(duration <= max_duration);
-1341        }
-1342
-1343        fn local_ipv4_addr() -> IpAddr {
-1344            Ipv4Addr::new(127, 0, 0, 1).into()
-1345        }
-1346
-1347        fn local_ipv6_addr() -> IpAddr {
-1348            Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1).into()
-1349        }
-1350
-1351        fn unreachable_ipv4_addr() -> IpAddr {
-1352            Ipv4Addr::new(127, 0, 0, 2).into()
-1353        }
-1354
-1355        fn unreachable_ipv6_addr() -> IpAddr {
-1356            Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 2).into()
-1357        }
-1358
-1359        fn slow_ipv4_addr() -> IpAddr {
-1360            // RFC 6890 reserved IPv4 address.
-1361            Ipv4Addr::new(198, 18, 0, 25).into()
-1362        }
-1363
-1364        fn slow_ipv6_addr() -> IpAddr {
-1365            // RFC 6890 reserved IPv6 address.
-1366            Ipv6Addr::new(2001, 2, 0, 0, 0, 0, 0, 254).into()
-1367        }
-1368
-1369        fn measure_connect(addr: IpAddr) -> (bool, Duration) {
-1370            let start = Instant::now();
-1371            let result =
-1372                std::net::TcpStream::connect_timeout(&(addr, 80).into(), Duration::from_secs(1));
-1373
-1374            let reachable = result.is_ok() || result.unwrap_err().kind() == io::ErrorKind::TimedOut;
-1375            let duration = start.elapsed();
-1376            (reachable, duration)
-1377        }
-1378    }
-1379
-1380    use std::time::Duration;
-1381
-1382    #[test]
-1383    fn no_tcp_keepalive_config() {
-1384        assert!(TcpKeepaliveConfig::default().into_tcpkeepalive().is_none());
-1385    }
-1386
-1387    #[test]
-1388    fn tcp_keepalive_time_config() {
-1389        let kac = TcpKeepaliveConfig {
-1390            time: Some(Duration::from_secs(60)),
-1391            ..Default::default()
-1392        };
-1393        if let Some(tcp_keepalive) = kac.into_tcpkeepalive() {
-1394            assert!(format!("{tcp_keepalive:?}").contains("time: Some(60s)"));
-1395        } else {
-1396            panic!("test failed");
-1397        }
-1398    }
-1399
-1400    #[cfg(not(any(target_os = "openbsd", target_os = "redox", target_os = "solaris")))]
-1401    #[test]
-1402    fn tcp_keepalive_interval_config() {
-1403        let kac = TcpKeepaliveConfig {
-1404            interval: Some(Duration::from_secs(1)),
-1405            ..Default::default()
-1406        };
-1407        if let Some(tcp_keepalive) = kac.into_tcpkeepalive() {
-1408            assert!(format!("{tcp_keepalive:?}").contains("interval: Some(1s)"));
-1409        } else {
-1410            panic!("test failed");
-1411        }
-1412    }
-1413
-1414    #[cfg(not(any(
-1415        target_os = "openbsd",
-1416        target_os = "redox",
-1417        target_os = "solaris",
-1418        target_os = "windows"
-1419    )))]
-1420    #[test]
-1421    fn tcp_keepalive_retries_config() {
-1422        let kac = TcpKeepaliveConfig {
-1423            retries: Some(3),
-1424            ..Default::default()
-1425        };
-1426        if let Some(tcp_keepalive) = kac.into_tcpkeepalive() {
-1427            assert!(format!("{tcp_keepalive:?}").contains("retries: Some(3)"));
-1428        } else {
-1429            panic!("test failed");
-1430        }
-1431    }
-1432
-1433    #[test]
-1434    fn test_set_port() {
-1435        // Respect explicit ports no matter what the resolved port is.
-1436        let mut addr = SocketAddr::from(([0, 0, 0, 0], 6881));
-1437        set_port(&mut addr, 42, true);
-1438        assert_eq!(addr.port(), 42);
-1439
-1440        // Ignore default  host port, and use the socket port instead.
-1441        let mut addr = SocketAddr::from(([0, 0, 0, 0], 6881));
-1442        set_port(&mut addr, 443, false);
-1443        assert_eq!(addr.port(), 6881);
-1444
-1445        // Use the default port if the resolved port is `0`.
-1446        let mut addr = SocketAddr::from(([0, 0, 0, 0], 0));
-1447        set_port(&mut addr, 443, false);
-1448        assert_eq!(addr.port(), 443);
-1449    }
-1450}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/client/legacy/connect/mod.rs.html b/core/target/doc/src/hyper_util/client/legacy/connect/mod.rs.html deleted file mode 100644 index 691c28a7..00000000 --- a/core/target/doc/src/hyper_util/client/legacy/connect/mod.rs.html +++ /dev/null @@ -1,445 +0,0 @@ -mod.rs - source

hyper_util/client/legacy/connect/
mod.rs

1//! Connectors used by the `Client`.
-2//!
-3//! This module contains:
-4//!
-5//! - A default [`HttpConnector`][] that does DNS resolution and establishes
-6//!   connections over TCP.
-7//! - Types to build custom connectors.
-8//!
-9//! # Connectors
-10//!
-11//! A "connector" is a [`Service`][] that takes a [`Uri`][] destination, and
-12//! its `Response` is some type implementing [`Read`][], [`Write`][],
-13//! and [`Connection`][].
-14//!
-15//! ## Custom Connectors
-16//!
-17//! A simple connector that ignores the `Uri` destination and always returns
-18//! a TCP connection to the same address could be written like this:
-19//!
-20//! ```rust,ignore
-21//! let connector = tower::service_fn(|_dst| async {
-22//!     tokio::net::TcpStream::connect("127.0.0.1:1337")
-23//! })
-24//! ```
-25//!
-26//! Or, fully written out:
-27//!
-28//! ```
-29//! use std::{future::Future, net::SocketAddr, pin::Pin, task::{self, Poll}};
-30//! use http::Uri;
-31//! use tokio::net::TcpStream;
-32//! use tower_service::Service;
-33//!
-34//! #[derive(Clone)]
-35//! struct LocalConnector;
-36//!
-37//! impl Service<Uri> for LocalConnector {
-38//!     type Response = TcpStream;
-39//!     type Error = std::io::Error;
-40//!     // We can't "name" an `async` generated future.
-41//!     type Future = Pin<Box<
-42//!         dyn Future<Output = Result<Self::Response, Self::Error>> + Send
-43//!     >>;
-44//!
-45//!     fn poll_ready(&mut self, _: &mut task::Context<'_>) -> Poll<Result<(), Self::Error>> {
-46//!         // This connector is always ready, but others might not be.
-47//!         Poll::Ready(Ok(()))
-48//!     }
-49//!
-50//!     fn call(&mut self, _: Uri) -> Self::Future {
-51//!         Box::pin(TcpStream::connect(SocketAddr::from(([127, 0, 0, 1], 1337))))
-52//!     }
-53//! }
-54//! ```
-55//!
-56//! It's worth noting that for `TcpStream`s, the [`HttpConnector`][] is a
-57//! better starting place to extend from.
-58//!
-59//! [`HttpConnector`]: HttpConnector
-60//! [`Service`]: tower_service::Service
-61//! [`Uri`]: ::http::Uri
-62//! [`Read`]: hyper::rt::Read
-63//! [`Write`]: hyper::rt::Write
-64//! [`Connection`]: Connection
-65use std::{
-66    fmt::{self, Formatter},
-67    sync::{
-68        atomic::{AtomicBool, Ordering},
-69        Arc,
-70    },
-71};
-72
-73use ::http::Extensions;
-74
-75#[cfg(feature = "tokio")]
-76pub use self::http::{HttpConnector, HttpInfo};
-77
-78#[cfg(feature = "tokio")]
-79pub mod dns;
-80#[cfg(feature = "tokio")]
-81mod http;
-82
-83pub mod proxy;
-84
-85pub(crate) mod capture;
-86pub use capture::{capture_connection, CaptureConnection};
-87
-88pub use self::sealed::Connect;
-89
-90/// Describes a type returned by a connector.
-91pub trait Connection {
-92    /// Return metadata describing the connection.
-93    fn connected(&self) -> Connected;
-94}
-95
-96/// Extra information about the connected transport.
-97///
-98/// This can be used to inform recipients about things like if ALPN
-99/// was used, or if connected to an HTTP proxy.
-100#[derive(Debug)]
-101pub struct Connected {
-102    pub(super) alpn: Alpn,
-103    pub(super) is_proxied: bool,
-104    pub(super) extra: Option<Extra>,
-105    pub(super) poisoned: PoisonPill,
-106}
-107
-108#[derive(Clone)]
-109pub(crate) struct PoisonPill {
-110    poisoned: Arc<AtomicBool>,
-111}
-112
-113impl fmt::Debug for PoisonPill {
-114    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
-115        // print the address of the pill—this makes debugging issues much easier
-116        write!(
-117            f,
-118            "PoisonPill@{:p} {{ poisoned: {} }}",
-119            self.poisoned,
-120            self.poisoned.load(Ordering::Relaxed)
-121        )
-122    }
-123}
-124
-125impl PoisonPill {
-126    pub(crate) fn healthy() -> Self {
-127        Self {
-128            poisoned: Arc::new(AtomicBool::new(false)),
-129        }
-130    }
-131    pub(crate) fn poison(&self) {
-132        self.poisoned.store(true, Ordering::Relaxed)
-133    }
-134
-135    pub(crate) fn poisoned(&self) -> bool {
-136        self.poisoned.load(Ordering::Relaxed)
-137    }
-138}
-139
-140pub(super) struct Extra(Box<dyn ExtraInner>);
-141
-142#[derive(Clone, Copy, Debug, PartialEq)]
-143pub(super) enum Alpn {
-144    H2,
-145    None,
-146}
-147
-148impl Connected {
-149    /// Create new `Connected` type with empty metadata.
-150    pub fn new() -> Connected {
-151        Connected {
-152            alpn: Alpn::None,
-153            is_proxied: false,
-154            extra: None,
-155            poisoned: PoisonPill::healthy(),
-156        }
-157    }
-158
-159    /// Set whether the connected transport is to an HTTP proxy.
-160    ///
-161    /// This setting will affect if HTTP/1 requests written on the transport
-162    /// will have the request-target in absolute-form or origin-form:
-163    ///
-164    /// - When `proxy(false)`:
-165    ///
-166    /// ```http
-167    /// GET /guide HTTP/1.1
-168    /// ```
-169    ///
-170    /// - When `proxy(true)`:
-171    ///
-172    /// ```http
-173    /// GET http://hyper.rs/guide HTTP/1.1
-174    /// ```
-175    ///
-176    /// Default is `false`.
-177    pub fn proxy(mut self, is_proxied: bool) -> Connected {
-178        self.is_proxied = is_proxied;
-179        self
-180    }
-181
-182    /// Determines if the connected transport is to an HTTP proxy.
-183    pub fn is_proxied(&self) -> bool {
-184        self.is_proxied
-185    }
-186
-187    /// Set extra connection information to be set in the extensions of every `Response`.
-188    pub fn extra<T: Clone + Send + Sync + 'static>(mut self, extra: T) -> Connected {
-189        if let Some(prev) = self.extra {
-190            self.extra = Some(Extra(Box::new(ExtraChain(prev.0, extra))));
-191        } else {
-192            self.extra = Some(Extra(Box::new(ExtraEnvelope(extra))));
-193        }
-194        self
-195    }
-196
-197    /// Copies the extra connection information into an `Extensions` map.
-198    pub fn get_extras(&self, extensions: &mut Extensions) {
-199        if let Some(extra) = &self.extra {
-200            extra.set(extensions);
-201        }
-202    }
-203
-204    /// Set that the connected transport negotiated HTTP/2 as its next protocol.
-205    pub fn negotiated_h2(mut self) -> Connected {
-206        self.alpn = Alpn::H2;
-207        self
-208    }
-209
-210    /// Determines if the connected transport negotiated HTTP/2 as its next protocol.
-211    pub fn is_negotiated_h2(&self) -> bool {
-212        self.alpn == Alpn::H2
-213    }
-214
-215    /// Poison this connection
-216    ///
-217    /// A poisoned connection will not be reused for subsequent requests by the pool
-218    pub fn poison(&self) {
-219        self.poisoned.poison();
-220        tracing::debug!(
-221            poison_pill = ?self.poisoned, "connection was poisoned. this connection will not be reused for subsequent requests"
-222        );
-223    }
-224
-225    // Don't public expose that `Connected` is `Clone`, unsure if we want to
-226    // keep that contract...
-227    pub(super) fn clone(&self) -> Connected {
-228        Connected {
-229            alpn: self.alpn,
-230            is_proxied: self.is_proxied,
-231            extra: self.extra.clone(),
-232            poisoned: self.poisoned.clone(),
-233        }
-234    }
-235}
-236
-237// ===== impl Extra =====
-238
-239impl Extra {
-240    pub(super) fn set(&self, res: &mut Extensions) {
-241        self.0.set(res);
-242    }
-243}
-244
-245impl Clone for Extra {
-246    fn clone(&self) -> Extra {
-247        Extra(self.0.clone_box())
-248    }
-249}
-250
-251impl fmt::Debug for Extra {
-252    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-253        f.debug_struct("Extra").finish()
-254    }
-255}
-256
-257trait ExtraInner: Send + Sync {
-258    fn clone_box(&self) -> Box<dyn ExtraInner>;
-259    fn set(&self, res: &mut Extensions);
-260}
-261
-262// This indirection allows the `Connected` to have a type-erased "extra" value,
-263// while that type still knows its inner extra type. This allows the correct
-264// TypeId to be used when inserting into `res.extensions_mut()`.
-265#[derive(Clone)]
-266struct ExtraEnvelope<T>(T);
-267
-268impl<T> ExtraInner for ExtraEnvelope<T>
-269where
-270    T: Clone + Send + Sync + 'static,
-271{
-272    fn clone_box(&self) -> Box<dyn ExtraInner> {
-273        Box::new(self.clone())
-274    }
-275
-276    fn set(&self, res: &mut Extensions) {
-277        res.insert(self.0.clone());
-278    }
-279}
-280
-281struct ExtraChain<T>(Box<dyn ExtraInner>, T);
-282
-283impl<T: Clone> Clone for ExtraChain<T> {
-284    fn clone(&self) -> Self {
-285        ExtraChain(self.0.clone_box(), self.1.clone())
-286    }
-287}
-288
-289impl<T> ExtraInner for ExtraChain<T>
-290where
-291    T: Clone + Send + Sync + 'static,
-292{
-293    fn clone_box(&self) -> Box<dyn ExtraInner> {
-294        Box::new(self.clone())
-295    }
-296
-297    fn set(&self, res: &mut Extensions) {
-298        self.0.set(res);
-299        res.insert(self.1.clone());
-300    }
-301}
-302
-303pub(super) mod sealed {
-304    use std::error::Error as StdError;
-305    use std::future::Future;
-306
-307    use ::http::Uri;
-308    use hyper::rt::{Read, Write};
-309
-310    use super::Connection;
-311
-312    /// Connect to a destination, returning an IO transport.
-313    ///
-314    /// A connector receives a [`Uri`](::http::Uri) and returns a `Future` of the
-315    /// ready connection.
-316    ///
-317    /// # Trait Alias
-318    ///
-319    /// This is really just an *alias* for the `tower::Service` trait, with
-320    /// additional bounds set for convenience *inside* hyper. You don't actually
-321    /// implement this trait, but `tower::Service<Uri>` instead.
-322    // The `Sized` bound is to prevent creating `dyn Connect`, since they cannot
-323    // fit the `Connect` bounds because of the blanket impl for `Service`.
-324    pub trait Connect: Sealed + Sized {
-325        #[doc(hidden)]
-326        type _Svc: ConnectSvc;
-327        #[doc(hidden)]
-328        fn connect(self, internal_only: Internal, dst: Uri) -> <Self::_Svc as ConnectSvc>::Future;
-329    }
-330
-331    pub trait ConnectSvc {
-332        type Connection: Read + Write + Connection + Unpin + Send + 'static;
-333        type Error: Into<Box<dyn StdError + Send + Sync>>;
-334        type Future: Future<Output = Result<Self::Connection, Self::Error>> + Unpin + Send + 'static;
-335
-336        fn connect(self, internal_only: Internal, dst: Uri) -> Self::Future;
-337    }
-338
-339    impl<S, T> Connect for S
-340    where
-341        S: tower_service::Service<Uri, Response = T> + Send + 'static,
-342        S::Error: Into<Box<dyn StdError + Send + Sync>>,
-343        S::Future: Unpin + Send,
-344        T: Read + Write + Connection + Unpin + Send + 'static,
-345    {
-346        type _Svc = S;
-347
-348        fn connect(self, _: Internal, dst: Uri) -> crate::service::Oneshot<S, Uri> {
-349            crate::service::Oneshot::new(self, dst)
-350        }
-351    }
-352
-353    impl<S, T> ConnectSvc for S
-354    where
-355        S: tower_service::Service<Uri, Response = T> + Send + 'static,
-356        S::Error: Into<Box<dyn StdError + Send + Sync>>,
-357        S::Future: Unpin + Send,
-358        T: Read + Write + Connection + Unpin + Send + 'static,
-359    {
-360        type Connection = T;
-361        type Error = S::Error;
-362        type Future = crate::service::Oneshot<S, Uri>;
-363
-364        fn connect(self, _: Internal, dst: Uri) -> Self::Future {
-365            crate::service::Oneshot::new(self, dst)
-366        }
-367    }
-368
-369    impl<S, T> Sealed for S
-370    where
-371        S: tower_service::Service<Uri, Response = T> + Send,
-372        S::Error: Into<Box<dyn StdError + Send + Sync>>,
-373        S::Future: Unpin + Send,
-374        T: Read + Write + Connection + Unpin + Send + 'static,
-375    {
-376    }
-377
-378    pub trait Sealed {}
-379    #[allow(missing_debug_implementations)]
-380    pub struct Internal;
-381}
-382
-383#[cfg(test)]
-384mod tests {
-385    use super::Connected;
-386
-387    #[derive(Clone, Debug, PartialEq)]
-388    struct Ex1(usize);
-389
-390    #[derive(Clone, Debug, PartialEq)]
-391    struct Ex2(&'static str);
-392
-393    #[derive(Clone, Debug, PartialEq)]
-394    struct Ex3(&'static str);
-395
-396    #[test]
-397    fn test_connected_extra() {
-398        let c1 = Connected::new().extra(Ex1(41));
-399
-400        let mut ex = ::http::Extensions::new();
-401
-402        assert_eq!(ex.get::<Ex1>(), None);
-403
-404        c1.extra.as_ref().expect("c1 extra").set(&mut ex);
-405
-406        assert_eq!(ex.get::<Ex1>(), Some(&Ex1(41)));
-407    }
-408
-409    #[test]
-410    fn test_connected_extra_chain() {
-411        // If a user composes connectors and at each stage, there's "extra"
-412        // info to attach, it shouldn't override the previous extras.
-413
-414        let c1 = Connected::new()
-415            .extra(Ex1(45))
-416            .extra(Ex2("zoom"))
-417            .extra(Ex3("pew pew"));
-418
-419        let mut ex1 = ::http::Extensions::new();
-420
-421        assert_eq!(ex1.get::<Ex1>(), None);
-422        assert_eq!(ex1.get::<Ex2>(), None);
-423        assert_eq!(ex1.get::<Ex3>(), None);
-424
-425        c1.extra.as_ref().expect("c1 extra").set(&mut ex1);
-426
-427        assert_eq!(ex1.get::<Ex1>(), Some(&Ex1(45)));
-428        assert_eq!(ex1.get::<Ex2>(), Some(&Ex2("zoom")));
-429        assert_eq!(ex1.get::<Ex3>(), Some(&Ex3("pew pew")));
-430
-431        // Just like extensions, inserting the same type overrides previous type.
-432        let c2 = Connected::new()
-433            .extra(Ex1(33))
-434            .extra(Ex2("hiccup"))
-435            .extra(Ex1(99));
-436
-437        let mut ex2 = ::http::Extensions::new();
-438
-439        c2.extra.as_ref().expect("c2 extra").set(&mut ex2);
-440
-441        assert_eq!(ex2.get::<Ex1>(), Some(&Ex1(99)));
-442        assert_eq!(ex2.get::<Ex2>(), Some(&Ex2("hiccup")));
-443    }
-444}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/client/legacy/connect/proxy/mod.rs.html b/core/target/doc/src/hyper_util/client/legacy/connect/proxy/mod.rs.html deleted file mode 100644 index c9ff67a0..00000000 --- a/core/target/doc/src/hyper_util/client/legacy/connect/proxy/mod.rs.html +++ /dev/null @@ -1,7 +0,0 @@ -mod.rs - source

hyper_util/client/legacy/connect/proxy/
mod.rs

1//! Proxy helpers
-2mod socks;
-3mod tunnel;
-4
-5pub use self::socks::{SocksV4, SocksV5};
-6pub use self::tunnel::Tunnel;
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/client/legacy/connect/proxy/socks/mod.rs.html b/core/target/doc/src/hyper_util/client/legacy/connect/proxy/socks/mod.rs.html deleted file mode 100644 index 96af4048..00000000 --- a/core/target/doc/src/hyper_util/client/legacy/connect/proxy/socks/mod.rs.html +++ /dev/null @@ -1,155 +0,0 @@ -mod.rs - source

hyper_util/client/legacy/connect/proxy/socks/
mod.rs

1mod v5;
-2pub use v5::{SocksV5, SocksV5Error};
-3
-4mod v4;
-5pub use v4::{SocksV4, SocksV4Error};
-6
-7use pin_project_lite::pin_project;
-8use std::future::Future;
-9use std::pin::Pin;
-10use std::task::{Context, Poll};
-11
-12use bytes::BytesMut;
-13
-14use hyper::rt::Read;
-15
-16#[derive(Debug)]
-17pub enum SocksError<C> {
-18    Inner(C),
-19    Io(std::io::Error),
-20
-21    DnsFailure,
-22    MissingHost,
-23    MissingPort,
-24
-25    V4(SocksV4Error),
-26    V5(SocksV5Error),
-27
-28    Parsing(ParsingError),
-29    Serialize(SerializeError),
-30}
-31
-32#[derive(Debug)]
-33pub enum ParsingError {
-34    Incomplete,
-35    WouldOverflow,
-36    Other,
-37}
-38
-39#[derive(Debug)]
-40pub enum SerializeError {
-41    WouldOverflow,
-42}
-43
-44async fn read_message<T, M, C>(mut conn: &mut T, buf: &mut BytesMut) -> Result<M, SocksError<C>>
-45where
-46    T: Read + Unpin,
-47    M: for<'a> TryFrom<&'a mut BytesMut, Error = ParsingError>,
-48{
-49    let mut tmp = [0; 513];
-50
-51    loop {
-52        let n = crate::rt::read(&mut conn, &mut tmp).await?;
-53        buf.extend_from_slice(&tmp[..n]);
-54
-55        match M::try_from(buf) {
-56            Err(ParsingError::Incomplete) => {
-57                if n == 0 {
-58                    if buf.spare_capacity_mut().is_empty() {
-59                        return Err(SocksError::Parsing(ParsingError::WouldOverflow));
-60                    } else {
-61                        return Err(std::io::Error::new(
-62                            std::io::ErrorKind::UnexpectedEof,
-63                            "unexpected eof",
-64                        )
-65                        .into());
-66                    }
-67                }
-68            }
-69            Err(err) => return Err(err.into()),
-70            Ok(res) => return Ok(res),
-71        }
-72    }
-73}
-74
-75impl<C> std::fmt::Display for SocksError<C> {
-76    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-77        f.write_str("SOCKS error: ")?;
-78
-79        match self {
-80            Self::Inner(_) => f.write_str("failed to create underlying connection"),
-81            Self::Io(_) => f.write_str("io error during SOCKS handshake"),
-82
-83            Self::DnsFailure => f.write_str("could not resolve to acceptable address type"),
-84            Self::MissingHost => f.write_str("missing destination host"),
-85            Self::MissingPort => f.write_str("missing destination port"),
-86
-87            Self::Parsing(_) => f.write_str("failed parsing server response"),
-88            Self::Serialize(_) => f.write_str("failed serialize request"),
-89
-90            Self::V4(e) => e.fmt(f),
-91            Self::V5(e) => e.fmt(f),
-92        }
-93    }
-94}
-95
-96impl<C: std::fmt::Debug + std::fmt::Display> std::error::Error for SocksError<C> {}
-97
-98impl<C> From<std::io::Error> for SocksError<C> {
-99    fn from(err: std::io::Error) -> Self {
-100        Self::Io(err)
-101    }
-102}
-103
-104impl<C> From<ParsingError> for SocksError<C> {
-105    fn from(err: ParsingError) -> Self {
-106        Self::Parsing(err)
-107    }
-108}
-109
-110impl<C> From<SerializeError> for SocksError<C> {
-111    fn from(err: SerializeError) -> Self {
-112        Self::Serialize(err)
-113    }
-114}
-115
-116impl<C> From<SocksV4Error> for SocksError<C> {
-117    fn from(err: SocksV4Error) -> Self {
-118        Self::V4(err)
-119    }
-120}
-121
-122impl<C> From<SocksV5Error> for SocksError<C> {
-123    fn from(err: SocksV5Error) -> Self {
-124        Self::V5(err)
-125    }
-126}
-127
-128pin_project! {
-129    // Not publicly exported (so missing_docs doesn't trigger).
-130    //
-131    // We return this `Future` instead of the `Pin<Box<dyn Future>>` directly
-132    // so that users don't rely on it fitting in a `Pin<Box<dyn Future>>` slot
-133    // (and thus we can change the type in the future).
-134    #[must_use = "futures do nothing unless polled"]
-135    #[allow(missing_debug_implementations)]
-136    pub struct Handshaking<F, T, E> {
-137        #[pin]
-138        fut: BoxHandshaking<T, E>,
-139        _marker: std::marker::PhantomData<F>
-140    }
-141}
-142
-143type BoxHandshaking<T, E> = Pin<Box<dyn Future<Output = Result<T, SocksError<E>>> + Send>>;
-144
-145impl<F, T, E> Future for Handshaking<F, T, E>
-146where
-147    F: Future<Output = Result<T, E>>,
-148{
-149    type Output = Result<T, SocksError<E>>;
-150
-151    fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
-152        self.project().fut.poll(cx)
-153    }
-154}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/client/legacy/connect/proxy/socks/v4/errors.rs.html b/core/target/doc/src/hyper_util/client/legacy/connect/proxy/socks/v4/errors.rs.html deleted file mode 100644 index 5d40ac1a..00000000 --- a/core/target/doc/src/hyper_util/client/legacy/connect/proxy/socks/v4/errors.rs.html +++ /dev/null @@ -1,23 +0,0 @@ -errors.rs - source

hyper_util/client/legacy/connect/proxy/socks/v4/
errors.rs

1use super::Status;
-2
-3#[derive(Debug)]
-4pub enum SocksV4Error {
-5    IpV6,
-6    Command(Status),
-7}
-8
-9impl From<Status> for SocksV4Error {
-10    fn from(err: Status) -> Self {
-11        Self::Command(err)
-12    }
-13}
-14
-15impl std::fmt::Display for SocksV4Error {
-16    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-17        match self {
-18            Self::IpV6 => f.write_str("IPV6 is not supported"),
-19            Self::Command(status) => status.fmt(f),
-20        }
-21    }
-22}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/client/legacy/connect/proxy/socks/v4/messages.rs.html b/core/target/doc/src/hyper_util/client/legacy/connect/proxy/socks/v4/messages.rs.html deleted file mode 100644 index dbeef2f0..00000000 --- a/core/target/doc/src/hyper_util/client/legacy/connect/proxy/socks/v4/messages.rs.html +++ /dev/null @@ -1,132 +0,0 @@ -messages.rs - source

hyper_util/client/legacy/connect/proxy/socks/v4/
messages.rs

1use super::super::{ParsingError, SerializeError};
-2
-3use bytes::{Buf, BufMut, BytesMut};
-4use std::net::SocketAddrV4;
-5
-6/// +-----+-----+----+----+----+----+----+----+-------------+------+------------+------+
-7/// |  VN |  CD | DSTPORT |        DSTIP      |    USERID   | NULL |   DOMAIN   | NULL |
-8/// +-----+-----+----+----+----+----+----+----+-------------+------+------------+------+
-9/// |  1  |  1  |    2    |         4         |   Variable  |  1   |  Variable  |   1  |
-10/// +-----+-----+----+----+----+----+----+----+-------------+------+------------+------+
-11///                                                                ^^^^^^^^^^^^^^^^^^^^^
-12///                                                      optional: only do IP is 0.0.0.X
-13#[derive(Debug)]
-14pub struct Request<'a>(pub &'a Address);
-15
-16/// +-----+-----+----+----+----+----+----+----+
-17/// |  VN |  CD | DSTPORT |       DSTIP       |
-18/// +-----+-----+----+----+----+----+----+----+
-19/// |  1  |  1  |    2    |         4         |
-20/// +-----+-----+----+----+----+----+----+----+
-21///             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-22///              ignore: only for SOCKSv4 BIND
-23#[derive(Debug)]
-24pub struct Response(pub Status);
-25
-26#[derive(Debug)]
-27pub enum Address {
-28    Socket(SocketAddrV4),
-29    Domain(String, u16),
-30}
-31
-32#[derive(Debug, PartialEq)]
-33pub enum Status {
-34    Success = 90,
-35    Failed = 91,
-36    IdentFailure = 92,
-37    IdentMismatch = 93,
-38}
-39
-40impl Request<'_> {
-41    pub fn write_to_buf<B: BufMut>(&self, mut buf: B) -> Result<usize, SerializeError> {
-42        match self.0 {
-43            Address::Socket(socket) => {
-44                if buf.remaining_mut() < 10 {
-45                    return Err(SerializeError::WouldOverflow);
-46                }
-47
-48                buf.put_u8(0x04); // Version
-49                buf.put_u8(0x01); // CONNECT
-50
-51                buf.put_u16(socket.port()); // Port
-52                buf.put_slice(&socket.ip().octets()); // IP
-53
-54                buf.put_u8(0x00); // USERID
-55                buf.put_u8(0x00); // NULL
-56
-57                Ok(10)
-58            }
-59
-60            Address::Domain(domain, port) => {
-61                if buf.remaining_mut() < 10 + domain.len() + 1 {
-62                    return Err(SerializeError::WouldOverflow);
-63                }
-64
-65                buf.put_u8(0x04); // Version
-66                buf.put_u8(0x01); // CONNECT
-67
-68                buf.put_u16(*port); // IP
-69                buf.put_slice(&[0x00, 0x00, 0x00, 0xFF]); // Invalid IP
-70
-71                buf.put_u8(0x00); // USERID
-72                buf.put_u8(0x00); // NULL
-73
-74                buf.put_slice(domain.as_bytes()); // Domain
-75                buf.put_u8(0x00); // NULL
-76
-77                Ok(10 + domain.len() + 1)
-78            }
-79        }
-80    }
-81}
-82
-83impl TryFrom<&mut BytesMut> for Response {
-84    type Error = ParsingError;
-85
-86    fn try_from(buf: &mut BytesMut) -> Result<Self, Self::Error> {
-87        if buf.remaining() < 8 {
-88            return Err(ParsingError::Incomplete);
-89        }
-90
-91        if buf.get_u8() != 0x00 {
-92            return Err(ParsingError::Other);
-93        }
-94
-95        let status = buf.get_u8().try_into()?;
-96        let _addr = {
-97            let port = buf.get_u16();
-98            let mut ip = [0; 4];
-99            buf.copy_to_slice(&mut ip);
-100
-101            SocketAddrV4::new(ip.into(), port)
-102        };
-103
-104        Ok(Self(status))
-105    }
-106}
-107
-108impl TryFrom<u8> for Status {
-109    type Error = ParsingError;
-110
-111    fn try_from(byte: u8) -> Result<Self, Self::Error> {
-112        Ok(match byte {
-113            90 => Self::Success,
-114            91 => Self::Failed,
-115            92 => Self::IdentFailure,
-116            93 => Self::IdentMismatch,
-117            _ => return Err(ParsingError::Other),
-118        })
-119    }
-120}
-121
-122impl std::fmt::Display for Status {
-123    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-124        f.write_str(match self {
-125            Self::Success => "success",
-126            Self::Failed => "server failed to execute command",
-127            Self::IdentFailure => "server ident service failed",
-128            Self::IdentMismatch => "server ident service did not recognise client identifier",
-129        })
-130    }
-131}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/client/legacy/connect/proxy/socks/v4/mod.rs.html b/core/target/doc/src/hyper_util/client/legacy/connect/proxy/socks/v4/mod.rs.html deleted file mode 100644 index 8076f002..00000000 --- a/core/target/doc/src/hyper_util/client/legacy/connect/proxy/socks/v4/mod.rs.html +++ /dev/null @@ -1,145 +0,0 @@ -mod.rs - source

hyper_util/client/legacy/connect/proxy/socks/v4/
mod.rs

1mod errors;
-2pub use errors::*;
-3
-4mod messages;
-5use messages::*;
-6
-7use std::net::{IpAddr, SocketAddr, SocketAddrV4, ToSocketAddrs};
-8use std::task::{Context, Poll};
-9
-10use http::Uri;
-11use hyper::rt::{Read, Write};
-12use tower_service::Service;
-13
-14use bytes::BytesMut;
-15
-16use super::{Handshaking, SocksError};
-17
-18/// Tunnel Proxy via SOCKSv4
-19///
-20/// This is a connector that can be used by the `legacy::Client`. It wraps
-21/// another connector, and after getting an underlying connection, it establishes
-22/// a TCP tunnel over it using SOCKSv4.
-23#[derive(Debug, Clone)]
-24pub struct SocksV4<C> {
-25    inner: C,
-26    config: SocksConfig,
-27}
-28
-29#[derive(Debug, Clone)]
-30struct SocksConfig {
-31    proxy: Uri,
-32    local_dns: bool,
-33}
-34
-35impl<C> SocksV4<C> {
-36    /// Create a new SOCKSv4 handshake service
-37    ///
-38    /// Wraps an underlying connector and stores the address of a tunneling
-39    /// proxying server.
-40    ///
-41    /// A `SocksV4` can then be called with any destination. The `dst` passed to
-42    /// `call` will not be used to create the underlying connection, but will
-43    /// be used in a SOCKS handshake with the proxy destination.
-44    pub fn new(proxy_dst: Uri, connector: C) -> Self {
-45        Self {
-46            inner: connector,
-47            config: SocksConfig::new(proxy_dst),
-48        }
-49    }
-50
-51    /// Resolve domain names locally on the client, rather than on the proxy server.
-52    ///
-53    /// Disabled by default as local resolution of domain names can be detected as a
-54    /// DNS leak.
-55    pub fn local_dns(mut self, local_dns: bool) -> Self {
-56        self.config.local_dns = local_dns;
-57        self
-58    }
-59}
-60
-61impl SocksConfig {
-62    pub fn new(proxy: Uri) -> Self {
-63        Self {
-64            proxy,
-65            local_dns: false,
-66        }
-67    }
-68
-69    async fn execute<T, E>(self, mut conn: T, host: String, port: u16) -> Result<T, SocksError<E>>
-70    where
-71        T: Read + Write + Unpin,
-72    {
-73        let address = match host.parse::<IpAddr>() {
-74            Ok(IpAddr::V6(_)) => return Err(SocksV4Error::IpV6.into()),
-75            Ok(IpAddr::V4(ip)) => Address::Socket(SocketAddrV4::new(ip, port)),
-76            Err(_) => {
-77                if self.local_dns {
-78                    (host, port)
-79                        .to_socket_addrs()?
-80                        .find_map(|s| {
-81                            if let SocketAddr::V4(v4) = s {
-82                                Some(Address::Socket(v4))
-83                            } else {
-84                                None
-85                            }
-86                        })
-87                        .ok_or(SocksError::DnsFailure)?
-88                } else {
-89                    Address::Domain(host, port)
-90                }
-91            }
-92        };
-93
-94        let mut send_buf = BytesMut::with_capacity(1024);
-95        let mut recv_buf = BytesMut::with_capacity(1024);
-96
-97        // Send Request
-98        let req = Request(&address);
-99        let n = req.write_to_buf(&mut send_buf)?;
-100        crate::rt::write_all(&mut conn, &send_buf[..n]).await?;
-101
-102        // Read Response
-103        let res: Response = super::read_message(&mut conn, &mut recv_buf).await?;
-104        if res.0 == Status::Success {
-105            Ok(conn)
-106        } else {
-107            Err(SocksV4Error::Command(res.0).into())
-108        }
-109    }
-110}
-111
-112impl<C> Service<Uri> for SocksV4<C>
-113where
-114    C: Service<Uri>,
-115    C::Future: Send + 'static,
-116    C::Response: Read + Write + Unpin + Send + 'static,
-117    C::Error: Send + 'static,
-118{
-119    type Response = C::Response;
-120    type Error = SocksError<C::Error>;
-121    type Future = Handshaking<C::Future, C::Response, C::Error>;
-122
-123    fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
-124        self.inner.poll_ready(cx).map_err(SocksError::Inner)
-125    }
-126
-127    fn call(&mut self, dst: Uri) -> Self::Future {
-128        let config = self.config.clone();
-129        let connecting = self.inner.call(config.proxy.clone());
-130
-131        let fut = async move {
-132            let port = dst.port().map(|p| p.as_u16()).unwrap_or(443);
-133            let host = dst.host().ok_or(SocksError::MissingHost)?.to_string();
-134
-135            let conn = connecting.await.map_err(SocksError::Inner)?;
-136            config.execute(conn, host, port).await
-137        };
-138
-139        Handshaking {
-140            fut: Box::pin(fut),
-141            _marker: Default::default(),
-142        }
-143    }
-144}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/client/legacy/connect/proxy/socks/v5/errors.rs.html b/core/target/doc/src/hyper_util/client/legacy/connect/proxy/socks/v5/errors.rs.html deleted file mode 100644 index d8f6d586..00000000 --- a/core/target/doc/src/hyper_util/client/legacy/connect/proxy/socks/v5/errors.rs.html +++ /dev/null @@ -1,48 +0,0 @@ -errors.rs - source

hyper_util/client/legacy/connect/proxy/socks/v5/
errors.rs

1use super::Status;
-2
-3#[derive(Debug)]
-4pub enum SocksV5Error {
-5    HostTooLong,
-6    Auth(AuthError),
-7    Command(Status),
-8}
-9
-10#[derive(Debug)]
-11pub enum AuthError {
-12    Unsupported,
-13    MethodMismatch,
-14    Failed,
-15}
-16
-17impl From<Status> for SocksV5Error {
-18    fn from(err: Status) -> Self {
-19        Self::Command(err)
-20    }
-21}
-22
-23impl From<AuthError> for SocksV5Error {
-24    fn from(err: AuthError) -> Self {
-25        Self::Auth(err)
-26    }
-27}
-28
-29impl std::fmt::Display for SocksV5Error {
-30    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-31        match self {
-32            Self::HostTooLong => f.write_str("host address is more than 255 characters"),
-33            Self::Command(e) => e.fmt(f),
-34            Self::Auth(e) => e.fmt(f),
-35        }
-36    }
-37}
-38
-39impl std::fmt::Display for AuthError {
-40    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-41        f.write_str(match self {
-42            Self::Unsupported => "server does not support user/pass authentication",
-43            Self::MethodMismatch => "server implements authentication incorrectly",
-44            Self::Failed => "credentials not accepted",
-45        })
-46    }
-47}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/client/legacy/connect/proxy/socks/v5/messages.rs.html b/core/target/doc/src/hyper_util/client/legacy/connect/proxy/socks/v5/messages.rs.html deleted file mode 100644 index 40892c4d..00000000 --- a/core/target/doc/src/hyper_util/client/legacy/connect/proxy/socks/v5/messages.rs.html +++ /dev/null @@ -1,349 +0,0 @@ -messages.rs - source

hyper_util/client/legacy/connect/proxy/socks/v5/
messages.rs

1use super::super::{ParsingError, SerializeError};
-2
-3use bytes::{Buf, BufMut, BytesMut};
-4use std::net::SocketAddr;
-5
-6///  +----+----------+----------+
-7/// |VER | NMETHODS | METHODS  |
-8/// +----+----------+----------+
-9/// | 1  |    1     | 1 to 255 |
-10/// +----+----------+----------+
-11#[derive(Debug)]
-12pub struct NegotiationReq<'a>(pub &'a AuthMethod);
-13
-14/// +----+--------+
-15/// |VER | METHOD |
-16/// +----+--------+
-17/// | 1  |   1    |
-18/// +----+--------+
-19#[derive(Debug)]
-20pub struct NegotiationRes(pub AuthMethod);
-21
-22/// +----+------+----------+------+----------+
-23/// |VER | ULEN |  UNAME   | PLEN |  PASSWD  |
-24/// +----+------+----------+------+----------+
-25/// | 1  |  1   | 1 to 255 |  1   | 1 to 255 |
-26/// +----+------+----------+------+----------+
-27#[derive(Debug)]
-28pub struct AuthenticationReq<'a>(pub &'a str, pub &'a str);
-29
-30/// +----+--------+
-31/// |VER | STATUS |
-32/// +----+--------+
-33/// | 1  |   1    |
-34/// +----+--------+
-35#[derive(Debug)]
-36pub struct AuthenticationRes(pub bool);
-37
-38/// +----+-----+-------+------+----------+----------+
-39/// |VER | CMD |  RSV  | ATYP | DST.ADDR | DST.PORT |
-40/// +----+-----+-------+------+----------+----------+
-41/// | 1  |  1  | X'00' |  1   | Variable |    2     |
-42/// +----+-----+-------+------+----------+----------+
-43#[derive(Debug)]
-44pub struct ProxyReq<'a>(pub &'a Address);
-45
-46/// +----+-----+-------+------+----------+----------+
-47/// |VER | REP |  RSV  | ATYP | BND.ADDR | BND.PORT |
-48/// +----+-----+-------+------+----------+----------+
-49/// | 1  |  1  | X'00' |  1   | Variable |    2     |
-50/// +----+-----+-------+------+----------+----------+
-51#[derive(Debug)]
-52pub struct ProxyRes(pub Status);
-53
-54#[repr(u8)]
-55#[derive(Debug, Copy, Clone, PartialEq)]
-56pub enum AuthMethod {
-57    NoAuth = 0x00,
-58    UserPass = 0x02,
-59    NoneAcceptable = 0xFF,
-60}
-61
-62#[derive(Debug)]
-63pub enum Address {
-64    Socket(SocketAddr),
-65    Domain(String, u16),
-66}
-67
-68#[derive(Debug, Copy, Clone, PartialEq)]
-69pub enum Status {
-70    Success,
-71    GeneralServerFailure,
-72    ConnectionNotAllowed,
-73    NetworkUnreachable,
-74    HostUnreachable,
-75    ConnectionRefused,
-76    TtlExpired,
-77    CommandNotSupported,
-78    AddressTypeNotSupported,
-79}
-80
-81impl NegotiationReq<'_> {
-82    pub fn write_to_buf(&self, buf: &mut BytesMut) -> Result<usize, SerializeError> {
-83        if buf.capacity() - buf.len() < 3 {
-84            return Err(SerializeError::WouldOverflow);
-85        }
-86
-87        buf.put_u8(0x05); // Version
-88        buf.put_u8(0x01); // Number of authentication methods
-89        buf.put_u8(*self.0 as u8); // Authentication method
-90
-91        Ok(3)
-92    }
-93}
-94
-95impl TryFrom<&mut BytesMut> for NegotiationRes {
-96    type Error = ParsingError;
-97
-98    fn try_from(buf: &mut BytesMut) -> Result<Self, ParsingError> {
-99        if buf.remaining() < 2 {
-100            return Err(ParsingError::Incomplete);
-101        }
-102
-103        if buf.get_u8() != 0x05 {
-104            return Err(ParsingError::Other);
-105        }
-106
-107        let method = buf.get_u8().try_into()?;
-108        Ok(Self(method))
-109    }
-110}
-111
-112impl AuthenticationReq<'_> {
-113    pub fn write_to_buf(&self, buf: &mut BytesMut) -> Result<usize, SerializeError> {
-114        if buf.capacity() - buf.len() < 3 + self.0.len() + self.1.len() {
-115            return Err(SerializeError::WouldOverflow);
-116        }
-117
-118        buf.put_u8(0x01); // Version
-119
-120        buf.put_u8(self.0.len() as u8); // Username length (guarenteed to be 255 or less)
-121        buf.put_slice(self.0.as_bytes()); // Username
-122
-123        buf.put_u8(self.1.len() as u8); // Password length (guarenteed to be 255 or less)
-124        buf.put_slice(self.1.as_bytes()); // Password
-125
-126        Ok(3 + self.0.len() + self.1.len())
-127    }
-128}
-129
-130impl TryFrom<&mut BytesMut> for AuthenticationRes {
-131    type Error = ParsingError;
-132
-133    fn try_from(buf: &mut BytesMut) -> Result<Self, ParsingError> {
-134        if buf.remaining() < 2 {
-135            return Err(ParsingError::Incomplete);
-136        }
-137
-138        if buf.get_u8() != 0x01 {
-139            return Err(ParsingError::Other);
-140        }
-141
-142        if buf.get_u8() == 0 {
-143            Ok(Self(true))
-144        } else {
-145            Ok(Self(false))
-146        }
-147    }
-148}
-149
-150impl ProxyReq<'_> {
-151    pub fn write_to_buf(&self, buf: &mut BytesMut) -> Result<usize, SerializeError> {
-152        let addr_len = match self.0 {
-153            Address::Socket(SocketAddr::V4(_)) => 1 + 4 + 2,
-154            Address::Socket(SocketAddr::V6(_)) => 1 + 16 + 2,
-155            Address::Domain(ref domain, _) => 1 + 1 + domain.len() + 2,
-156        };
-157
-158        if buf.capacity() - buf.len() < 3 + addr_len {
-159            return Err(SerializeError::WouldOverflow);
-160        }
-161
-162        buf.put_u8(0x05); // Version
-163        buf.put_u8(0x01); // TCP tunneling command
-164        buf.put_u8(0x00); // Reserved
-165        let _ = self.0.write_to_buf(buf); // Address
-166
-167        Ok(3 + addr_len)
-168    }
-169}
-170
-171impl TryFrom<&mut BytesMut> for ProxyRes {
-172    type Error = ParsingError;
-173
-174    fn try_from(buf: &mut BytesMut) -> Result<Self, ParsingError> {
-175        if buf.remaining() < 3 {
-176            return Err(ParsingError::Incomplete);
-177        }
-178
-179        // VER
-180        if buf.get_u8() != 0x05 {
-181            return Err(ParsingError::Other);
-182        }
-183
-184        // REP
-185        let status = buf.get_u8().try_into()?;
-186
-187        // RSV
-188        if buf.get_u8() != 0x00 {
-189            return Err(ParsingError::Other);
-190        }
-191
-192        // ATYP + ADDR
-193        Address::try_from(buf)?;
-194
-195        Ok(Self(status))
-196    }
-197}
-198
-199impl Address {
-200    pub fn write_to_buf(&self, buf: &mut BytesMut) -> Result<usize, SerializeError> {
-201        match self {
-202            Self::Socket(SocketAddr::V4(v4)) => {
-203                if buf.capacity() - buf.len() < 1 + 4 + 2 {
-204                    return Err(SerializeError::WouldOverflow);
-205                }
-206
-207                buf.put_u8(0x01);
-208                buf.put_slice(&v4.ip().octets());
-209                buf.put_u16(v4.port()); // Network Order/BigEndian for port
-210
-211                Ok(7)
-212            }
-213
-214            Self::Socket(SocketAddr::V6(v6)) => {
-215                if buf.capacity() - buf.len() < 1 + 16 + 2 {
-216                    return Err(SerializeError::WouldOverflow);
-217                }
-218
-219                buf.put_u8(0x04);
-220                buf.put_slice(&v6.ip().octets());
-221                buf.put_u16(v6.port()); // Network Order/BigEndian for port
-222
-223                Ok(19)
-224            }
-225
-226            Self::Domain(domain, port) => {
-227                if buf.capacity() - buf.len() < 1 + 1 + domain.len() + 2 {
-228                    return Err(SerializeError::WouldOverflow);
-229                }
-230
-231                buf.put_u8(0x03);
-232                buf.put_u8(domain.len() as u8); // Guarenteed to be less than 255
-233                buf.put_slice(domain.as_bytes());
-234                buf.put_u16(*port);
-235
-236                Ok(4 + domain.len())
-237            }
-238        }
-239    }
-240}
-241
-242impl TryFrom<&mut BytesMut> for Address {
-243    type Error = ParsingError;
-244
-245    fn try_from(buf: &mut BytesMut) -> Result<Self, Self::Error> {
-246        if buf.remaining() < 2 {
-247            return Err(ParsingError::Incomplete);
-248        }
-249
-250        Ok(match buf.get_u8() {
-251            // IPv4
-252            0x01 => {
-253                let mut ip = [0; 4];
-254
-255                if buf.remaining() < 6 {
-256                    return Err(ParsingError::Incomplete);
-257                }
-258
-259                buf.copy_to_slice(&mut ip);
-260                let port = buf.get_u16();
-261
-262                Self::Socket(SocketAddr::new(ip.into(), port))
-263            }
-264            // Domain
-265            0x03 => {
-266                let len = buf.get_u8();
-267
-268                if len == 0 {
-269                    return Err(ParsingError::Other);
-270                } else if buf.remaining() < (len as usize) + 2 {
-271                    return Err(ParsingError::Incomplete);
-272                }
-273
-274                let domain = std::str::from_utf8(&buf[..len as usize])
-275                    .map_err(|_| ParsingError::Other)?
-276                    .to_string();
-277
-278                let port = buf.get_u16();
-279
-280                Self::Domain(domain, port)
-281            }
-282            // IPv6
-283            0x04 => {
-284                let mut ip = [0; 16];
-285
-286                if buf.remaining() < 18 {
-287                    return Err(ParsingError::Incomplete);
-288                }
-289                buf.copy_to_slice(&mut ip);
-290                let port = buf.get_u16();
-291
-292                Self::Socket(SocketAddr::new(ip.into(), port))
-293            }
-294
-295            _ => return Err(ParsingError::Other),
-296        })
-297    }
-298}
-299
-300impl TryFrom<u8> for Status {
-301    type Error = ParsingError;
-302
-303    fn try_from(byte: u8) -> Result<Self, Self::Error> {
-304        Ok(match byte {
-305            0x00 => Self::Success,
-306
-307            0x01 => Self::GeneralServerFailure,
-308            0x02 => Self::ConnectionNotAllowed,
-309            0x03 => Self::NetworkUnreachable,
-310            0x04 => Self::HostUnreachable,
-311            0x05 => Self::ConnectionRefused,
-312            0x06 => Self::TtlExpired,
-313            0x07 => Self::CommandNotSupported,
-314            0x08 => Self::AddressTypeNotSupported,
-315            _ => return Err(ParsingError::Other),
-316        })
-317    }
-318}
-319
-320impl TryFrom<u8> for AuthMethod {
-321    type Error = ParsingError;
-322
-323    fn try_from(byte: u8) -> Result<Self, Self::Error> {
-324        Ok(match byte {
-325            0x00 => Self::NoAuth,
-326            0x02 => Self::UserPass,
-327            0xFF => Self::NoneAcceptable,
-328
-329            _ => return Err(ParsingError::Other),
-330        })
-331    }
-332}
-333
-334impl std::fmt::Display for Status {
-335    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-336        f.write_str(match self {
-337            Self::Success => "success",
-338            Self::GeneralServerFailure => "general server failure",
-339            Self::ConnectionNotAllowed => "connection not allowed",
-340            Self::NetworkUnreachable => "network unreachable",
-341            Self::HostUnreachable => "host unreachable",
-342            Self::ConnectionRefused => "connection refused",
-343            Self::TtlExpired => "ttl expired",
-344            Self::CommandNotSupported => "command not supported",
-345            Self::AddressTypeNotSupported => "address type not supported",
-346        })
-347    }
-348}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/client/legacy/connect/proxy/socks/v5/mod.rs.html b/core/target/doc/src/hyper_util/client/legacy/connect/proxy/socks/v5/mod.rs.html deleted file mode 100644 index 2f3d292c..00000000 --- a/core/target/doc/src/hyper_util/client/legacy/connect/proxy/socks/v5/mod.rs.html +++ /dev/null @@ -1,276 +0,0 @@ -mod.rs - source

hyper_util/client/legacy/connect/proxy/socks/v5/
mod.rs

1mod errors;
-2pub use errors::*;
-3
-4mod messages;
-5use messages::*;
-6
-7use std::net::{IpAddr, SocketAddr, ToSocketAddrs};
-8use std::task::{Context, Poll};
-9
-10use http::Uri;
-11use hyper::rt::{Read, Write};
-12use tower_service::Service;
-13
-14use bytes::BytesMut;
-15
-16use super::{Handshaking, SocksError};
-17
-18/// Tunnel Proxy via SOCKSv5
-19///
-20/// This is a connector that can be used by the `legacy::Client`. It wraps
-21/// another connector, and after getting an underlying connection, it establishes
-22/// a TCP tunnel over it using SOCKSv5.
-23#[derive(Debug, Clone)]
-24pub struct SocksV5<C> {
-25    inner: C,
-26    config: SocksConfig,
-27}
-28
-29#[derive(Debug, Clone)]
-30pub struct SocksConfig {
-31    proxy: Uri,
-32    proxy_auth: Option<(String, String)>,
-33
-34    local_dns: bool,
-35    optimistic: bool,
-36}
-37
-38#[derive(Debug)]
-39enum State {
-40    SendingNegReq,
-41    ReadingNegRes,
-42    SendingAuthReq,
-43    ReadingAuthRes,
-44    SendingProxyReq,
-45    ReadingProxyRes,
-46}
-47
-48impl<C> SocksV5<C> {
-49    /// Create a new SOCKSv5 handshake service.
-50    ///
-51    /// Wraps an underlying connector and stores the address of a tunneling
-52    /// proxying server.
-53    ///
-54    /// A `SocksV5` can then be called with any destination. The `dst` passed to
-55    /// `call` will not be used to create the underlying connection, but will
-56    /// be used in a SOCKS handshake with the proxy destination.
-57    pub fn new(proxy_dst: Uri, connector: C) -> Self {
-58        Self {
-59            inner: connector,
-60            config: SocksConfig::new(proxy_dst),
-61        }
-62    }
-63
-64    /// Use User/Pass authentication method during handshake.
-65    ///
-66    /// Username and Password must be maximum of 255 characters each.
-67    /// 0 length strings are allowed despite RFC prohibiting it. This is done for
-68    /// compatablity with server implementations that use empty credentials
-69    /// to allow returning error codes during IP authentication.
-70    pub fn with_auth(mut self, user: String, pass: String) -> Self {
-71        self.config.proxy_auth = Some((user, pass));
-72        self
-73    }
-74
-75    /// Resolve domain names locally on the client, rather than on the proxy server.
-76    ///
-77    /// Disabled by default as local resolution of domain names can be detected as a
-78    /// DNS leak.
-79    pub fn local_dns(mut self, local_dns: bool) -> Self {
-80        self.config.local_dns = local_dns;
-81        self
-82    }
-83
-84    /// Send all messages of the handshake optmistically (without waiting for server response).
-85    ///
-86    /// A typical SOCKS handshake with user/pass authentication takes 3 round trips Optimistic sending
-87    /// can reduce round trip times and dramatically increase speed of handshake at the cost of
-88    /// reduced portability; many server implementations do not support optimistic sending as it
-89    /// is not defined in the RFC.
-90    ///
-91    /// Recommended to ensure connector works correctly without optimistic sending before trying
-92    /// with optimistic sending.
-93    pub fn send_optimistically(mut self, optimistic: bool) -> Self {
-94        self.config.optimistic = optimistic;
-95        self
-96    }
-97}
-98
-99impl SocksConfig {
-100    fn new(proxy: Uri) -> Self {
-101        Self {
-102            proxy,
-103            proxy_auth: None,
-104
-105            local_dns: false,
-106            optimistic: false,
-107        }
-108    }
-109
-110    async fn execute<T, E>(self, mut conn: T, host: String, port: u16) -> Result<T, SocksError<E>>
-111    where
-112        T: Read + Write + Unpin,
-113    {
-114        let address = match host.parse::<IpAddr>() {
-115            Ok(ip) => Address::Socket(SocketAddr::new(ip, port)),
-116            Err(_) if host.len() <= 255 => {
-117                if self.local_dns {
-118                    let socket = (host, port)
-119                        .to_socket_addrs()?
-120                        .next()
-121                        .ok_or(SocksError::DnsFailure)?;
-122
-123                    Address::Socket(socket)
-124                } else {
-125                    Address::Domain(host, port)
-126                }
-127            }
-128            Err(_) => return Err(SocksV5Error::HostTooLong.into()),
-129        };
-130
-131        let method = if self.proxy_auth.is_some() {
-132            AuthMethod::UserPass
-133        } else {
-134            AuthMethod::NoAuth
-135        };
-136
-137        let mut recv_buf = BytesMut::with_capacity(513); // Max length of valid recievable message is 513 from Auth Request
-138        let mut send_buf = BytesMut::with_capacity(262); // Max length of valid sendable message is 262 from Auth Response
-139        let mut state = State::SendingNegReq;
-140
-141        loop {
-142            match state {
-143                State::SendingNegReq => {
-144                    let req = NegotiationReq(&method);
-145
-146                    let start = send_buf.len();
-147                    req.write_to_buf(&mut send_buf)?;
-148                    crate::rt::write_all(&mut conn, &send_buf[start..]).await?;
-149
-150                    if self.optimistic {
-151                        if method == AuthMethod::UserPass {
-152                            state = State::SendingAuthReq;
-153                        } else {
-154                            state = State::SendingProxyReq;
-155                        }
-156                    } else {
-157                        state = State::ReadingNegRes;
-158                    }
-159                }
-160
-161                State::ReadingNegRes => {
-162                    let res: NegotiationRes = super::read_message(&mut conn, &mut recv_buf).await?;
-163
-164                    if res.0 == AuthMethod::NoneAcceptable {
-165                        return Err(SocksV5Error::Auth(AuthError::Unsupported).into());
-166                    }
-167
-168                    if res.0 != method {
-169                        return Err(SocksV5Error::Auth(AuthError::MethodMismatch).into());
-170                    }
-171
-172                    if self.optimistic {
-173                        if res.0 == AuthMethod::UserPass {
-174                            state = State::ReadingAuthRes;
-175                        } else {
-176                            state = State::ReadingProxyRes;
-177                        }
-178                    } else if res.0 == AuthMethod::UserPass {
-179                        state = State::SendingAuthReq;
-180                    } else {
-181                        state = State::SendingProxyReq;
-182                    }
-183                }
-184
-185                State::SendingAuthReq => {
-186                    let (user, pass) = self.proxy_auth.as_ref().unwrap();
-187                    let req = AuthenticationReq(user, pass);
-188
-189                    let start = send_buf.len();
-190                    req.write_to_buf(&mut send_buf)?;
-191                    crate::rt::write_all(&mut conn, &send_buf[start..]).await?;
-192
-193                    if self.optimistic {
-194                        state = State::SendingProxyReq;
-195                    } else {
-196                        state = State::ReadingAuthRes;
-197                    }
-198                }
-199
-200                State::ReadingAuthRes => {
-201                    let res: AuthenticationRes =
-202                        super::read_message(&mut conn, &mut recv_buf).await?;
-203
-204                    if !res.0 {
-205                        return Err(SocksV5Error::Auth(AuthError::Failed).into());
-206                    }
-207
-208                    if self.optimistic {
-209                        state = State::ReadingProxyRes;
-210                    } else {
-211                        state = State::SendingProxyReq;
-212                    }
-213                }
-214
-215                State::SendingProxyReq => {
-216                    let req = ProxyReq(&address);
-217
-218                    let start = send_buf.len();
-219                    req.write_to_buf(&mut send_buf)?;
-220                    crate::rt::write_all(&mut conn, &send_buf[start..]).await?;
-221
-222                    if self.optimistic {
-223                        state = State::ReadingNegRes;
-224                    } else {
-225                        state = State::ReadingProxyRes;
-226                    }
-227                }
-228
-229                State::ReadingProxyRes => {
-230                    let res: ProxyRes = super::read_message(&mut conn, &mut recv_buf).await?;
-231
-232                    if res.0 == Status::Success {
-233                        return Ok(conn);
-234                    } else {
-235                        return Err(SocksV5Error::Command(res.0).into());
-236                    }
-237                }
-238            }
-239        }
-240    }
-241}
-242
-243impl<C> Service<Uri> for SocksV5<C>
-244where
-245    C: Service<Uri>,
-246    C::Future: Send + 'static,
-247    C::Response: Read + Write + Unpin + Send + 'static,
-248    C::Error: Send + 'static,
-249{
-250    type Response = C::Response;
-251    type Error = SocksError<C::Error>;
-252    type Future = Handshaking<C::Future, C::Response, C::Error>;
-253
-254    fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
-255        self.inner.poll_ready(cx).map_err(SocksError::Inner)
-256    }
-257
-258    fn call(&mut self, dst: Uri) -> Self::Future {
-259        let config = self.config.clone();
-260        let connecting = self.inner.call(config.proxy.clone());
-261
-262        let fut = async move {
-263            let port = dst.port().map(|p| p.as_u16()).unwrap_or(443);
-264            let host = dst.host().ok_or(SocksError::MissingHost)?.to_string();
-265
-266            let conn = connecting.await.map_err(SocksError::Inner)?;
-267            config.execute(conn, host, port).await
-268        };
-269
-270        Handshaking {
-271            fut: Box::pin(fut),
-272            _marker: Default::default(),
-273        }
-274    }
-275}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/client/legacy/connect/proxy/tunnel.rs.html b/core/target/doc/src/hyper_util/client/legacy/connect/proxy/tunnel.rs.html deleted file mode 100644 index a77bed95..00000000 --- a/core/target/doc/src/hyper_util/client/legacy/connect/proxy/tunnel.rs.html +++ /dev/null @@ -1,259 +0,0 @@ -tunnel.rs - source

hyper_util/client/legacy/connect/proxy/
tunnel.rs

1use std::error::Error as StdError;
-2use std::future::Future;
-3use std::marker::{PhantomData, Unpin};
-4use std::pin::Pin;
-5use std::task::{self, Poll};
-6
-7use futures_core::ready;
-8use http::{HeaderMap, HeaderValue, Uri};
-9use hyper::rt::{Read, Write};
-10use pin_project_lite::pin_project;
-11use tower_service::Service;
-12
-13/// Tunnel Proxy via HTTP CONNECT
-14///
-15/// This is a connector that can be used by the `legacy::Client`. It wraps
-16/// another connector, and after getting an underlying connection, it creates
-17/// an HTTP CONNECT tunnel over it.
-18#[derive(Debug, Clone)]
-19pub struct Tunnel<C> {
-20    headers: Headers,
-21    inner: C,
-22    proxy_dst: Uri,
-23}
-24
-25#[derive(Clone, Debug)]
-26enum Headers {
-27    Empty,
-28    Auth(HeaderValue),
-29    Extra(HeaderMap),
-30}
-31
-32#[derive(Debug)]
-33pub enum TunnelError {
-34    ConnectFailed(Box<dyn StdError + Send + Sync>),
-35    Io(std::io::Error),
-36    MissingHost,
-37    ProxyAuthRequired,
-38    ProxyHeadersTooLong,
-39    TunnelUnexpectedEof,
-40    TunnelUnsuccessful,
-41}
-42
-43pin_project! {
-44    // Not publicly exported (so missing_docs doesn't trigger).
-45    //
-46    // We return this `Future` instead of the `Pin<Box<dyn Future>>` directly
-47    // so that users don't rely on it fitting in a `Pin<Box<dyn Future>>` slot
-48    // (and thus we can change the type in the future).
-49    #[must_use = "futures do nothing unless polled"]
-50    #[allow(missing_debug_implementations)]
-51    pub struct Tunneling<F, T> {
-52        #[pin]
-53        fut: BoxTunneling<T>,
-54        _marker: PhantomData<F>,
-55    }
-56}
-57
-58type BoxTunneling<T> = Pin<Box<dyn Future<Output = Result<T, TunnelError>> + Send>>;
-59
-60impl<C> Tunnel<C> {
-61    /// Create a new Tunnel service.
-62    ///
-63    /// This wraps an underlying connector, and stores the address of a
-64    /// tunneling proxy server.
-65    ///
-66    /// A `Tunnel` can then be called with any destination. The `dst` passed to
-67    /// `call` will not be used to create the underlying connection, but will
-68    /// be used in an HTTP CONNECT request sent to the proxy destination.
-69    pub fn new(proxy_dst: Uri, connector: C) -> Self {
-70        Self {
-71            headers: Headers::Empty,
-72            inner: connector,
-73            proxy_dst,
-74        }
-75    }
-76
-77    /// Add `proxy-authorization` header value to the CONNECT request.
-78    pub fn with_auth(mut self, mut auth: HeaderValue) -> Self {
-79        // just in case the user forgot
-80        auth.set_sensitive(true);
-81        match self.headers {
-82            Headers::Empty => {
-83                self.headers = Headers::Auth(auth);
-84            }
-85            Headers::Auth(ref mut existing) => {
-86                *existing = auth;
-87            }
-88            Headers::Extra(ref mut extra) => {
-89                extra.insert(http::header::PROXY_AUTHORIZATION, auth);
-90            }
-91        }
-92
-93        self
-94    }
-95
-96    /// Add extra headers to be sent with the CONNECT request.
-97    ///
-98    /// If existing headers have been set, these will be merged.
-99    pub fn with_headers(mut self, mut headers: HeaderMap) -> Self {
-100        match self.headers {
-101            Headers::Empty => {
-102                self.headers = Headers::Extra(headers);
-103            }
-104            Headers::Auth(auth) => {
-105                headers
-106                    .entry(http::header::PROXY_AUTHORIZATION)
-107                    .or_insert(auth);
-108                self.headers = Headers::Extra(headers);
-109            }
-110            Headers::Extra(ref mut extra) => {
-111                extra.extend(headers);
-112            }
-113        }
-114
-115        self
-116    }
-117}
-118
-119impl<C> Service<Uri> for Tunnel<C>
-120where
-121    C: Service<Uri>,
-122    C::Future: Send + 'static,
-123    C::Response: Read + Write + Unpin + Send + 'static,
-124    C::Error: Into<Box<dyn StdError + Send + Sync>>,
-125{
-126    type Response = C::Response;
-127    type Error = TunnelError;
-128    type Future = Tunneling<C::Future, C::Response>;
-129
-130    fn poll_ready(&mut self, cx: &mut task::Context<'_>) -> Poll<Result<(), Self::Error>> {
-131        ready!(self.inner.poll_ready(cx)).map_err(|e| TunnelError::ConnectFailed(e.into()))?;
-132        Poll::Ready(Ok(()))
-133    }
-134
-135    fn call(&mut self, dst: Uri) -> Self::Future {
-136        let connecting = self.inner.call(self.proxy_dst.clone());
-137        let headers = self.headers.clone();
-138
-139        Tunneling {
-140            fut: Box::pin(async move {
-141                let conn = connecting
-142                    .await
-143                    .map_err(|e| TunnelError::ConnectFailed(e.into()))?;
-144                tunnel(
-145                    conn,
-146                    dst.host().ok_or(TunnelError::MissingHost)?,
-147                    dst.port().map(|p| p.as_u16()).unwrap_or(443),
-148                    &headers,
-149                )
-150                .await
-151            }),
-152            _marker: PhantomData,
-153        }
-154    }
-155}
-156
-157impl<F, T, E> Future for Tunneling<F, T>
-158where
-159    F: Future<Output = Result<T, E>>,
-160{
-161    type Output = Result<T, TunnelError>;
-162
-163    fn poll(self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Self::Output> {
-164        self.project().fut.poll(cx)
-165    }
-166}
-167
-168async fn tunnel<T>(mut conn: T, host: &str, port: u16, headers: &Headers) -> Result<T, TunnelError>
-169where
-170    T: Read + Write + Unpin,
-171{
-172    let mut buf = format!(
-173        "\
-174         CONNECT {host}:{port} HTTP/1.1\r\n\
-175         Host: {host}:{port}\r\n\
-176         "
-177    )
-178    .into_bytes();
-179
-180    match headers {
-181        Headers::Auth(auth) => {
-182            buf.extend_from_slice(b"Proxy-Authorization: ");
-183            buf.extend_from_slice(auth.as_bytes());
-184            buf.extend_from_slice(b"\r\n");
-185        }
-186        Headers::Extra(extra) => {
-187            for (name, value) in extra {
-188                buf.extend_from_slice(name.as_str().as_bytes());
-189                buf.extend_from_slice(b": ");
-190                buf.extend_from_slice(value.as_bytes());
-191                buf.extend_from_slice(b"\r\n");
-192            }
-193        }
-194        Headers::Empty => (),
-195    }
-196
-197    // headers end
-198    buf.extend_from_slice(b"\r\n");
-199
-200    crate::rt::write_all(&mut conn, &buf)
-201        .await
-202        .map_err(TunnelError::Io)?;
-203
-204    let mut buf = [0; 8192];
-205    let mut pos = 0;
-206
-207    loop {
-208        let n = crate::rt::read(&mut conn, &mut buf[pos..])
-209            .await
-210            .map_err(TunnelError::Io)?;
-211
-212        if n == 0 {
-213            return Err(TunnelError::TunnelUnexpectedEof);
-214        }
-215        pos += n;
-216
-217        let recvd = &buf[..pos];
-218        if recvd.starts_with(b"HTTP/1.1 200") || recvd.starts_with(b"HTTP/1.0 200") {
-219            if recvd.ends_with(b"\r\n\r\n") {
-220                return Ok(conn);
-221            }
-222            if pos == buf.len() {
-223                return Err(TunnelError::ProxyHeadersTooLong);
-224            }
-225        // else read more
-226        } else if recvd.starts_with(b"HTTP/1.1 407") {
-227            return Err(TunnelError::ProxyAuthRequired);
-228        } else {
-229            return Err(TunnelError::TunnelUnsuccessful);
-230        }
-231    }
-232}
-233
-234impl std::fmt::Display for TunnelError {
-235    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-236        f.write_str("tunnel error: ")?;
-237
-238        f.write_str(match self {
-239            TunnelError::MissingHost => "missing destination host",
-240            TunnelError::ProxyAuthRequired => "proxy authorization required",
-241            TunnelError::ProxyHeadersTooLong => "proxy response headers too long",
-242            TunnelError::TunnelUnexpectedEof => "unexpected end of file",
-243            TunnelError::TunnelUnsuccessful => "unsuccessful",
-244            TunnelError::ConnectFailed(_) => "failed to create underlying connection",
-245            TunnelError::Io(_) => "io error establishing tunnel",
-246        })
-247    }
-248}
-249
-250impl std::error::Error for TunnelError {
-251    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
-252        match self {
-253            TunnelError::Io(ref e) => Some(e),
-254            TunnelError::ConnectFailed(ref e) => Some(&**e),
-255            _ => None,
-256        }
-257    }
-258}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/client/legacy/mod.rs.html b/core/target/doc/src/hyper_util/client/legacy/mod.rs.html deleted file mode 100644 index f037a93d..00000000 --- a/core/target/doc/src/hyper_util/client/legacy/mod.rs.html +++ /dev/null @@ -1,11 +0,0 @@ -mod.rs - source

hyper_util/client/legacy/
mod.rs

1#[cfg(any(feature = "http1", feature = "http2"))]
-2mod client;
-3#[cfg(any(feature = "http1", feature = "http2"))]
-4pub use client::{Builder, Client, Error, ResponseFuture};
-5
-6pub mod connect;
-7#[doc(hidden)]
-8// Publicly available, but just for legacy purposes. A better pool will be
-9// designed.
-10pub mod pool;
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/client/legacy/pool.rs.html b/core/target/doc/src/hyper_util/client/legacy/pool.rs.html deleted file mode 100644 index 29d55c77..00000000 --- a/core/target/doc/src/hyper_util/client/legacy/pool.rs.html +++ /dev/null @@ -1,1117 +0,0 @@ -pool.rs - source

hyper_util/client/legacy/
pool.rs

1#![allow(dead_code)]
-2
-3use std::collections::{HashMap, HashSet, VecDeque};
-4use std::convert::Infallible;
-5use std::error::Error as StdError;
-6use std::fmt::{self, Debug};
-7use std::future::Future;
-8use std::hash::Hash;
-9use std::ops::{Deref, DerefMut};
-10use std::pin::Pin;
-11use std::sync::{Arc, Mutex, Weak};
-12use std::task::{self, Poll};
-13
-14use std::time::{Duration, Instant};
-15
-16use futures_channel::oneshot;
-17use futures_core::ready;
-18use tracing::{debug, trace};
-19
-20use hyper::rt::Timer as _;
-21
-22use crate::common::{exec, exec::Exec, timer::Timer};
-23
-24// FIXME: allow() required due to `impl Trait` leaking types to this lint
-25#[allow(missing_debug_implementations)]
-26pub struct Pool<T, K: Key> {
-27    // If the pool is disabled, this is None.
-28    inner: Option<Arc<Mutex<PoolInner<T, K>>>>,
-29}
-30
-31// Before using a pooled connection, make sure the sender is not dead.
-32//
-33// This is a trait to allow the `client::pool::tests` to work for `i32`.
-34//
-35// See https://github.com/hyperium/hyper/issues/1429
-36pub trait Poolable: Unpin + Send + Sized + 'static {
-37    fn is_open(&self) -> bool;
-38    /// Reserve this connection.
-39    ///
-40    /// Allows for HTTP/2 to return a shared reservation.
-41    fn reserve(self) -> Reservation<Self>;
-42    fn can_share(&self) -> bool;
-43}
-44
-45pub trait Key: Eq + Hash + Clone + Debug + Unpin + Send + 'static {}
-46
-47impl<T> Key for T where T: Eq + Hash + Clone + Debug + Unpin + Send + 'static {}
-48
-49/// A marker to identify what version a pooled connection is.
-50#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
-51#[allow(dead_code)]
-52pub enum Ver {
-53    Auto,
-54    Http2,
-55}
-56
-57/// When checking out a pooled connection, it might be that the connection
-58/// only supports a single reservation, or it might be usable for many.
-59///
-60/// Specifically, HTTP/1 requires a unique reservation, but HTTP/2 can be
-61/// used for multiple requests.
-62// FIXME: allow() required due to `impl Trait` leaking types to this lint
-63#[allow(missing_debug_implementations)]
-64pub enum Reservation<T> {
-65    /// This connection could be used multiple times, the first one will be
-66    /// reinserted into the `idle` pool, and the second will be given to
-67    /// the `Checkout`.
-68    #[cfg(feature = "http2")]
-69    Shared(T, T),
-70    /// This connection requires unique access. It will be returned after
-71    /// use is complete.
-72    Unique(T),
-73}
-74
-75/// Simple type alias in case the key type needs to be adjusted.
-76// pub type Key = (http::uri::Scheme, http::uri::Authority); //Arc<String>;
-77
-78struct PoolInner<T, K: Eq + Hash> {
-79    // A flag that a connection is being established, and the connection
-80    // should be shared. This prevents making multiple HTTP/2 connections
-81    // to the same host.
-82    connecting: HashSet<K>,
-83    // These are internal Conns sitting in the event loop in the KeepAlive
-84    // state, waiting to receive a new Request to send on the socket.
-85    idle: HashMap<K, Vec<Idle<T>>>,
-86    max_idle_per_host: usize,
-87    // These are outstanding Checkouts that are waiting for a socket to be
-88    // able to send a Request one. This is used when "racing" for a new
-89    // connection.
-90    //
-91    // The Client starts 2 tasks, 1 to connect a new socket, and 1 to wait
-92    // for the Pool to receive an idle Conn. When a Conn becomes idle,
-93    // this list is checked for any parked Checkouts, and tries to notify
-94    // them that the Conn could be used instead of waiting for a brand new
-95    // connection.
-96    waiters: HashMap<K, VecDeque<oneshot::Sender<T>>>,
-97    // A oneshot channel is used to allow the interval to be notified when
-98    // the Pool completely drops. That way, the interval can cancel immediately.
-99    idle_interval_ref: Option<oneshot::Sender<Infallible>>,
-100    exec: Exec,
-101    timer: Option<Timer>,
-102    timeout: Option<Duration>,
-103}
-104
-105// This is because `Weak::new()` *allocates* space for `T`, even if it
-106// doesn't need it!
-107struct WeakOpt<T>(Option<Weak<T>>);
-108
-109#[derive(Clone, Copy, Debug)]
-110pub struct Config {
-111    pub idle_timeout: Option<Duration>,
-112    pub max_idle_per_host: usize,
-113}
-114
-115impl Config {
-116    pub fn is_enabled(&self) -> bool {
-117        self.max_idle_per_host > 0
-118    }
-119}
-120
-121impl<T, K: Key> Pool<T, K> {
-122    pub fn new<E, M>(config: Config, executor: E, timer: Option<M>) -> Pool<T, K>
-123    where
-124        E: hyper::rt::Executor<exec::BoxSendFuture> + Send + Sync + Clone + 'static,
-125        M: hyper::rt::Timer + Send + Sync + Clone + 'static,
-126    {
-127        let exec = Exec::new(executor);
-128        let timer = timer.map(|t| Timer::new(t));
-129        let inner = if config.is_enabled() {
-130            Some(Arc::new(Mutex::new(PoolInner {
-131                connecting: HashSet::new(),
-132                idle: HashMap::new(),
-133                idle_interval_ref: None,
-134                max_idle_per_host: config.max_idle_per_host,
-135                waiters: HashMap::new(),
-136                exec,
-137                timer,
-138                timeout: config.idle_timeout,
-139            })))
-140        } else {
-141            None
-142        };
-143
-144        Pool { inner }
-145    }
-146
-147    pub(crate) fn is_enabled(&self) -> bool {
-148        self.inner.is_some()
-149    }
-150
-151    #[cfg(test)]
-152    pub(super) fn no_timer(&self) {
-153        // Prevent an actual interval from being created for this pool...
-154        {
-155            let mut inner = self.inner.as_ref().unwrap().lock().unwrap();
-156            assert!(inner.idle_interval_ref.is_none(), "timer already spawned");
-157            let (tx, _) = oneshot::channel();
-158            inner.idle_interval_ref = Some(tx);
-159        }
-160    }
-161}
-162
-163impl<T: Poolable, K: Key> Pool<T, K> {
-164    /// Returns a `Checkout` which is a future that resolves if an idle
-165    /// connection becomes available.
-166    pub fn checkout(&self, key: K) -> Checkout<T, K> {
-167        Checkout {
-168            key,
-169            pool: self.clone(),
-170            waiter: None,
-171        }
-172    }
-173
-174    /// Ensure that there is only ever 1 connecting task for HTTP/2
-175    /// connections. This does nothing for HTTP/1.
-176    pub fn connecting(&self, key: &K, ver: Ver) -> Option<Connecting<T, K>> {
-177        if ver == Ver::Http2 {
-178            if let Some(ref enabled) = self.inner {
-179                let mut inner = enabled.lock().unwrap();
-180                return if inner.connecting.insert(key.clone()) {
-181                    let connecting = Connecting {
-182                        key: key.clone(),
-183                        pool: WeakOpt::downgrade(enabled),
-184                    };
-185                    Some(connecting)
-186                } else {
-187                    trace!("HTTP/2 connecting already in progress for {:?}", key);
-188                    None
-189                };
-190            }
-191        }
-192
-193        // else
-194        Some(Connecting {
-195            key: key.clone(),
-196            // in HTTP/1's case, there is never a lock, so we don't
-197            // need to do anything in Drop.
-198            pool: WeakOpt::none(),
-199        })
-200    }
-201
-202    #[cfg(test)]
-203    fn locked(&self) -> std::sync::MutexGuard<'_, PoolInner<T, K>> {
-204        self.inner.as_ref().expect("enabled").lock().expect("lock")
-205    }
-206
-207    /* Used in client/tests.rs...
-208    #[cfg(test)]
-209    pub(super) fn h1_key(&self, s: &str) -> Key {
-210        Arc::new(s.to_string())
-211    }
-212
-213    #[cfg(test)]
-214    pub(super) fn idle_count(&self, key: &Key) -> usize {
-215        self
-216            .locked()
-217            .idle
-218            .get(key)
-219            .map(|list| list.len())
-220            .unwrap_or(0)
-221    }
-222    */
-223
-224    pub fn pooled(
-225        &self,
-226        #[cfg_attr(not(feature = "http2"), allow(unused_mut))] mut connecting: Connecting<T, K>,
-227        value: T,
-228    ) -> Pooled<T, K> {
-229        let (value, pool_ref) = if let Some(ref enabled) = self.inner {
-230            match value.reserve() {
-231                #[cfg(feature = "http2")]
-232                Reservation::Shared(to_insert, to_return) => {
-233                    let mut inner = enabled.lock().unwrap();
-234                    inner.put(connecting.key.clone(), to_insert, enabled);
-235                    // Do this here instead of Drop for Connecting because we
-236                    // already have a lock, no need to lock the mutex twice.
-237                    inner.connected(&connecting.key);
-238                    // prevent the Drop of Connecting from repeating inner.connected()
-239                    connecting.pool = WeakOpt::none();
-240
-241                    // Shared reservations don't need a reference to the pool,
-242                    // since the pool always keeps a copy.
-243                    (to_return, WeakOpt::none())
-244                }
-245                Reservation::Unique(value) => {
-246                    // Unique reservations must take a reference to the pool
-247                    // since they hope to reinsert once the reservation is
-248                    // completed
-249                    (value, WeakOpt::downgrade(enabled))
-250                }
-251            }
-252        } else {
-253            // If pool is not enabled, skip all the things...
-254
-255            // The Connecting should have had no pool ref
-256            debug_assert!(connecting.pool.upgrade().is_none());
-257
-258            (value, WeakOpt::none())
-259        };
-260        Pooled {
-261            key: connecting.key.clone(),
-262            is_reused: false,
-263            pool: pool_ref,
-264            value: Some(value),
-265        }
-266    }
-267
-268    fn reuse(&self, key: &K, value: T) -> Pooled<T, K> {
-269        debug!("reuse idle connection for {:?}", key);
-270        // TODO: unhack this
-271        // In Pool::pooled(), which is used for inserting brand new connections,
-272        // there's some code that adjusts the pool reference taken depending
-273        // on if the Reservation can be shared or is unique. By the time
-274        // reuse() is called, the reservation has already been made, and
-275        // we just have the final value, without knowledge of if this is
-276        // unique or shared. So, the hack is to just assume Ver::Http2 means
-277        // shared... :(
-278        let mut pool_ref = WeakOpt::none();
-279        if !value.can_share() {
-280            if let Some(ref enabled) = self.inner {
-281                pool_ref = WeakOpt::downgrade(enabled);
-282            }
-283        }
-284
-285        Pooled {
-286            is_reused: true,
-287            key: key.clone(),
-288            pool: pool_ref,
-289            value: Some(value),
-290        }
-291    }
-292}
-293
-294/// Pop off this list, looking for a usable connection that hasn't expired.
-295struct IdlePopper<'a, T, K> {
-296    key: &'a K,
-297    list: &'a mut Vec<Idle<T>>,
-298}
-299
-300impl<'a, T: Poolable + 'a, K: Debug> IdlePopper<'a, T, K> {
-301    fn pop(self, expiration: &Expiration, now: Instant) -> Option<Idle<T>> {
-302        while let Some(entry) = self.list.pop() {
-303            // If the connection has been closed, or is older than our idle
-304            // timeout, simply drop it and keep looking...
-305            if !entry.value.is_open() {
-306                trace!("removing closed connection for {:?}", self.key);
-307                continue;
-308            }
-309            // TODO: Actually, since the `idle` list is pushed to the end always,
-310            // that would imply that if *this* entry is expired, then anything
-311            // "earlier" in the list would *have* to be expired also... Right?
-312            //
-313            // In that case, we could just break out of the loop and drop the
-314            // whole list...
-315            if expiration.expires(entry.idle_at, now) {
-316                trace!("removing expired connection for {:?}", self.key);
-317                continue;
-318            }
-319
-320            let value = match entry.value.reserve() {
-321                #[cfg(feature = "http2")]
-322                Reservation::Shared(to_reinsert, to_checkout) => {
-323                    self.list.push(Idle {
-324                        idle_at: now,
-325                        value: to_reinsert,
-326                    });
-327                    to_checkout
-328                }
-329                Reservation::Unique(unique) => unique,
-330            };
-331
-332            return Some(Idle {
-333                idle_at: entry.idle_at,
-334                value,
-335            });
-336        }
-337
-338        None
-339    }
-340}
-341
-342impl<T: Poolable, K: Key> PoolInner<T, K> {
-343    fn now(&self) -> Instant {
-344        self.timer
-345            .as_ref()
-346            .map_or_else(|| Instant::now(), |t| t.now())
-347    }
-348
-349    fn put(&mut self, key: K, value: T, __pool_ref: &Arc<Mutex<PoolInner<T, K>>>) {
-350        if value.can_share() && self.idle.contains_key(&key) {
-351            trace!("put; existing idle HTTP/2 connection for {:?}", key);
-352            return;
-353        }
-354        trace!("put; add idle connection for {:?}", key);
-355        let mut remove_waiters = false;
-356        let mut value = Some(value);
-357        if let Some(waiters) = self.waiters.get_mut(&key) {
-358            while let Some(tx) = waiters.pop_front() {
-359                if !tx.is_canceled() {
-360                    let reserved = value.take().expect("value already sent");
-361                    let reserved = match reserved.reserve() {
-362                        #[cfg(feature = "http2")]
-363                        Reservation::Shared(to_keep, to_send) => {
-364                            value = Some(to_keep);
-365                            to_send
-366                        }
-367                        Reservation::Unique(uniq) => uniq,
-368                    };
-369                    match tx.send(reserved) {
-370                        Ok(()) => {
-371                            if value.is_none() {
-372                                break;
-373                            } else {
-374                                continue;
-375                            }
-376                        }
-377                        Err(e) => {
-378                            value = Some(e);
-379                        }
-380                    }
-381                }
-382
-383                trace!("put; removing canceled waiter for {:?}", key);
-384            }
-385            remove_waiters = waiters.is_empty();
-386        }
-387        if remove_waiters {
-388            self.waiters.remove(&key);
-389        }
-390
-391        match value {
-392            Some(value) => {
-393                // borrow-check scope...
-394                {
-395                    let now = self.now();
-396                    let idle_list = self.idle.entry(key.clone()).or_default();
-397                    if self.max_idle_per_host <= idle_list.len() {
-398                        trace!("max idle per host for {:?}, dropping connection", key);
-399                        return;
-400                    }
-401
-402                    debug!("pooling idle connection for {:?}", key);
-403                    idle_list.push(Idle {
-404                        value,
-405                        idle_at: now,
-406                    });
-407                }
-408
-409                self.spawn_idle_interval(__pool_ref);
-410            }
-411            None => trace!("put; found waiter for {:?}", key),
-412        }
-413    }
-414
-415    /// A `Connecting` task is complete. Not necessarily successfully,
-416    /// but the lock is going away, so clean up.
-417    fn connected(&mut self, key: &K) {
-418        let existed = self.connecting.remove(key);
-419        debug_assert!(existed, "Connecting dropped, key not in pool.connecting");
-420        // cancel any waiters. if there are any, it's because
-421        // this Connecting task didn't complete successfully.
-422        // those waiters would never receive a connection.
-423        self.waiters.remove(key);
-424    }
-425
-426    fn spawn_idle_interval(&mut self, pool_ref: &Arc<Mutex<PoolInner<T, K>>>) {
-427        if self.idle_interval_ref.is_some() {
-428            return;
-429        }
-430        let dur = if let Some(dur) = self.timeout {
-431            dur
-432        } else {
-433            return;
-434        };
-435        if dur == Duration::ZERO {
-436            return;
-437        }
-438        let timer = if let Some(timer) = self.timer.clone() {
-439            timer
-440        } else {
-441            return;
-442        };
-443
-444        // While someone might want a shorter duration, and it will be respected
-445        // at checkout time, there's no need to wake up and proactively evict
-446        // faster than this.
-447        const MIN_CHECK: Duration = Duration::from_millis(90);
-448
-449        let dur = dur.max(MIN_CHECK);
-450
-451        let (tx, rx) = oneshot::channel();
-452        self.idle_interval_ref = Some(tx);
-453
-454        let interval = IdleTask {
-455            timer: timer.clone(),
-456            duration: dur,
-457            pool: WeakOpt::downgrade(pool_ref),
-458            pool_drop_notifier: rx,
-459        };
-460
-461        self.exec.execute(interval.run());
-462    }
-463}
-464
-465impl<T, K: Eq + Hash> PoolInner<T, K> {
-466    /// Any `FutureResponse`s that were created will have made a `Checkout`,
-467    /// and possibly inserted into the pool that it is waiting for an idle
-468    /// connection. If a user ever dropped that future, we need to clean out
-469    /// those parked senders.
-470    fn clean_waiters(&mut self, key: &K) {
-471        let mut remove_waiters = false;
-472        if let Some(waiters) = self.waiters.get_mut(key) {
-473            waiters.retain(|tx| !tx.is_canceled());
-474            remove_waiters = waiters.is_empty();
-475        }
-476        if remove_waiters {
-477            self.waiters.remove(key);
-478        }
-479    }
-480}
-481
-482impl<T: Poolable, K: Key> PoolInner<T, K> {
-483    /// This should *only* be called by the IdleTask
-484    fn clear_expired(&mut self) {
-485        let dur = self.timeout.expect("interval assumes timeout");
-486
-487        let now = self.now();
-488        //self.last_idle_check_at = now;
-489
-490        self.idle.retain(|key, values| {
-491            values.retain(|entry| {
-492                if !entry.value.is_open() {
-493                    trace!("idle interval evicting closed for {:?}", key);
-494                    return false;
-495                }
-496
-497                // Avoid `Instant::sub` to avoid issues like rust-lang/rust#86470.
-498                if now.saturating_duration_since(entry.idle_at) > dur {
-499                    trace!("idle interval evicting expired for {:?}", key);
-500                    return false;
-501                }
-502
-503                // Otherwise, keep this value...
-504                true
-505            });
-506
-507            // returning false evicts this key/val
-508            !values.is_empty()
-509        });
-510    }
-511}
-512
-513impl<T, K: Key> Clone for Pool<T, K> {
-514    fn clone(&self) -> Pool<T, K> {
-515        Pool {
-516            inner: self.inner.clone(),
-517        }
-518    }
-519}
-520
-521/// A wrapped poolable value that tries to reinsert to the Pool on Drop.
-522// Note: The bounds `T: Poolable` is needed for the Drop impl.
-523pub struct Pooled<T: Poolable, K: Key> {
-524    value: Option<T>,
-525    is_reused: bool,
-526    key: K,
-527    pool: WeakOpt<Mutex<PoolInner<T, K>>>,
-528}
-529
-530impl<T: Poolable, K: Key> Pooled<T, K> {
-531    pub fn is_reused(&self) -> bool {
-532        self.is_reused
-533    }
-534
-535    pub fn is_pool_enabled(&self) -> bool {
-536        self.pool.0.is_some()
-537    }
-538
-539    fn as_ref(&self) -> &T {
-540        self.value.as_ref().expect("not dropped")
-541    }
-542
-543    fn as_mut(&mut self) -> &mut T {
-544        self.value.as_mut().expect("not dropped")
-545    }
-546}
-547
-548impl<T: Poolable, K: Key> Deref for Pooled<T, K> {
-549    type Target = T;
-550    fn deref(&self) -> &T {
-551        self.as_ref()
-552    }
-553}
-554
-555impl<T: Poolable, K: Key> DerefMut for Pooled<T, K> {
-556    fn deref_mut(&mut self) -> &mut T {
-557        self.as_mut()
-558    }
-559}
-560
-561impl<T: Poolable, K: Key> Drop for Pooled<T, K> {
-562    fn drop(&mut self) {
-563        if let Some(value) = self.value.take() {
-564            if !value.is_open() {
-565                // If we *already* know the connection is done here,
-566                // it shouldn't be re-inserted back into the pool.
-567                return;
-568            }
-569
-570            if let Some(pool) = self.pool.upgrade() {
-571                if let Ok(mut inner) = pool.lock() {
-572                    inner.put(self.key.clone(), value, &pool);
-573                }
-574            } else if !value.can_share() {
-575                trace!("pool dropped, dropping pooled ({:?})", self.key);
-576            }
-577            // Ver::Http2 is already in the Pool (or dead), so we wouldn't
-578            // have an actual reference to the Pool.
-579        }
-580    }
-581}
-582
-583impl<T: Poolable, K: Key> fmt::Debug for Pooled<T, K> {
-584    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-585        f.debug_struct("Pooled").field("key", &self.key).finish()
-586    }
-587}
-588
-589struct Idle<T> {
-590    idle_at: Instant,
-591    value: T,
-592}
-593
-594// FIXME: allow() required due to `impl Trait` leaking types to this lint
-595#[allow(missing_debug_implementations)]
-596pub struct Checkout<T, K: Key> {
-597    key: K,
-598    pool: Pool<T, K>,
-599    waiter: Option<oneshot::Receiver<T>>,
-600}
-601
-602#[derive(Debug)]
-603#[non_exhaustive]
-604pub enum Error {
-605    PoolDisabled,
-606    CheckoutNoLongerWanted,
-607    CheckedOutClosedValue,
-608}
-609
-610impl Error {
-611    pub(super) fn is_canceled(&self) -> bool {
-612        matches!(self, Error::CheckedOutClosedValue)
-613    }
-614}
-615
-616impl fmt::Display for Error {
-617    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-618        f.write_str(match self {
-619            Error::PoolDisabled => "pool is disabled",
-620            Error::CheckedOutClosedValue => "checked out connection was closed",
-621            Error::CheckoutNoLongerWanted => "request was canceled",
-622        })
-623    }
-624}
-625
-626impl StdError for Error {}
-627
-628impl<T: Poolable, K: Key> Checkout<T, K> {
-629    fn poll_waiter(
-630        &mut self,
-631        cx: &mut task::Context<'_>,
-632    ) -> Poll<Option<Result<Pooled<T, K>, Error>>> {
-633        if let Some(mut rx) = self.waiter.take() {
-634            match Pin::new(&mut rx).poll(cx) {
-635                Poll::Ready(Ok(value)) => {
-636                    if value.is_open() {
-637                        Poll::Ready(Some(Ok(self.pool.reuse(&self.key, value))))
-638                    } else {
-639                        Poll::Ready(Some(Err(Error::CheckedOutClosedValue)))
-640                    }
-641                }
-642                Poll::Pending => {
-643                    self.waiter = Some(rx);
-644                    Poll::Pending
-645                }
-646                Poll::Ready(Err(_canceled)) => {
-647                    Poll::Ready(Some(Err(Error::CheckoutNoLongerWanted)))
-648                }
-649            }
-650        } else {
-651            Poll::Ready(None)
-652        }
-653    }
-654
-655    fn checkout(&mut self, cx: &mut task::Context<'_>) -> Option<Pooled<T, K>> {
-656        let entry = {
-657            let mut inner = self.pool.inner.as_ref()?.lock().unwrap();
-658            let expiration = Expiration::new(inner.timeout);
-659            let now = inner.now();
-660            let maybe_entry = inner.idle.get_mut(&self.key).and_then(|list| {
-661                trace!("take? {:?}: expiration = {:?}", self.key, expiration.0);
-662                // A block to end the mutable borrow on list,
-663                // so the map below can check is_empty()
-664                {
-665                    let popper = IdlePopper {
-666                        key: &self.key,
-667                        list,
-668                    };
-669                    popper.pop(&expiration, now)
-670                }
-671                .map(|e| (e, list.is_empty()))
-672            });
-673
-674            let (entry, empty) = if let Some((e, empty)) = maybe_entry {
-675                (Some(e), empty)
-676            } else {
-677                // No entry found means nuke the list for sure.
-678                (None, true)
-679            };
-680            if empty {
-681                //TODO: This could be done with the HashMap::entry API instead.
-682                inner.idle.remove(&self.key);
-683            }
-684
-685            if entry.is_none() && self.waiter.is_none() {
-686                let (tx, mut rx) = oneshot::channel();
-687                trace!("checkout waiting for idle connection: {:?}", self.key);
-688                inner
-689                    .waiters
-690                    .entry(self.key.clone())
-691                    .or_insert_with(VecDeque::new)
-692                    .push_back(tx);
-693
-694                // register the waker with this oneshot
-695                assert!(Pin::new(&mut rx).poll(cx).is_pending());
-696                self.waiter = Some(rx);
-697            }
-698
-699            entry
-700        };
-701
-702        entry.map(|e| self.pool.reuse(&self.key, e.value))
-703    }
-704}
-705
-706impl<T: Poolable, K: Key> Future for Checkout<T, K> {
-707    type Output = Result<Pooled<T, K>, Error>;
-708
-709    fn poll(mut self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Self::Output> {
-710        if let Some(pooled) = ready!(self.poll_waiter(cx)?) {
-711            return Poll::Ready(Ok(pooled));
-712        }
-713
-714        if let Some(pooled) = self.checkout(cx) {
-715            Poll::Ready(Ok(pooled))
-716        } else if !self.pool.is_enabled() {
-717            Poll::Ready(Err(Error::PoolDisabled))
-718        } else {
-719            // There's a new waiter, already registered in self.checkout()
-720            debug_assert!(self.waiter.is_some());
-721            Poll::Pending
-722        }
-723    }
-724}
-725
-726impl<T, K: Key> Drop for Checkout<T, K> {
-727    fn drop(&mut self) {
-728        if self.waiter.take().is_some() {
-729            trace!("checkout dropped for {:?}", self.key);
-730            if let Some(Ok(mut inner)) = self.pool.inner.as_ref().map(|i| i.lock()) {
-731                inner.clean_waiters(&self.key);
-732            }
-733        }
-734    }
-735}
-736
-737// FIXME: allow() required due to `impl Trait` leaking types to this lint
-738#[allow(missing_debug_implementations)]
-739pub struct Connecting<T: Poolable, K: Key> {
-740    key: K,
-741    pool: WeakOpt<Mutex<PoolInner<T, K>>>,
-742}
-743
-744impl<T: Poolable, K: Key> Connecting<T, K> {
-745    pub fn alpn_h2(self, pool: &Pool<T, K>) -> Option<Self> {
-746        debug_assert!(
-747            self.pool.0.is_none(),
-748            "Connecting::alpn_h2 but already Http2"
-749        );
-750
-751        pool.connecting(&self.key, Ver::Http2)
-752    }
-753}
-754
-755impl<T: Poolable, K: Key> Drop for Connecting<T, K> {
-756    fn drop(&mut self) {
-757        if let Some(pool) = self.pool.upgrade() {
-758            // No need to panic on drop, that could abort!
-759            if let Ok(mut inner) = pool.lock() {
-760                inner.connected(&self.key);
-761            }
-762        }
-763    }
-764}
-765
-766struct Expiration(Option<Duration>);
-767
-768impl Expiration {
-769    fn new(dur: Option<Duration>) -> Expiration {
-770        Expiration(dur)
-771    }
-772
-773    fn expires(&self, instant: Instant, now: Instant) -> bool {
-774        match self.0 {
-775            // Avoid `Instant::elapsed` to avoid issues like rust-lang/rust#86470.
-776            Some(timeout) => now.saturating_duration_since(instant) > timeout,
-777            None => false,
-778        }
-779    }
-780}
-781
-782struct IdleTask<T, K: Key> {
-783    timer: Timer,
-784    duration: Duration,
-785    pool: WeakOpt<Mutex<PoolInner<T, K>>>,
-786    // This allows the IdleTask to be notified as soon as the entire
-787    // Pool is fully dropped, and shutdown. This channel is never sent on,
-788    // but Err(Canceled) will be received when the Pool is dropped.
-789    pool_drop_notifier: oneshot::Receiver<Infallible>,
-790}
-791
-792impl<T: Poolable + 'static, K: Key> IdleTask<T, K> {
-793    async fn run(self) {
-794        use futures_util::future;
-795
-796        let mut sleep = self.timer.sleep_until(self.timer.now() + self.duration);
-797        let mut on_pool_drop = self.pool_drop_notifier;
-798        loop {
-799            match future::select(&mut on_pool_drop, &mut sleep).await {
-800                future::Either::Left(_) => {
-801                    // pool dropped, bah-bye
-802                    break;
-803                }
-804                future::Either::Right(((), _)) => {
-805                    if let Some(inner) = self.pool.upgrade() {
-806                        if let Ok(mut inner) = inner.lock() {
-807                            trace!("idle interval checking for expired");
-808                            inner.clear_expired();
-809                        }
-810                    }
-811
-812                    let deadline = self.timer.now() + self.duration;
-813                    self.timer.reset(&mut sleep, deadline);
-814                }
-815            }
-816        }
-817
-818        trace!("pool closed, canceling idle interval");
-819        return;
-820    }
-821}
-822
-823impl<T> WeakOpt<T> {
-824    fn none() -> Self {
-825        WeakOpt(None)
-826    }
-827
-828    fn downgrade(arc: &Arc<T>) -> Self {
-829        WeakOpt(Some(Arc::downgrade(arc)))
-830    }
-831
-832    fn upgrade(&self) -> Option<Arc<T>> {
-833        self.0.as_ref().and_then(Weak::upgrade)
-834    }
-835}
-836
-837#[cfg(test)]
-838mod tests {
-839    use std::fmt::Debug;
-840    use std::future::Future;
-841    use std::hash::Hash;
-842    use std::pin::Pin;
-843    use std::task::{self, Poll};
-844    use std::time::Duration;
-845
-846    use super::{Connecting, Key, Pool, Poolable, Reservation, WeakOpt};
-847    use crate::rt::{TokioExecutor, TokioTimer};
-848
-849    use crate::common::timer;
-850
-851    #[derive(Clone, Debug, PartialEq, Eq, Hash)]
-852    struct KeyImpl(http::uri::Scheme, http::uri::Authority);
-853
-854    type KeyTuple = (http::uri::Scheme, http::uri::Authority);
-855
-856    /// Test unique reservations.
-857    #[derive(Debug, PartialEq, Eq)]
-858    struct Uniq<T>(T);
-859
-860    impl<T: Send + 'static + Unpin> Poolable for Uniq<T> {
-861        fn is_open(&self) -> bool {
-862            true
-863        }
-864
-865        fn reserve(self) -> Reservation<Self> {
-866            Reservation::Unique(self)
-867        }
-868
-869        fn can_share(&self) -> bool {
-870            false
-871        }
-872    }
-873
-874    fn c<T: Poolable, K: Key>(key: K) -> Connecting<T, K> {
-875        Connecting {
-876            key,
-877            pool: WeakOpt::none(),
-878        }
-879    }
-880
-881    fn host_key(s: &str) -> KeyImpl {
-882        KeyImpl(http::uri::Scheme::HTTP, s.parse().expect("host key"))
-883    }
-884
-885    fn pool_no_timer<T, K: Key>() -> Pool<T, K> {
-886        pool_max_idle_no_timer(usize::MAX)
-887    }
-888
-889    fn pool_max_idle_no_timer<T, K: Key>(max_idle: usize) -> Pool<T, K> {
-890        let pool = Pool::new(
-891            super::Config {
-892                idle_timeout: Some(Duration::from_millis(100)),
-893                max_idle_per_host: max_idle,
-894            },
-895            TokioExecutor::new(),
-896            Option::<timer::Timer>::None,
-897        );
-898        pool.no_timer();
-899        pool
-900    }
-901
-902    #[tokio::test]
-903    async fn test_pool_checkout_smoke() {
-904        let pool = pool_no_timer();
-905        let key = host_key("foo");
-906        let pooled = pool.pooled(c(key.clone()), Uniq(41));
-907
-908        drop(pooled);
-909
-910        match pool.checkout(key).await {
-911            Ok(pooled) => assert_eq!(*pooled, Uniq(41)),
-912            Err(_) => panic!("not ready"),
-913        };
-914    }
-915
-916    /// Helper to check if the future is ready after polling once.
-917    struct PollOnce<'a, F>(&'a mut F);
-918
-919    impl<F, T, U> Future for PollOnce<'_, F>
-920    where
-921        F: Future<Output = Result<T, U>> + Unpin,
-922    {
-923        type Output = Option<()>;
-924
-925        fn poll(mut self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Self::Output> {
-926            match Pin::new(&mut self.0).poll(cx) {
-927                Poll::Ready(Ok(_)) => Poll::Ready(Some(())),
-928                Poll::Ready(Err(_)) => Poll::Ready(Some(())),
-929                Poll::Pending => Poll::Ready(None),
-930            }
-931        }
-932    }
-933
-934    #[tokio::test]
-935    async fn test_pool_checkout_returns_none_if_expired() {
-936        let pool = pool_no_timer();
-937        let key = host_key("foo");
-938        let pooled = pool.pooled(c(key.clone()), Uniq(41));
-939
-940        drop(pooled);
-941        tokio::time::sleep(pool.locked().timeout.unwrap()).await;
-942        let mut checkout = pool.checkout(key);
-943        let poll_once = PollOnce(&mut checkout);
-944        let is_not_ready = poll_once.await.is_none();
-945        assert!(is_not_ready);
-946    }
-947
-948    #[tokio::test]
-949    async fn test_pool_checkout_removes_expired() {
-950        let pool = pool_no_timer();
-951        let key = host_key("foo");
-952
-953        pool.pooled(c(key.clone()), Uniq(41));
-954        pool.pooled(c(key.clone()), Uniq(5));
-955        pool.pooled(c(key.clone()), Uniq(99));
-956
-957        assert_eq!(
-958            pool.locked().idle.get(&key).map(|entries| entries.len()),
-959            Some(3)
-960        );
-961        tokio::time::sleep(pool.locked().timeout.unwrap()).await;
-962
-963        let mut checkout = pool.checkout(key.clone());
-964        let poll_once = PollOnce(&mut checkout);
-965        // checkout.await should clean out the expired
-966        poll_once.await;
-967        assert!(!pool.locked().idle.contains_key(&key));
-968    }
-969
-970    #[test]
-971    fn test_pool_max_idle_per_host() {
-972        let pool = pool_max_idle_no_timer(2);
-973        let key = host_key("foo");
-974
-975        pool.pooled(c(key.clone()), Uniq(41));
-976        pool.pooled(c(key.clone()), Uniq(5));
-977        pool.pooled(c(key.clone()), Uniq(99));
-978
-979        // pooled and dropped 3, max_idle should only allow 2
-980        assert_eq!(
-981            pool.locked().idle.get(&key).map(|entries| entries.len()),
-982            Some(2)
-983        );
-984    }
-985
-986    #[tokio::test]
-987    async fn test_pool_timer_removes_expired_realtime() {
-988        test_pool_timer_removes_expired_inner().await
-989    }
-990
-991    #[tokio::test(start_paused = true)]
-992    async fn test_pool_timer_removes_expired_faketime() {
-993        test_pool_timer_removes_expired_inner().await
-994    }
-995
-996    async fn test_pool_timer_removes_expired_inner() {
-997        let pool = Pool::new(
-998            super::Config {
-999                idle_timeout: Some(Duration::from_millis(10)),
-1000                max_idle_per_host: usize::MAX,
-1001            },
-1002            TokioExecutor::new(),
-1003            Some(TokioTimer::new()),
-1004        );
-1005
-1006        let key = host_key("foo");
-1007
-1008        pool.pooled(c(key.clone()), Uniq(41));
-1009        pool.pooled(c(key.clone()), Uniq(5));
-1010        pool.pooled(c(key.clone()), Uniq(99));
-1011
-1012        assert_eq!(
-1013            pool.locked().idle.get(&key).map(|entries| entries.len()),
-1014            Some(3)
-1015        );
-1016
-1017        // Let the timer tick passed the expiration...
-1018        tokio::time::sleep(Duration::from_millis(30)).await;
-1019
-1020        // But minimum interval is higher, so nothing should have been reaped
-1021        assert_eq!(
-1022            pool.locked().idle.get(&key).map(|entries| entries.len()),
-1023            Some(3)
-1024        );
-1025
-1026        // Now wait passed the minimum interval more
-1027        tokio::time::sleep(Duration::from_millis(70)).await;
-1028        // Yield in case other task hasn't been able to run :shrug:
-1029        tokio::task::yield_now().await;
-1030
-1031        assert!(!pool.locked().idle.contains_key(&key));
-1032    }
-1033
-1034    #[tokio::test]
-1035    async fn test_pool_checkout_task_unparked() {
-1036        use futures_util::future::join;
-1037        use futures_util::FutureExt;
-1038
-1039        let pool = pool_no_timer();
-1040        let key = host_key("foo");
-1041        let pooled = pool.pooled(c(key.clone()), Uniq(41));
-1042
-1043        let checkout = join(pool.checkout(key), async {
-1044            // the checkout future will park first,
-1045            // and then this lazy future will be polled, which will insert
-1046            // the pooled back into the pool
-1047            //
-1048            // this test makes sure that doing so will unpark the checkout
-1049            drop(pooled);
-1050        })
-1051        .map(|(entry, _)| entry);
-1052
-1053        assert_eq!(*checkout.await.unwrap(), Uniq(41));
-1054    }
-1055
-1056    #[tokio::test]
-1057    async fn test_pool_checkout_drop_cleans_up_waiters() {
-1058        let pool = pool_no_timer::<Uniq<i32>, KeyImpl>();
-1059        let key = host_key("foo");
-1060
-1061        let mut checkout1 = pool.checkout(key.clone());
-1062        let mut checkout2 = pool.checkout(key.clone());
-1063
-1064        let poll_once1 = PollOnce(&mut checkout1);
-1065        let poll_once2 = PollOnce(&mut checkout2);
-1066
-1067        // first poll needed to get into Pool's parked
-1068        poll_once1.await;
-1069        assert_eq!(pool.locked().waiters.get(&key).unwrap().len(), 1);
-1070        poll_once2.await;
-1071        assert_eq!(pool.locked().waiters.get(&key).unwrap().len(), 2);
-1072
-1073        // on drop, clean up Pool
-1074        drop(checkout1);
-1075        assert_eq!(pool.locked().waiters.get(&key).unwrap().len(), 1);
-1076
-1077        drop(checkout2);
-1078        assert!(!pool.locked().waiters.contains_key(&key));
-1079    }
-1080
-1081    #[derive(Debug)]
-1082    struct CanClose {
-1083        #[allow(unused)]
-1084        val: i32,
-1085        closed: bool,
-1086    }
-1087
-1088    impl Poolable for CanClose {
-1089        fn is_open(&self) -> bool {
-1090            !self.closed
-1091        }
-1092
-1093        fn reserve(self) -> Reservation<Self> {
-1094            Reservation::Unique(self)
-1095        }
-1096
-1097        fn can_share(&self) -> bool {
-1098            false
-1099        }
-1100    }
-1101
-1102    #[test]
-1103    fn pooled_drop_if_closed_doesnt_reinsert() {
-1104        let pool = pool_no_timer();
-1105        let key = host_key("foo");
-1106        pool.pooled(
-1107            c(key.clone()),
-1108            CanClose {
-1109                val: 57,
-1110                closed: true,
-1111            },
-1112        );
-1113
-1114        assert!(!pool.locked().idle.contains_key(&key));
-1115    }
-1116}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/client/mod.rs.html b/core/target/doc/src/hyper_util/client/mod.rs.html deleted file mode 100644 index aa653f55..00000000 --- a/core/target/doc/src/hyper_util/client/mod.rs.html +++ /dev/null @@ -1,12 +0,0 @@ -mod.rs - source

hyper_util/client/
mod.rs

1//! HTTP client utilities
-2
-3/// Legacy implementations of `connect` module and `Client`
-4#[cfg(feature = "client-legacy")]
-5pub mod legacy;
-6
-7#[cfg(feature = "client-pool")]
-8pub mod pool;
-9
-10#[cfg(feature = "client-proxy")]
-11pub mod proxy;
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/client/pool/cache.rs.html b/core/target/doc/src/hyper_util/client/pool/cache.rs.html deleted file mode 100644 index 18801ac9..00000000 --- a/core/target/doc/src/hyper_util/client/pool/cache.rs.html +++ /dev/null @@ -1,496 +0,0 @@ -cache.rs - source

hyper_util/client/pool/
cache.rs

1//! A cache of services
-2//!
-3//! The cache is a single list of cached services, bundled with a `MakeService`.
-4//! Calling the cache returns either an existing service, or makes a new one.
-5//! The returned `impl Service` can be used to send requests, and when dropped,
-6//! it will try to be returned back to the cache.
-7
-8pub use self::internal::builder;
-9
-10#[cfg(docsrs)]
-11pub use self::internal::Builder;
-12#[cfg(docsrs)]
-13pub use self::internal::Cache;
-14#[cfg(docsrs)]
-15pub use self::internal::Cached;
-16
-17// For now, nothing else in this module is nameable. We can always make things
-18// more public, but we can't change type shapes (generics) once things are
-19// public.
-20mod internal {
-21    use std::fmt;
-22    use std::future::Future;
-23    use std::pin::Pin;
-24    use std::sync::{Arc, Mutex, Weak};
-25    use std::task::{self, Poll};
-26
-27    use futures_core::ready;
-28    use futures_util::future;
-29    use tokio::sync::oneshot;
-30    use tower_service::Service;
-31
-32    use super::events;
-33
-34    /// Start a builder to construct a `Cache` pool.
-35    pub fn builder() -> Builder<events::Ignore> {
-36        Builder {
-37            events: events::Ignore,
-38        }
-39    }
-40
-41    /// A cache pool of services from the inner make service.
-42    ///
-43    /// Created with [`builder()`].
-44    ///
-45    /// # Unnameable
-46    ///
-47    /// This type is normally unnameable, forbidding naming of the type within
-48    /// code. The type is exposed in the documentation to show which methods
-49    /// can be publicly called.
-50    #[derive(Debug)]
-51    pub struct Cache<M, Dst, Ev>
-52    where
-53        M: Service<Dst>,
-54    {
-55        connector: M,
-56        shared: Arc<Mutex<Shared<M::Response>>>,
-57        events: Ev,
-58    }
-59
-60    /// A builder to configure a `Cache`.
-61    ///
-62    /// # Unnameable
-63    ///
-64    /// This type is normally unnameable, forbidding naming of the type within
-65    /// code. The type is exposed in the documentation to show which methods
-66    /// can be publicly called.
-67    #[derive(Debug)]
-68    pub struct Builder<Ev> {
-69        events: Ev,
-70    }
-71
-72    /// A cached service returned from a [`Cache`].
-73    ///
-74    /// Implements `Service` by delegating to the inner service. Once dropped,
-75    /// tries to reinsert into the `Cache`.
-76    ///
-77    /// # Unnameable
-78    ///
-79    /// This type is normally unnameable, forbidding naming of the type within
-80    /// code. The type is exposed in the documentation to show which methods
-81    /// can be publicly called.
-82    pub struct Cached<S> {
-83        is_closed: bool,
-84        inner: Option<S>,
-85        shared: Weak<Mutex<Shared<S>>>,
-86        // todo: on_idle
-87    }
-88
-89    pub enum CacheFuture<M, Dst, Ev>
-90    where
-91        M: Service<Dst>,
-92    {
-93        Racing {
-94            shared: Arc<Mutex<Shared<M::Response>>>,
-95            select: future::Select<oneshot::Receiver<M::Response>, M::Future>,
-96            events: Ev,
-97        },
-98        Connecting {
-99            // TODO: could be Weak even here...
-100            shared: Arc<Mutex<Shared<M::Response>>>,
-101            future: M::Future,
-102        },
-103        Cached {
-104            svc: Option<Cached<M::Response>>,
-105        },
-106    }
-107
-108    // shouldn't be pub
-109    #[derive(Debug)]
-110    pub struct Shared<S> {
-111        services: Vec<S>,
-112        waiters: Vec<oneshot::Sender<S>>,
-113    }
-114
-115    // impl Builder
-116
-117    impl<Ev> Builder<Ev> {
-118        /// Provide a `Future` executor to be used by the `Cache`.
-119        ///
-120        /// The executor is used handle some optional background tasks that
-121        /// can improve the behavior of the cache, such as reducing connection
-122        /// thrashing when a race is won. If not configured with an executor,
-123        /// the default behavior is to ignore any of these optional background
-124        /// tasks.
-125        ///
-126        /// The executor should implmenent [`hyper::rt::Executor`].
-127        ///
-128        /// # Example
-129        ///
-130        /// ```rust
-131        /// # #[cfg(feature = "tokio")]
-132        /// # fn run() {
-133        /// let builder = hyper_util::client::pool::cache::builder()
-134        ///     .executor(hyper_util::rt::TokioExecutor::new());
-135        /// # }
-136        /// ```
-137        pub fn executor<E>(self, exec: E) -> Builder<events::WithExecutor<E>> {
-138            Builder {
-139                events: events::WithExecutor(exec),
-140            }
-141        }
-142
-143        /// Build a `Cache` pool around the `connector`.
-144        pub fn build<M, Dst>(self, connector: M) -> Cache<M, Dst, Ev>
-145        where
-146            M: Service<Dst>,
-147        {
-148            Cache {
-149                connector,
-150                events: self.events,
-151                shared: Arc::new(Mutex::new(Shared {
-152                    services: Vec::new(),
-153                    waiters: Vec::new(),
-154                })),
-155            }
-156        }
-157    }
-158
-159    // impl Cache
-160
-161    impl<M, Dst, Ev> Cache<M, Dst, Ev>
-162    where
-163        M: Service<Dst>,
-164    {
-165        /// Retain all cached services indicated by the predicate.
-166        pub fn retain<F>(&mut self, predicate: F)
-167        where
-168            F: FnMut(&mut M::Response) -> bool,
-169        {
-170            self.shared.lock().unwrap().services.retain_mut(predicate);
-171        }
-172
-173        /// Check whether this cache has no cached services.
-174        pub fn is_empty(&self) -> bool {
-175            self.shared.lock().unwrap().services.is_empty()
-176        }
-177    }
-178
-179    impl<M, Dst, Ev> Service<Dst> for Cache<M, Dst, Ev>
-180    where
-181        M: Service<Dst>,
-182        M::Future: Unpin,
-183        M::Response: Unpin,
-184        Ev: events::Events<BackgroundConnect<M::Future, M::Response>> + Clone + Unpin,
-185    {
-186        type Response = Cached<M::Response>;
-187        type Error = M::Error;
-188        type Future = CacheFuture<M, Dst, Ev>;
-189
-190        fn poll_ready(&mut self, cx: &mut task::Context<'_>) -> Poll<Result<(), Self::Error>> {
-191            if !self.shared.lock().unwrap().services.is_empty() {
-192                Poll::Ready(Ok(()))
-193            } else {
-194                self.connector.poll_ready(cx)
-195            }
-196        }
-197
-198        fn call(&mut self, target: Dst) -> Self::Future {
-199            // 1. If already cached, easy!
-200            let waiter = {
-201                let mut locked = self.shared.lock().unwrap();
-202                if let Some(found) = locked.take() {
-203                    return CacheFuture::Cached {
-204                        svc: Some(Cached::new(found, Arc::downgrade(&self.shared))),
-205                    };
-206                }
-207
-208                let (tx, rx) = oneshot::channel();
-209                locked.waiters.push(tx);
-210                rx
-211            };
-212
-213            // 2. Otherwise, we start a new connect, and also listen for
-214            //    any newly idle.
-215            CacheFuture::Racing {
-216                shared: self.shared.clone(),
-217                select: future::select(waiter, self.connector.call(target)),
-218                events: self.events.clone(),
-219            }
-220        }
-221    }
-222
-223    impl<M, Dst, Ev> Clone for Cache<M, Dst, Ev>
-224    where
-225        M: Service<Dst> + Clone,
-226        Ev: Clone,
-227    {
-228        fn clone(&self) -> Self {
-229            Self {
-230                connector: self.connector.clone(),
-231                events: self.events.clone(),
-232                shared: self.shared.clone(),
-233            }
-234        }
-235    }
-236
-237    impl<M, Dst, Ev> Future for CacheFuture<M, Dst, Ev>
-238    where
-239        M: Service<Dst>,
-240        M::Future: Unpin,
-241        M::Response: Unpin,
-242        Ev: events::Events<BackgroundConnect<M::Future, M::Response>> + Unpin,
-243    {
-244        type Output = Result<Cached<M::Response>, M::Error>;
-245
-246        fn poll(mut self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Self::Output> {
-247            loop {
-248                match &mut *self.as_mut() {
-249                    CacheFuture::Racing {
-250                        shared,
-251                        select,
-252                        events,
-253                    } => {
-254                        match ready!(Pin::new(select).poll(cx)) {
-255                            future::Either::Left((Err(_pool_closed), connecting)) => {
-256                                // pool was dropped, so we'll never get it from a waiter,
-257                                // but if this future still exists, then the user still
-258                                // wants a connection. just wait for the connecting
-259                                *self = CacheFuture::Connecting {
-260                                    shared: shared.clone(),
-261                                    future: connecting,
-262                                };
-263                            }
-264                            future::Either::Left((Ok(pool_got), connecting)) => {
-265                                events.on_race_lost(BackgroundConnect {
-266                                    future: connecting,
-267                                    shared: Arc::downgrade(&shared),
-268                                });
-269                                return Poll::Ready(Ok(Cached::new(
-270                                    pool_got,
-271                                    Arc::downgrade(&shared),
-272                                )));
-273                            }
-274                            future::Either::Right((connected, _waiter)) => {
-275                                let inner = connected?;
-276                                return Poll::Ready(Ok(Cached::new(
-277                                    inner,
-278                                    Arc::downgrade(&shared),
-279                                )));
-280                            }
-281                        }
-282                    }
-283                    CacheFuture::Connecting { shared, future } => {
-284                        let inner = ready!(Pin::new(future).poll(cx))?;
-285                        return Poll::Ready(Ok(Cached::new(inner, Arc::downgrade(&shared))));
-286                    }
-287                    CacheFuture::Cached { svc } => {
-288                        return Poll::Ready(Ok(svc.take().unwrap()));
-289                    }
-290                }
-291            }
-292        }
-293    }
-294
-295    // impl Cached
-296
-297    impl<S> Cached<S> {
-298        fn new(inner: S, shared: Weak<Mutex<Shared<S>>>) -> Self {
-299            Cached {
-300                is_closed: false,
-301                inner: Some(inner),
-302                shared,
-303            }
-304        }
-305
-306        // TODO: inner()? looks like `tower` likes `get_ref()` and `get_mut()`.
-307
-308        /// Get a reference to the inner service.
-309        pub fn inner(&self) -> &S {
-310            self.inner.as_ref().expect("inner only taken in drop")
-311        }
-312
-313        /// Get a mutable reference to the inner service.
-314        pub fn inner_mut(&mut self) -> &mut S {
-315            self.inner.as_mut().expect("inner only taken in drop")
-316        }
-317    }
-318
-319    impl<S, Req> Service<Req> for Cached<S>
-320    where
-321        S: Service<Req>,
-322    {
-323        type Response = S::Response;
-324        type Error = S::Error;
-325        type Future = S::Future;
-326
-327        fn poll_ready(&mut self, cx: &mut task::Context<'_>) -> Poll<Result<(), Self::Error>> {
-328            self.inner.as_mut().unwrap().poll_ready(cx).map_err(|err| {
-329                self.is_closed = true;
-330                err
-331            })
-332        }
-333
-334        fn call(&mut self, req: Req) -> Self::Future {
-335            self.inner.as_mut().unwrap().call(req)
-336        }
-337    }
-338
-339    impl<S> Drop for Cached<S> {
-340        fn drop(&mut self) {
-341            if self.is_closed {
-342                return;
-343            }
-344            if let Some(value) = self.inner.take() {
-345                if let Some(shared) = self.shared.upgrade() {
-346                    if let Ok(mut shared) = shared.lock() {
-347                        shared.put(value);
-348                    }
-349                }
-350            }
-351        }
-352    }
-353
-354    impl<S: fmt::Debug> fmt::Debug for Cached<S> {
-355        fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-356            f.debug_tuple("Cached")
-357                .field(self.inner.as_ref().unwrap())
-358                .finish()
-359        }
-360    }
-361
-362    // impl Shared
-363
-364    impl<V> Shared<V> {
-365        fn put(&mut self, val: V) {
-366            let mut val = Some(val);
-367            while let Some(tx) = self.waiters.pop() {
-368                if !tx.is_closed() {
-369                    match tx.send(val.take().unwrap()) {
-370                        Ok(()) => break,
-371                        Err(v) => {
-372                            val = Some(v);
-373                        }
-374                    }
-375                }
-376            }
-377
-378            if let Some(val) = val {
-379                self.services.push(val);
-380            }
-381        }
-382
-383        fn take(&mut self) -> Option<V> {
-384            // TODO: take in a loop
-385            self.services.pop()
-386        }
-387    }
-388
-389    pub struct BackgroundConnect<CF, S> {
-390        future: CF,
-391        shared: Weak<Mutex<Shared<S>>>,
-392    }
-393
-394    impl<CF, S, E> Future for BackgroundConnect<CF, S>
-395    where
-396        CF: Future<Output = Result<S, E>> + Unpin,
-397    {
-398        type Output = ();
-399
-400        fn poll(mut self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Self::Output> {
-401            match ready!(Pin::new(&mut self.future).poll(cx)) {
-402                Ok(svc) => {
-403                    if let Some(shared) = self.shared.upgrade() {
-404                        if let Ok(mut locked) = shared.lock() {
-405                            locked.put(svc);
-406                        }
-407                    }
-408                    Poll::Ready(())
-409                }
-410                Err(_e) => Poll::Ready(()),
-411            }
-412        }
-413    }
-414}
-415
-416mod events {
-417    #[derive(Clone, Debug)]
-418    #[non_exhaustive]
-419    pub struct Ignore;
-420
-421    #[derive(Clone, Debug)]
-422    pub struct WithExecutor<E>(pub(super) E);
-423
-424    pub trait Events<CF> {
-425        fn on_race_lost(&self, fut: CF);
-426    }
-427
-428    impl<CF> Events<CF> for Ignore {
-429        fn on_race_lost(&self, _fut: CF) {}
-430    }
-431
-432    impl<E, CF> Events<CF> for WithExecutor<E>
-433    where
-434        E: hyper::rt::Executor<CF>,
-435    {
-436        fn on_race_lost(&self, fut: CF) {
-437            self.0.execute(fut);
-438        }
-439    }
-440}
-441
-442#[cfg(test)]
-443mod tests {
-444    use futures_util::future;
-445    use tower_service::Service;
-446    use tower_test::assert_request_eq;
-447
-448    #[tokio::test]
-449    async fn test_makes_svc_when_empty() {
-450        let (mock, mut handle) = tower_test::mock::pair();
-451        let mut cache = super::builder().build(mock);
-452        handle.allow(1);
-453
-454        crate::common::future::poll_fn(|cx| cache.poll_ready(cx))
-455            .await
-456            .unwrap();
-457
-458        let f = cache.call(1);
-459
-460        future::join(f, async move {
-461            assert_request_eq!(handle, 1).send_response("one");
-462        })
-463        .await
-464        .0
-465        .expect("call");
-466    }
-467
-468    #[tokio::test]
-469    async fn test_reuses_after_idle() {
-470        let (mock, mut handle) = tower_test::mock::pair();
-471        let mut cache = super::builder().build(mock);
-472
-473        // only 1 connection should ever be made
-474        handle.allow(1);
-475
-476        crate::common::future::poll_fn(|cx| cache.poll_ready(cx))
-477            .await
-478            .unwrap();
-479        let f = cache.call(1);
-480        let cached = future::join(f, async {
-481            assert_request_eq!(handle, 1).send_response("one");
-482        })
-483        .await
-484        .0
-485        .expect("call");
-486        drop(cached);
-487
-488        crate::common::future::poll_fn(|cx| cache.poll_ready(cx))
-489            .await
-490            .unwrap();
-491        let f = cache.call(1);
-492        let cached = f.await.expect("call");
-493        drop(cached);
-494    }
-495}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/client/pool/map.rs.html b/core/target/doc/src/hyper_util/client/pool/map.rs.html deleted file mode 100644 index 6d21151a..00000000 --- a/core/target/doc/src/hyper_util/client/pool/map.rs.html +++ /dev/null @@ -1,227 +0,0 @@ -map.rs - source

hyper_util/client/pool/
map.rs

1//! Map pool utilities
-2//!
-3//! The map isn't a typical `Service`, but rather stand-alone type that can map
-4//! requests to a key and  service factory. This is because the service is more
-5//! of a router, and cannot determine which inner service to check for
-6//! backpressure since it's not know until the request is made.
-7//!
-8//! The map implementation allows customization of extracting a key, and how to
-9//! construct a MakeService for that key.
-10//!
-11//! # Example
-12//!
-13//! ```rust,ignore
-14//! # async fn run() {
-15//! # use hyper_util::client::pool;
-16//! # let req = http::Request::new(());
-17//! # let some_http1_connector = || {
-18//! #     tower::service::service_fn(|_req| async { Ok::<_, &'static str>(()) })
-19//! # };
-20//! let mut map = pool::map::Map::builder()
-21//!     .keys(|uri| (uri.scheme().clone(), uri.authority().clone()))
-22//!     .values(|_uri| {
-23//!         some_http1_connector()
-24//!     })
-25//!     .build();
-26//!
-27//! let resp = map.service(req.uri()).call(req).await;
-28//! # }
-29//! ```
-30
-31use std::collections::HashMap;
-32
-33// expose the documentation
-34#[cfg(docsrs)]
-35pub use self::builder::Builder;
-36
-37/// A map caching `MakeService`s per key.
-38///
-39/// Create one with the [`Map::builder()`].
-40pub struct Map<T, Req>
-41where
-42    T: target::Target<Req>,
-43{
-44    map: HashMap<T::Key, T::Service>,
-45    targeter: T,
-46}
-47
-48// impl Map
-49
-50impl Map<builder::StartHere, builder::StartHere> {
-51    /// Create a [`Builder`] to configure a new `Map`.
-52    pub fn builder<Dst>() -> builder::Builder<Dst, builder::WantsKeyer, builder::WantsServiceMaker>
-53    {
-54        builder::Builder::new()
-55    }
-56}
-57
-58impl<T, Req> Map<T, Req>
-59where
-60    T: target::Target<Req>,
-61{
-62    fn new(targeter: T) -> Self {
-63        Map {
-64            map: HashMap::new(),
-65            targeter,
-66        }
-67    }
-68}
-69
-70impl<T, Req> Map<T, Req>
-71where
-72    T: target::Target<Req>,
-73    T::Key: Eq + std::hash::Hash,
-74{
-75    /// Get a service after extracting the key from `req`.
-76    pub fn service(&mut self, req: &Req) -> &mut T::Service {
-77        let key = self.targeter.key(req);
-78        self.map
-79            .entry(key)
-80            .or_insert_with(|| self.targeter.service(req))
-81    }
-82
-83    /// Retains only the services specified by the predicate.
-84    pub fn retain<F>(&mut self, predicate: F)
-85    where
-86        F: FnMut(&T::Key, &mut T::Service) -> bool,
-87    {
-88        self.map.retain(predicate);
-89    }
-90
-91    /// Clears the map, removing all key-value pairs.
-92    pub fn clear(&mut self) {
-93        self.map.clear();
-94    }
-95}
-96
-97// sealed and unnameable for now
-98mod target {
-99    pub trait Target<Dst> {
-100        type Key;
-101        type Service;
-102
-103        fn key(&self, dst: &Dst) -> Self::Key;
-104        fn service(&self, dst: &Dst) -> Self::Service;
-105    }
-106}
-107
-108// sealed and unnameable for now
-109mod builder {
-110    use std::marker::PhantomData;
-111
-112    /// A builder to configure a `Map`.
-113    ///
-114    /// # Unnameable
-115    ///
-116    /// This type is normally unnameable, forbidding naming of the type within
-117    /// code. The type is exposed in the documentation to show which methods
-118    /// can be publicly called.
-119    pub struct Builder<Dst, K, S> {
-120        _dst: PhantomData<fn(Dst)>,
-121        keys: K,
-122        svcs: S,
-123    }
-124
-125    pub struct WantsKeyer;
-126    pub struct WantsServiceMaker;
-127
-128    pub enum StartHere {}
-129
-130    pub struct Built<K, S> {
-131        keys: K,
-132        svcs: S,
-133    }
-134
-135    impl<Dst> Builder<Dst, WantsKeyer, WantsServiceMaker> {
-136        pub(super) fn new() -> Self {
-137            Builder {
-138                _dst: PhantomData,
-139                keys: WantsKeyer,
-140                svcs: WantsServiceMaker,
-141            }
-142        }
-143    }
-144
-145    impl<Dst, S> Builder<Dst, WantsKeyer, S> {
-146        /// Provide a closure that extracts a pool key for the destination.
-147        pub fn keys<K, KK>(self, keyer: K) -> Builder<Dst, K, S>
-148        where
-149            K: Fn(&Dst) -> KK,
-150        {
-151            Builder {
-152                _dst: PhantomData,
-153                keys: keyer,
-154                svcs: self.svcs,
-155            }
-156        }
-157    }
-158
-159    impl<Dst, K> Builder<Dst, K, WantsServiceMaker> {
-160        /// Provide a closure to create a new `MakeService` for the destination.
-161        pub fn values<S, SS>(self, svcs: S) -> Builder<Dst, K, S>
-162        where
-163            S: Fn(&Dst) -> SS,
-164        {
-165            Builder {
-166                _dst: PhantomData,
-167                keys: self.keys,
-168                svcs,
-169            }
-170        }
-171    }
-172
-173    impl<Dst, K, S> Builder<Dst, K, S>
-174    where
-175        Built<K, S>: super::target::Target<Dst>,
-176        <Built<K, S> as super::target::Target<Dst>>::Key: Eq + std::hash::Hash,
-177    {
-178        /// Build the `Map` pool.
-179        pub fn build(self) -> super::Map<Built<K, S>, Dst> {
-180            super::Map::new(Built {
-181                keys: self.keys,
-182                svcs: self.svcs,
-183            })
-184        }
-185    }
-186
-187    impl super::target::Target<StartHere> for StartHere {
-188        type Key = StartHere;
-189        type Service = StartHere;
-190
-191        fn key(&self, _: &StartHere) -> Self::Key {
-192            match *self {}
-193        }
-194
-195        fn service(&self, _: &StartHere) -> Self::Service {
-196            match *self {}
-197        }
-198    }
-199
-200    impl<K, KK, S, SS, Dst> super::target::Target<Dst> for Built<K, S>
-201    where
-202        K: Fn(&Dst) -> KK,
-203        S: Fn(&Dst) -> SS,
-204        KK: Eq + std::hash::Hash,
-205    {
-206        type Key = KK;
-207        type Service = SS;
-208
-209        fn key(&self, dst: &Dst) -> Self::Key {
-210            (self.keys)(dst)
-211        }
-212
-213        fn service(&self, dst: &Dst) -> Self::Service {
-214            (self.svcs)(dst)
-215        }
-216    }
-217}
-218
-219#[cfg(test)]
-220mod tests {
-221    #[test]
-222    fn smoke() {
-223        let mut pool = super::Map::builder().keys(|_| "a").values(|_| "b").build();
-224        pool.service(&"hello");
-225    }
-226}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/client/pool/mod.rs.html b/core/target/doc/src/hyper_util/client/pool/mod.rs.html deleted file mode 100644 index d0e06b29..00000000 --- a/core/target/doc/src/hyper_util/client/pool/mod.rs.html +++ /dev/null @@ -1,11 +0,0 @@ -mod.rs - source

hyper_util/client/pool/
mod.rs

1//! Composable pool services
-2//!
-3//! This module contains various concepts of a connection pool separated into
-4//! their own concerns. This allows for users to compose the layers, along with
-5//! any other layers, when constructing custom connection pools.
-6
-7pub mod cache;
-8pub mod map;
-9pub mod negotiate;
-10pub mod singleton;
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/client/pool/negotiate.rs.html b/core/target/doc/src/hyper_util/client/pool/negotiate.rs.html deleted file mode 100644 index d48fa1e4..00000000 --- a/core/target/doc/src/hyper_util/client/pool/negotiate.rs.html +++ /dev/null @@ -1,640 +0,0 @@ -negotiate.rs - source

hyper_util/client/pool/
negotiate.rs

1//! Negotiate a pool of services
-2//!
-3//! The negotiate pool allows for a service that can decide between two service
-4//! types based on an intermediate return value. It differs from typical
-5//! routing since it doesn't depend on the request, but the response.
-6//!
-7//! The original use case is support ALPN upgrades to HTTP/2, with a fallback
-8//! to HTTP/1.
-9//!
-10//! # Example
-11//!
-12//! ```rust,ignore
-13//! # async fn run() -> Result<(), Box<dyn std::error::Error>> {
-14//! # struct Conn;
-15//! # impl Conn { fn negotiated_protocol(&self) -> &[u8] { b"h2" } }
-16//! # let some_tls_connector = tower::service::service_fn(|_| async move {
-17//! #     Ok::<_, std::convert::Infallible>(Conn)
-18//! # });
-19//! # let http1_layer = tower::layer::layer_fn(|s| s);
-20//! # let http2_layer = tower::layer::layer_fn(|s| s);
-21//! let mut pool = hyper_util::client::pool::negotiate::builder()
-22//!     .connect(some_tls_connector)
-23//!     .inspect(|c| c.negotiated_protocol() == b"h2")
-24//!     .fallback(http1_layer)
-25//!     .upgrade(http2_layer)
-26//!     .build();
-27//!
-28//! // connect
-29//! let mut svc = pool.call(http::Uri::from_static("https://hyper.rs")).await?;
-30//! svc.ready().await;
-31//!
-32//! // http1 or http2 is now set up
-33//! # let some_http_req = http::Request::new(());
-34//! let resp = svc.call(some_http_req).await?;
-35//! # Ok(())
-36//! # }
-37//! ```
-38
-39pub use self::internal::builder;
-40
-41#[cfg(docsrs)]
-42pub use self::internal::Builder;
-43#[cfg(docsrs)]
-44pub use self::internal::Negotiate;
-45#[cfg(docsrs)]
-46pub use self::internal::Negotiated;
-47
-48mod internal {
-49    use std::future::Future;
-50    use std::pin::Pin;
-51    use std::sync::{Arc, Mutex};
-52    use std::task::{self, Poll};
-53
-54    use futures_core::ready;
-55    use pin_project_lite::pin_project;
-56    use tower_layer::Layer;
-57    use tower_service::Service;
-58
-59    type BoxError = Box<dyn std::error::Error + Send + Sync>;
-60
-61    /// A negotiating pool over an inner make service.
-62    ///
-63    /// Created with [`builder()`].
-64    ///
-65    /// # Unnameable
-66    ///
-67    /// This type is normally unnameable, forbidding naming of the type within
-68    /// code. The type is exposed in the documentation to show which methods
-69    /// can be publicly called.
-70    #[derive(Clone)]
-71    pub struct Negotiate<L, R> {
-72        left: L,
-73        right: R,
-74    }
-75
-76    /// A negotiated service returned by [`Negotiate`].
-77    ///
-78    /// # Unnameable
-79    ///
-80    /// This type is normally unnameable, forbidding naming of the type within
-81    /// code. The type is exposed in the documentation to show which methods
-82    /// can be publicly called.
-83    #[derive(Clone, Debug)]
-84    pub enum Negotiated<L, R> {
-85        #[doc(hidden)]
-86        Fallback(L),
-87        #[doc(hidden)]
-88        Upgraded(R),
-89    }
-90
-91    pin_project! {
-92        pub struct Negotiating<Dst, L, R>
-93        where
-94            L: Service<Dst>,
-95            R: Service<()>,
-96        {
-97            #[pin]
-98            state: State<Dst, L::Future, R::Future>,
-99            left: L,
-100            right: R,
-101        }
-102    }
-103
-104    pin_project! {
-105        #[project = StateProj]
-106        enum State<Dst, FL, FR> {
-107            Eager {
-108                #[pin]
-109                future: FR,
-110                dst: Option<Dst>,
-111            },
-112            Fallback {
-113                #[pin]
-114                future: FL,
-115            },
-116            Upgrade {
-117                #[pin]
-118                future: FR,
-119            }
-120        }
-121    }
-122
-123    pin_project! {
-124        #[project = NegotiatedProj]
-125        pub enum NegotiatedFuture<L, R> {
-126            Fallback {
-127                #[pin]
-128                future: L
-129            },
-130            Upgraded {
-131                #[pin]
-132                future: R
-133            },
-134        }
-135    }
-136
-137    /// A builder to configure a `Negotiate`.
-138    ///
-139    /// # Unnameable
-140    ///
-141    /// This type is normally unnameable, forbidding naming of the type within
-142    /// code. The type is exposed in the documentation to show which methods
-143    /// can be publicly called.
-144    #[derive(Debug)]
-145    pub struct Builder<C, I, L, R> {
-146        connect: C,
-147        inspect: I,
-148        fallback: L,
-149        upgrade: R,
-150    }
-151
-152    #[derive(Debug)]
-153    pub struct WantsConnect;
-154    #[derive(Debug)]
-155    pub struct WantsInspect;
-156    #[derive(Debug)]
-157    pub struct WantsFallback;
-158    #[derive(Debug)]
-159    pub struct WantsUpgrade;
-160
-161    /// Start a builder to construct a `Negotiate` pool.
-162    pub fn builder() -> Builder<WantsConnect, WantsInspect, WantsFallback, WantsUpgrade> {
-163        Builder {
-164            connect: WantsConnect,
-165            inspect: WantsInspect,
-166            fallback: WantsFallback,
-167            upgrade: WantsUpgrade,
-168        }
-169    }
-170
-171    impl<C, I, L, R> Builder<C, I, L, R> {
-172        /// Provide the initial connector.
-173        pub fn connect<CC>(self, connect: CC) -> Builder<CC, I, L, R> {
-174            Builder {
-175                connect,
-176                inspect: self.inspect,
-177                fallback: self.fallback,
-178                upgrade: self.upgrade,
-179            }
-180        }
-181
-182        /// Provide the inspector that determines the result of the negotiation.
-183        pub fn inspect<II>(self, inspect: II) -> Builder<C, II, L, R> {
-184            Builder {
-185                connect: self.connect,
-186                inspect,
-187                fallback: self.fallback,
-188                upgrade: self.upgrade,
-189            }
-190        }
-191
-192        /// Provide the layer to fallback to if negotiation fails.
-193        pub fn fallback<LL>(self, fallback: LL) -> Builder<C, I, LL, R> {
-194            Builder {
-195                connect: self.connect,
-196                inspect: self.inspect,
-197                fallback,
-198                upgrade: self.upgrade,
-199            }
-200        }
-201
-202        /// Provide the layer to upgrade to if negotiation succeeds.
-203        pub fn upgrade<RR>(self, upgrade: RR) -> Builder<C, I, L, RR> {
-204            Builder {
-205                connect: self.connect,
-206                inspect: self.inspect,
-207                fallback: self.fallback,
-208                upgrade,
-209            }
-210        }
-211
-212        /// Build the `Negotiate` pool.
-213        pub fn build<Dst>(self) -> Negotiate<L::Service, R::Service>
-214        where
-215            C: Service<Dst>,
-216            C::Error: Into<BoxError>,
-217            L: Layer<Inspector<C, C::Response, I>>,
-218            L::Service: Service<Dst> + Clone,
-219            <L::Service as Service<Dst>>::Error: Into<BoxError>,
-220            R: Layer<Inspected<C::Response>>,
-221            R::Service: Service<()> + Clone,
-222            <R::Service as Service<()>>::Error: Into<BoxError>,
-223            I: Fn(&C::Response) -> bool + Clone,
-224        {
-225            let Builder {
-226                connect,
-227                inspect,
-228                fallback,
-229                upgrade,
-230            } = self;
-231
-232            let slot = Arc::new(Mutex::new(None));
-233            let wrapped = Inspector {
-234                svc: connect,
-235                inspect,
-236                slot: slot.clone(),
-237            };
-238            let left = fallback.layer(wrapped);
-239
-240            let right = upgrade.layer(Inspected { slot });
-241
-242            Negotiate { left, right }
-243        }
-244    }
-245
-246    impl<L, R> Negotiate<L, R> {
-247        /// Get a mutable reference to the fallback service.
-248        pub fn fallback_mut(&mut self) -> &mut L {
-249            &mut self.left
-250        }
-251
-252        /// Get a mutable reference to the upgrade service.
-253        pub fn upgrade_mut(&mut self) -> &mut R {
-254            &mut self.right
-255        }
-256    }
-257
-258    impl<L, R, Target> Service<Target> for Negotiate<L, R>
-259    where
-260        L: Service<Target> + Clone,
-261        L::Error: Into<BoxError>,
-262        R: Service<()> + Clone,
-263        R::Error: Into<BoxError>,
-264    {
-265        type Response = Negotiated<L::Response, R::Response>;
-266        type Error = BoxError;
-267        type Future = Negotiating<Target, L, R>;
-268
-269        fn poll_ready(&mut self, cx: &mut task::Context<'_>) -> Poll<Result<(), Self::Error>> {
-270            self.left.poll_ready(cx).map_err(Into::into)
-271        }
-272
-273        fn call(&mut self, dst: Target) -> Self::Future {
-274            let left = self.left.clone();
-275            Negotiating {
-276                state: State::Eager {
-277                    future: self.right.call(()),
-278                    dst: Some(dst),
-279                },
-280                // place clone, take original that we already polled-ready.
-281                left: std::mem::replace(&mut self.left, left),
-282                right: self.right.clone(),
-283            }
-284        }
-285    }
-286
-287    impl<Dst, L, R> Future for Negotiating<Dst, L, R>
-288    where
-289        L: Service<Dst>,
-290        L::Error: Into<BoxError>,
-291        R: Service<()>,
-292        R::Error: Into<BoxError>,
-293    {
-294        type Output = Result<Negotiated<L::Response, R::Response>, BoxError>;
-295
-296        fn poll(self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Self::Output> {
-297            // States:
-298            // - `Eager`: try the "right" path first; on `UseOther` sentinel, fall back to left.
-299            // - `Fallback`: try the left path; on `UseOther` sentinel, upgrade back to right.
-300            // - `Upgrade`: retry the right path after a fallback.
-301            // If all fail, give up.
-302            let mut me = self.project();
-303            loop {
-304                match me.state.as_mut().project() {
-305                    StateProj::Eager { future, dst } => match ready!(future.poll(cx)) {
-306                        Ok(out) => return Poll::Ready(Ok(Negotiated::Upgraded(out))),
-307                        Err(err) => {
-308                            let err = err.into();
-309                            if UseOther::is(&*err) {
-310                                let dst = dst.take().unwrap();
-311                                let f = me.left.call(dst);
-312                                me.state.set(State::Fallback { future: f });
-313                                continue;
-314                            } else {
-315                                return Poll::Ready(Err(err));
-316                            }
-317                        }
-318                    },
-319                    StateProj::Fallback { future } => match ready!(future.poll(cx)) {
-320                        Ok(out) => return Poll::Ready(Ok(Negotiated::Fallback(out))),
-321                        Err(err) => {
-322                            let err = err.into();
-323                            if UseOther::is(&*err) {
-324                                let f = me.right.call(());
-325                                me.state.set(State::Upgrade { future: f });
-326                                continue;
-327                            } else {
-328                                return Poll::Ready(Err(err));
-329                            }
-330                        }
-331                    },
-332                    StateProj::Upgrade { future } => match ready!(future.poll(cx)) {
-333                        Ok(out) => return Poll::Ready(Ok(Negotiated::Upgraded(out))),
-334                        Err(err) => return Poll::Ready(Err(err.into())),
-335                    },
-336                }
-337            }
-338        }
-339    }
-340
-341    impl<L, R> Negotiated<L, R> {
-342        // Could be useful?
-343        #[cfg(test)]
-344        pub(super) fn is_fallback(&self) -> bool {
-345            matches!(self, Negotiated::Fallback(_))
-346        }
-347
-348        #[cfg(test)]
-349        pub(super) fn is_upgraded(&self) -> bool {
-350            matches!(self, Negotiated::Upgraded(_))
-351        }
-352
-353        // TODO: are these the correct methods? Or .as_ref().fallback(), etc?
-354
-355        /// Get a reference to the fallback service if this is it.
-356        pub fn fallback_ref(&self) -> Option<&L> {
-357            if let Negotiated::Fallback(ref left) = self {
-358                Some(left)
-359            } else {
-360                None
-361            }
-362        }
-363
-364        /// Get a mutable reference to the fallback service if this is it.
-365        pub fn fallback_mut(&mut self) -> Option<&mut L> {
-366            if let Negotiated::Fallback(ref mut left) = self {
-367                Some(left)
-368            } else {
-369                None
-370            }
-371        }
-372
-373        /// Get a reference to the upgraded service if this is it.
-374        pub fn upgraded_ref(&self) -> Option<&R> {
-375            if let Negotiated::Upgraded(ref right) = self {
-376                Some(right)
-377            } else {
-378                None
-379            }
-380        }
-381
-382        /// Get a mutable reference to the upgraded service if this is it.
-383        pub fn upgraded_mut(&mut self) -> Option<&mut R> {
-384            if let Negotiated::Upgraded(ref mut right) = self {
-385                Some(right)
-386            } else {
-387                None
-388            }
-389        }
-390    }
-391
-392    impl<L, R, Req, Res, E> Service<Req> for Negotiated<L, R>
-393    where
-394        L: Service<Req, Response = Res, Error = E>,
-395        R: Service<Req, Response = Res, Error = E>,
-396    {
-397        type Response = Res;
-398        type Error = E;
-399        type Future = NegotiatedFuture<L::Future, R::Future>;
-400
-401        fn poll_ready(&mut self, cx: &mut task::Context<'_>) -> Poll<Result<(), Self::Error>> {
-402            match self {
-403                Negotiated::Fallback(ref mut s) => s.poll_ready(cx),
-404                Negotiated::Upgraded(ref mut s) => s.poll_ready(cx),
-405            }
-406        }
-407
-408        fn call(&mut self, req: Req) -> Self::Future {
-409            match self {
-410                Negotiated::Fallback(ref mut s) => NegotiatedFuture::Fallback {
-411                    future: s.call(req),
-412                },
-413                Negotiated::Upgraded(ref mut s) => NegotiatedFuture::Upgraded {
-414                    future: s.call(req),
-415                },
-416            }
-417        }
-418    }
-419
-420    impl<L, R, Out> Future for NegotiatedFuture<L, R>
-421    where
-422        L: Future<Output = Out>,
-423        R: Future<Output = Out>,
-424    {
-425        type Output = Out;
-426
-427        fn poll(self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Self::Output> {
-428            match self.project() {
-429                NegotiatedProj::Fallback { future } => future.poll(cx),
-430                NegotiatedProj::Upgraded { future } => future.poll(cx),
-431            }
-432        }
-433    }
-434
-435    // ===== internal =====
-436
-437    pub struct Inspector<M, S, I> {
-438        svc: M,
-439        inspect: I,
-440        slot: Arc<Mutex<Option<S>>>,
-441    }
-442
-443    pin_project! {
-444        pub struct InspectFuture<F, S, I> {
-445            #[pin]
-446            future: F,
-447            inspect: I,
-448            slot: Arc<Mutex<Option<S>>>,
-449        }
-450    }
-451
-452    impl<M: Clone, S, I: Clone> Clone for Inspector<M, S, I> {
-453        fn clone(&self) -> Self {
-454            Self {
-455                svc: self.svc.clone(),
-456                inspect: self.inspect.clone(),
-457                slot: self.slot.clone(),
-458            }
-459        }
-460    }
-461
-462    impl<M, S, I, Target> Service<Target> for Inspector<M, S, I>
-463    where
-464        M: Service<Target, Response = S>,
-465        M::Error: Into<BoxError>,
-466        I: Clone + Fn(&S) -> bool,
-467    {
-468        type Response = M::Response;
-469        type Error = BoxError;
-470        type Future = InspectFuture<M::Future, S, I>;
-471
-472        fn poll_ready(&mut self, cx: &mut task::Context<'_>) -> Poll<Result<(), Self::Error>> {
-473            self.svc.poll_ready(cx).map_err(Into::into)
-474        }
-475
-476        fn call(&mut self, dst: Target) -> Self::Future {
-477            InspectFuture {
-478                future: self.svc.call(dst),
-479                inspect: self.inspect.clone(),
-480                slot: self.slot.clone(),
-481            }
-482        }
-483    }
-484
-485    impl<F, I, S, E> Future for InspectFuture<F, S, I>
-486    where
-487        F: Future<Output = Result<S, E>>,
-488        E: Into<BoxError>,
-489        I: Fn(&S) -> bool,
-490    {
-491        type Output = Result<S, BoxError>;
-492
-493        fn poll(self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Self::Output> {
-494            let me = self.project();
-495            let s = ready!(me.future.poll(cx)).map_err(Into::into)?;
-496            Poll::Ready(if (me.inspect)(&s) {
-497                *me.slot.lock().unwrap() = Some(s);
-498                Err(UseOther.into())
-499            } else {
-500                Ok(s)
-501            })
-502        }
-503    }
-504
-505    pub struct Inspected<S> {
-506        slot: Arc<Mutex<Option<S>>>,
-507    }
-508
-509    impl<S, Target> Service<Target> for Inspected<S> {
-510        type Response = S;
-511        type Error = BoxError;
-512        type Future = std::future::Ready<Result<S, BoxError>>;
-513
-514        fn poll_ready(&mut self, _cx: &mut task::Context<'_>) -> Poll<Result<(), Self::Error>> {
-515            if self.slot.lock().unwrap().is_some() {
-516                Poll::Ready(Ok(()))
-517            } else {
-518                Poll::Ready(Err(UseOther.into()))
-519            }
-520        }
-521
-522        fn call(&mut self, _dst: Target) -> Self::Future {
-523            let s = self
-524                .slot
-525                .lock()
-526                .unwrap()
-527                .take()
-528                .ok_or_else(|| UseOther.into());
-529            std::future::ready(s)
-530        }
-531    }
-532
-533    impl<S> Clone for Inspected<S> {
-534        fn clone(&self) -> Inspected<S> {
-535            Inspected {
-536                slot: self.slot.clone(),
-537            }
-538        }
-539    }
-540
-541    #[derive(Debug)]
-542    struct UseOther;
-543
-544    impl std::fmt::Display for UseOther {
-545        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-546            f.write_str("sentinel error; using other")
-547        }
-548    }
-549
-550    impl std::error::Error for UseOther {}
-551
-552    impl UseOther {
-553        fn is(err: &(dyn std::error::Error + 'static)) -> bool {
-554            let mut source = Some(err);
-555            while let Some(err) = source {
-556                if err.is::<UseOther>() {
-557                    return true;
-558                }
-559                source = err.source();
-560            }
-561            false
-562        }
-563    }
-564}
-565
-566#[cfg(test)]
-567mod tests {
-568    use futures_util::future;
-569    use tower_service::Service;
-570    use tower_test::assert_request_eq;
-571
-572    #[tokio::test]
-573    async fn not_negotiated_falls_back_to_left() {
-574        let (mock_svc, mut handle) = tower_test::mock::pair::<(), &'static str>();
-575
-576        let mut negotiate = super::builder()
-577            .connect(mock_svc)
-578            .inspect(|_: &&str| false)
-579            .fallback(layer_fn(|s| s))
-580            .upgrade(layer_fn(|s| s))
-581            .build();
-582
-583        crate::common::future::poll_fn(|cx| negotiate.poll_ready(cx))
-584            .await
-585            .unwrap();
-586
-587        let fut = negotiate.call(());
-588        let nsvc = future::join(fut, async move {
-589            assert_request_eq!(handle, ()).send_response("one");
-590        })
-591        .await
-592        .0
-593        .expect("call");
-594        assert!(nsvc.is_fallback());
-595    }
-596
-597    #[tokio::test]
-598    async fn negotiated_uses_right() {
-599        let (mock_svc, mut handle) = tower_test::mock::pair::<(), &'static str>();
-600
-601        let mut negotiate = super::builder()
-602            .connect(mock_svc)
-603            .inspect(|_: &&str| true)
-604            .fallback(layer_fn(|s| s))
-605            .upgrade(layer_fn(|s| s))
-606            .build();
-607
-608        crate::common::future::poll_fn(|cx| negotiate.poll_ready(cx))
-609            .await
-610            .unwrap();
-611
-612        let fut = negotiate.call(());
-613        let nsvc = future::join(fut, async move {
-614            assert_request_eq!(handle, ()).send_response("one");
-615        })
-616        .await
-617        .0
-618        .expect("call");
-619
-620        assert!(nsvc.is_upgraded());
-621    }
-622
-623    fn layer_fn<F>(f: F) -> LayerFn<F> {
-624        LayerFn(f)
-625    }
-626
-627    #[derive(Clone)]
-628    struct LayerFn<F>(F);
-629
-630    impl<F, S, Out> tower_layer::Layer<S> for LayerFn<F>
-631    where
-632        F: Fn(S) -> Out,
-633    {
-634        type Service = Out;
-635        fn layer(&self, inner: S) -> Self::Service {
-636            (self.0)(inner)
-637        }
-638    }
-639}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/client/pool/singleton.rs.html b/core/target/doc/src/hyper_util/client/pool/singleton.rs.html deleted file mode 100644 index ca2fbfa0..00000000 --- a/core/target/doc/src/hyper_util/client/pool/singleton.rs.html +++ /dev/null @@ -1,494 +0,0 @@ -singleton.rs - source

hyper_util/client/pool/
singleton.rs

1//! Singleton pools
-2//!
-3//! This ensures that only one active connection is made.
-4//!
-5//! The singleton pool wraps a `MakeService<T, Req>` so that it only produces a
-6//! single `Service<Req>`. It bundles all concurrent calls to it, so that only
-7//! one connection is made. All calls to the singleton will return a clone of
-8//! the inner service once established.
-9//!
-10//! This fits the HTTP/2 case well.
-11//!
-12//! ## Example
-13//!
-14//! ```rust,ignore
-15//! let mut pool = Singleton::new(some_make_svc);
-16//!
-17//! let svc1 = pool.call(some_dst).await?;
-18//!
-19//! let svc2 = pool.call(some_dst).await?;
-20//! // svc1 == svc2
-21//! ```
-22
-23use std::sync::{Arc, Mutex};
-24use std::task::{self, Poll};
-25
-26use tokio::sync::oneshot;
-27use tower_service::Service;
-28
-29use self::internal::{DitchGuard, SingletonError, SingletonFuture, State};
-30
-31type BoxError = Box<dyn std::error::Error + Send + Sync>;
-32
-33#[cfg(docsrs)]
-34pub use self::internal::Singled;
-35
-36/// A singleton pool over an inner service.
-37///
-38/// The singleton wraps an inner service maker, bundling all calls to ensure
-39/// only one service is created. Once made, it returns clones of the made
-40/// service.
-41#[derive(Debug)]
-42pub struct Singleton<M, Dst>
-43where
-44    M: Service<Dst>,
-45{
-46    mk_svc: M,
-47    state: Arc<Mutex<State<M::Response>>>,
-48}
-49
-50impl<M, Target> Singleton<M, Target>
-51where
-52    M: Service<Target>,
-53    M::Response: Clone,
-54{
-55    /// Create a new singleton pool over an inner make service.
-56    pub fn new(mk_svc: M) -> Self {
-57        Singleton {
-58            mk_svc,
-59            state: Arc::new(Mutex::new(State::Empty)),
-60        }
-61    }
-62
-63    // pub fn clear? cancel?
-64
-65    /// Retains the inner made service if specified by the predicate.
-66    pub fn retain<F>(&mut self, mut predicate: F)
-67    where
-68        F: FnMut(&mut M::Response) -> bool,
-69    {
-70        let mut locked = self.state.lock().unwrap();
-71        match *locked {
-72            State::Empty => {}
-73            State::Making(..) => {}
-74            State::Made(ref mut svc) => {
-75                if !predicate(svc) {
-76                    *locked = State::Empty;
-77                }
-78            }
-79        }
-80    }
-81
-82    /// Returns whether this singleton pool is empty.
-83    ///
-84    /// If this pool has created a shared instance, or is currently in the
-85    /// process of creating one, this returns false.
-86    pub fn is_empty(&self) -> bool {
-87        matches!(*self.state.lock().unwrap(), State::Empty)
-88    }
-89}
-90
-91impl<M, Target> Service<Target> for Singleton<M, Target>
-92where
-93    M: Service<Target>,
-94    M::Response: Clone,
-95    M::Error: Into<BoxError>,
-96{
-97    type Response = internal::Singled<M::Response>;
-98    type Error = SingletonError;
-99    type Future = SingletonFuture<M::Future, M::Response>;
-100
-101    fn poll_ready(&mut self, cx: &mut task::Context<'_>) -> Poll<Result<(), Self::Error>> {
-102        if let State::Empty = *self.state.lock().unwrap() {
-103            return self
-104                .mk_svc
-105                .poll_ready(cx)
-106                .map_err(|e| SingletonError(e.into()));
-107        }
-108        Poll::Ready(Ok(()))
-109    }
-110
-111    fn call(&mut self, dst: Target) -> Self::Future {
-112        let mut locked = self.state.lock().unwrap();
-113        match *locked {
-114            State::Empty => {
-115                let fut = self.mk_svc.call(dst);
-116                *locked = State::Making(Vec::new());
-117                SingletonFuture::Driving {
-118                    future: fut,
-119                    singleton: DitchGuard(Arc::downgrade(&self.state)),
-120                }
-121            }
-122            State::Making(ref mut waiters) => {
-123                let (tx, rx) = oneshot::channel();
-124                waiters.push(tx);
-125                SingletonFuture::Waiting {
-126                    rx,
-127                    state: Arc::downgrade(&self.state),
-128                }
-129            }
-130            State::Made(ref svc) => SingletonFuture::Made {
-131                svc: Some(svc.clone()),
-132                state: Arc::downgrade(&self.state),
-133            },
-134        }
-135    }
-136}
-137
-138impl<M, Target> Clone for Singleton<M, Target>
-139where
-140    M: Service<Target> + Clone,
-141{
-142    fn clone(&self) -> Self {
-143        Self {
-144            mk_svc: self.mk_svc.clone(),
-145            state: self.state.clone(),
-146        }
-147    }
-148}
-149
-150// Holds some "pub" items that otherwise shouldn't be public.
-151mod internal {
-152    use std::future::Future;
-153    use std::pin::Pin;
-154    use std::sync::{Mutex, Weak};
-155    use std::task::{self, Poll};
-156
-157    use futures_core::ready;
-158    use pin_project_lite::pin_project;
-159    use tokio::sync::oneshot;
-160    use tower_service::Service;
-161
-162    use super::BoxError;
-163
-164    pin_project! {
-165        #[project = SingletonFutureProj]
-166        pub enum SingletonFuture<F, S> {
-167            Driving {
-168                #[pin]
-169                future: F,
-170                singleton: DitchGuard<S>,
-171            },
-172            Waiting {
-173                rx: oneshot::Receiver<S>,
-174                state: Weak<Mutex<State<S>>>,
-175            },
-176            Made {
-177                svc: Option<S>,
-178                state: Weak<Mutex<State<S>>>,
-179            },
-180        }
-181    }
-182
-183    // XXX: pub because of the enum SingletonFuture
-184    #[derive(Debug)]
-185    pub enum State<S> {
-186        Empty,
-187        Making(Vec<oneshot::Sender<S>>),
-188        Made(S),
-189    }
-190
-191    // XXX: pub because of the enum SingletonFuture
-192    pub struct DitchGuard<S>(pub(super) Weak<Mutex<State<S>>>);
-193
-194    /// A cached service returned from a [`Singleton`].
-195    ///
-196    /// Implements `Service` by delegating to the inner service. If
-197    /// `poll_ready` returns an error, this will clear the cache in the related
-198    /// `Singleton`.
-199    ///
-200    /// [`Singleton`]: super::Singleton
-201    ///
-202    /// # Unnameable
-203    ///
-204    /// This type is normally unnameable, forbidding naming of the type within
-205    /// code. The type is exposed in the documentation to show which methods
-206    /// can be publicly called.
-207    #[derive(Debug)]
-208    pub struct Singled<S> {
-209        inner: S,
-210        state: Weak<Mutex<State<S>>>,
-211    }
-212
-213    impl<F, S, E> Future for SingletonFuture<F, S>
-214    where
-215        F: Future<Output = Result<S, E>>,
-216        E: Into<BoxError>,
-217        S: Clone,
-218    {
-219        type Output = Result<Singled<S>, SingletonError>;
-220
-221        fn poll(self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Self::Output> {
-222            match self.project() {
-223                SingletonFutureProj::Driving { future, singleton } => {
-224                    match ready!(future.poll(cx)) {
-225                        Ok(svc) => {
-226                            if let Some(state) = singleton.0.upgrade() {
-227                                let mut locked = state.lock().unwrap();
-228                                match std::mem::replace(&mut *locked, State::Made(svc.clone())) {
-229                                    State::Making(waiters) => {
-230                                        for tx in waiters {
-231                                            let _ = tx.send(svc.clone());
-232                                        }
-233                                    }
-234                                    State::Empty | State::Made(_) => {
-235                                        // shouldn't happen!
-236                                        unreachable!()
-237                                    }
-238                                }
-239                            }
-240                            // take out of the DitchGuard so it doesn't treat as "ditched"
-241                            let state = std::mem::replace(&mut singleton.0, Weak::new());
-242                            Poll::Ready(Ok(Singled::new(svc, state)))
-243                        }
-244                        Err(e) => {
-245                            if let Some(state) = singleton.0.upgrade() {
-246                                let mut locked = state.lock().unwrap();
-247                                singleton.0 = Weak::new();
-248                                *locked = State::Empty;
-249                            }
-250                            Poll::Ready(Err(SingletonError(e.into())))
-251                        }
-252                    }
-253                }
-254                SingletonFutureProj::Waiting { rx, state } => match ready!(Pin::new(rx).poll(cx)) {
-255                    Ok(svc) => Poll::Ready(Ok(Singled::new(svc, state.clone()))),
-256                    Err(_canceled) => Poll::Ready(Err(SingletonError(Canceled.into()))),
-257                },
-258                SingletonFutureProj::Made { svc, state } => {
-259                    Poll::Ready(Ok(Singled::new(svc.take().unwrap(), state.clone())))
-260                }
-261            }
-262        }
-263    }
-264
-265    impl<S> Drop for DitchGuard<S> {
-266        fn drop(&mut self) {
-267            if let Some(state) = self.0.upgrade() {
-268                if let Ok(mut locked) = state.lock() {
-269                    *locked = State::Empty;
-270                }
-271            }
-272        }
-273    }
-274
-275    impl<S> Singled<S> {
-276        fn new(inner: S, state: Weak<Mutex<State<S>>>) -> Self {
-277            Singled { inner, state }
-278        }
-279    }
-280
-281    impl<S, Req> Service<Req> for Singled<S>
-282    where
-283        S: Service<Req>,
-284    {
-285        type Response = S::Response;
-286        type Error = S::Error;
-287        type Future = S::Future;
-288
-289        fn poll_ready(&mut self, cx: &mut task::Context<'_>) -> Poll<Result<(), Self::Error>> {
-290            // We notice if the cached service dies, and clear the singleton cache.
-291            match self.inner.poll_ready(cx) {
-292                Poll::Ready(Err(err)) => {
-293                    if let Some(state) = self.state.upgrade() {
-294                        *state.lock().unwrap() = State::Empty;
-295                    }
-296                    Poll::Ready(Err(err))
-297                }
-298                other => other,
-299            }
-300        }
-301
-302        fn call(&mut self, req: Req) -> Self::Future {
-303            self.inner.call(req)
-304        }
-305    }
-306
-307    // An opaque error type. By not exposing the type, nor being specifically
-308    // Box<dyn Error>, we can _change_ the type once we no longer need the Canceled
-309    // error type. This will be possible with the refactor to baton passing.
-310    #[derive(Debug)]
-311    pub struct SingletonError(pub(super) BoxError);
-312
-313    impl std::fmt::Display for SingletonError {
-314        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-315            f.write_str("singleton connection error")
-316        }
-317    }
-318
-319    impl std::error::Error for SingletonError {
-320        fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
-321            Some(&*self.0)
-322        }
-323    }
-324
-325    #[derive(Debug)]
-326    struct Canceled;
-327
-328    impl std::fmt::Display for Canceled {
-329        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-330            f.write_str("singleton connection canceled")
-331        }
-332    }
-333
-334    impl std::error::Error for Canceled {}
-335}
-336
-337#[cfg(test)]
-338mod tests {
-339    use std::future::Future;
-340    use std::pin::Pin;
-341    use std::task::Poll;
-342
-343    use tower_service::Service;
-344
-345    use super::Singleton;
-346
-347    #[tokio::test]
-348    async fn first_call_drives_subsequent_wait() {
-349        let (mock_svc, mut handle) = tower_test::mock::pair::<(), &'static str>();
-350
-351        let mut singleton = Singleton::new(mock_svc);
-352
-353        handle.allow(1);
-354        crate::common::future::poll_fn(|cx| singleton.poll_ready(cx))
-355            .await
-356            .unwrap();
-357        // First call: should go into Driving
-358        let fut1 = singleton.call(());
-359        // Second call: should go into Waiting
-360        let fut2 = singleton.call(());
-361
-362        // Expect exactly one request to the inner service
-363        let ((), send_response) = handle.next_request().await.unwrap();
-364        send_response.send_response("svc");
-365
-366        // Both futures should resolve to the same value
-367        fut1.await.unwrap();
-368        fut2.await.unwrap();
-369    }
-370
-371    #[tokio::test]
-372    async fn made_state_returns_immediately() {
-373        let (mock_svc, mut handle) = tower_test::mock::pair::<(), &'static str>();
-374        let mut singleton = Singleton::new(mock_svc);
-375
-376        handle.allow(1);
-377        crate::common::future::poll_fn(|cx| singleton.poll_ready(cx))
-378            .await
-379            .unwrap();
-380        // Drive first call to completion
-381        let fut1 = singleton.call(());
-382        let ((), send_response) = handle.next_request().await.unwrap();
-383        send_response.send_response("svc");
-384        fut1.await.unwrap();
-385
-386        // Second call should not hit inner service
-387        singleton.call(()).await.unwrap();
-388    }
-389
-390    #[tokio::test]
-391    async fn cached_service_poll_ready_error_clears_singleton() {
-392        // Outer mock returns an inner mock service
-393        let (outer, mut outer_handle) =
-394            tower_test::mock::pair::<(), tower_test::mock::Mock<(), &'static str>>();
-395        let mut singleton = Singleton::new(outer);
-396
-397        // Allow the singleton to be made
-398        outer_handle.allow(2);
-399        crate::common::future::poll_fn(|cx| singleton.poll_ready(cx))
-400            .await
-401            .unwrap();
-402
-403        // First call produces an inner mock service
-404        let fut1 = singleton.call(());
-405        let ((), send_inner) = outer_handle.next_request().await.unwrap();
-406        let (inner, mut inner_handle) = tower_test::mock::pair::<(), &'static str>();
-407        send_inner.send_response(inner);
-408        let mut cached = fut1.await.unwrap();
-409
-410        // Now: allow readiness on the inner mock, then inject error
-411        inner_handle.allow(1);
-412
-413        // Inject error so next poll_ready fails
-414        inner_handle.send_error(std::io::Error::new(
-415            std::io::ErrorKind::Other,
-416            "cached poll_ready failed",
-417        ));
-418
-419        // Drive poll_ready on cached service
-420        let err = crate::common::future::poll_fn(|cx| cached.poll_ready(cx))
-421            .await
-422            .err()
-423            .expect("expected poll_ready error");
-424        assert_eq!(err.to_string(), "cached poll_ready failed");
-425
-426        // After error, the singleton should be cleared, so a new call drives outer again
-427        outer_handle.allow(1);
-428        crate::common::future::poll_fn(|cx| singleton.poll_ready(cx))
-429            .await
-430            .unwrap();
-431        let fut2 = singleton.call(());
-432        let ((), send_inner2) = outer_handle.next_request().await.unwrap();
-433        let (inner2, mut inner_handle2) = tower_test::mock::pair::<(), &'static str>();
-434        send_inner2.send_response(inner2);
-435        let mut cached2 = fut2.await.unwrap();
-436
-437        // The new cached service should still work
-438        inner_handle2.allow(1);
-439        crate::common::future::poll_fn(|cx| cached2.poll_ready(cx))
-440            .await
-441            .expect("expected poll_ready");
-442        let cfut2 = cached2.call(());
-443        let ((), send_cached2) = inner_handle2.next_request().await.unwrap();
-444        send_cached2.send_response("svc2");
-445        cfut2.await.unwrap();
-446    }
-447
-448    #[tokio::test]
-449    async fn cancel_waiter_does_not_affect_others() {
-450        let (mock_svc, mut handle) = tower_test::mock::pair::<(), &'static str>();
-451        let mut singleton = Singleton::new(mock_svc);
-452
-453        crate::common::future::poll_fn(|cx| singleton.poll_ready(cx))
-454            .await
-455            .unwrap();
-456        let fut1 = singleton.call(());
-457        let fut2 = singleton.call(());
-458        drop(fut2); // cancel one waiter
-459
-460        let ((), send_response) = handle.next_request().await.unwrap();
-461        send_response.send_response("svc");
-462
-463        fut1.await.unwrap();
-464    }
-465
-466    // TODO: this should be able to be improved with a cooperative baton refactor
-467    #[tokio::test]
-468    async fn cancel_driver_cancels_all() {
-469        let (mock_svc, mut handle) = tower_test::mock::pair::<(), &'static str>();
-470        let mut singleton = Singleton::new(mock_svc);
-471
-472        crate::common::future::poll_fn(|cx| singleton.poll_ready(cx))
-473            .await
-474            .unwrap();
-475        let mut fut1 = singleton.call(());
-476        let fut2 = singleton.call(());
-477
-478        // poll driver just once, and then drop
-479        crate::common::future::poll_fn(move |cx| {
-480            let _ = Pin::new(&mut fut1).poll(cx);
-481            Poll::Ready(())
-482        })
-483        .await;
-484
-485        let ((), send_response) = handle.next_request().await.unwrap();
-486        send_response.send_response("svc");
-487
-488        assert_eq!(
-489            fut2.await.unwrap_err().0.to_string(),
-490            "singleton connection canceled"
-491        );
-492    }
-493}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/client/proxy/matcher.rs.html b/core/target/doc/src/hyper_util/client/proxy/matcher.rs.html deleted file mode 100644 index 4b32fb28..00000000 --- a/core/target/doc/src/hyper_util/client/proxy/matcher.rs.html +++ /dev/null @@ -1,870 +0,0 @@ -matcher.rs - source

hyper_util/client/proxy/
matcher.rs

1//! Proxy matchers
-2//!
-3//! This module contains different matchers to configure rules for when a proxy
-4//! should be used, and if so, with what arguments.
-5//!
-6//! A [`Matcher`] can be constructed either using environment variables, or
-7//! a [`Matcher::builder()`].
-8//!
-9//! Once constructed, the `Matcher` can be asked if it intercepts a `Uri` by
-10//! calling [`Matcher::intercept()`].
-11//!
-12//! An [`Intercept`] includes the destination for the proxy, and any parsed
-13//! authentication to be used.
-14
-15use std::fmt;
-16use std::net::IpAddr;
-17
-18use http::header::HeaderValue;
-19use ipnet::IpNet;
-20use percent_encoding::percent_decode_str;
-21
-22#[cfg(docsrs)]
-23pub use self::builder::IntoValue;
-24#[cfg(not(docsrs))]
-25use self::builder::IntoValue;
-26
-27/// A proxy matcher, usually built from environment variables.
-28pub struct Matcher {
-29    http: Option<Intercept>,
-30    https: Option<Intercept>,
-31    no: NoProxy,
-32}
-33
-34/// A matched proxy,
-35///
-36/// This is returned by a matcher if a proxy should be used.
-37#[derive(Clone)]
-38pub struct Intercept {
-39    uri: http::Uri,
-40    auth: Auth,
-41}
-42
-43/// A builder to create a [`Matcher`].
-44///
-45/// Construct with [`Matcher::builder()`].
-46#[derive(Default)]
-47pub struct Builder {
-48    is_cgi: bool,
-49    all: String,
-50    http: String,
-51    https: String,
-52    no: String,
-53}
-54
-55#[derive(Clone)]
-56enum Auth {
-57    Empty,
-58    Basic(http::header::HeaderValue),
-59    Raw(String, String),
-60}
-61
-62/// A filter for proxy matchers.
-63///
-64/// This type is based off the `NO_PROXY` rules used by curl.
-65#[derive(Clone, Debug, Default)]
-66struct NoProxy {
-67    ips: IpMatcher,
-68    domains: DomainMatcher,
-69}
-70
-71#[derive(Clone, Debug, Default)]
-72struct DomainMatcher(Vec<String>);
-73
-74#[derive(Clone, Debug, Default)]
-75struct IpMatcher(Vec<Ip>);
-76
-77#[derive(Clone, Debug)]
-78enum Ip {
-79    Address(IpAddr),
-80    Network(IpNet),
-81}
-82
-83// ===== impl Matcher =====
-84
-85impl Matcher {
-86    /// Create a matcher reading the current environment variables.
-87    ///
-88    /// This checks for values in the following variables, treating them the
-89    /// same as curl does:
-90    ///
-91    /// - `ALL_PROXY`/`all_proxy`
-92    /// - `HTTPS_PROXY`/`https_proxy`
-93    /// - `HTTP_PROXY`/`http_proxy`
-94    /// - `NO_PROXY`/`no_proxy`
-95    pub fn from_env() -> Self {
-96        Builder::from_env().build()
-97    }
-98
-99    /// Create a matcher from the environment or system.
-100    ///
-101    /// This checks the same environment variables as `from_env()`, and if not
-102    /// set, checks the system configuration for values for the OS.
-103    ///
-104    /// This constructor is always available, but if the `client-proxy-system`
-105    /// feature is enabled, it will check more configuration. Use this
-106    /// constructor if you want to allow users to optionally enable more, or
-107    /// use `from_env` if you do not want the values to change based on an
-108    /// enabled feature.
-109    pub fn from_system() -> Self {
-110        Builder::from_system().build()
-111    }
-112
-113    /// Start a builder to configure a matcher.
-114    pub fn builder() -> Builder {
-115        Builder::default()
-116    }
-117
-118    /// Check if the destination should be intercepted by a proxy.
-119    ///
-120    /// If the proxy rules match the destination, a new `Uri` will be returned
-121    /// to connect to.
-122    pub fn intercept(&self, dst: &http::Uri) -> Option<Intercept> {
-123        // TODO(perf): don't need to check `no` if below doesn't match...
-124        if self.no.contains(dst.host()?) {
-125            return None;
-126        }
-127
-128        match dst.scheme_str() {
-129            Some("http") => self.http.clone(),
-130            Some("https") => self.https.clone(),
-131            _ => None,
-132        }
-133    }
-134}
-135
-136impl fmt::Debug for Matcher {
-137    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-138        let mut b = f.debug_struct("Matcher");
-139
-140        if let Some(ref http) = self.http {
-141            b.field("http", http);
-142        }
-143
-144        if let Some(ref https) = self.https {
-145            b.field("https", https);
-146        }
-147
-148        if !self.no.is_empty() {
-149            b.field("no", &self.no);
-150        }
-151        b.finish()
-152    }
-153}
-154
-155// ===== impl Intercept =====
-156
-157impl Intercept {
-158    /// Get the `http::Uri` for the target proxy.
-159    pub fn uri(&self) -> &http::Uri {
-160        &self.uri
-161    }
-162
-163    /// Get any configured basic authorization.
-164    ///
-165    /// This should usually be used with a `Proxy-Authorization` header, to
-166    /// send in Basic format.
-167    ///
-168    /// # Example
-169    ///
-170    /// ```rust
-171    /// # use hyper_util::client::proxy::matcher::Matcher;
-172    /// # let uri = http::Uri::from_static("https://hyper.rs");
-173    /// let m = Matcher::builder()
-174    ///     .all("https://Aladdin:opensesame@localhost:8887")
-175    ///     .build();
-176    ///
-177    /// let proxy = m.intercept(&uri).expect("example");
-178    /// let auth = proxy.basic_auth().expect("example");
-179    /// assert_eq!(auth, "Basic QWxhZGRpbjpvcGVuc2VzYW1l");
-180    /// ```
-181    pub fn basic_auth(&self) -> Option<&HeaderValue> {
-182        if let Auth::Basic(ref val) = self.auth {
-183            Some(val)
-184        } else {
-185            None
-186        }
-187    }
-188
-189    /// Get any configured raw authorization.
-190    ///
-191    /// If not detected as another scheme, this is the username and password
-192    /// that should be sent with whatever protocol the proxy handshake uses.
-193    ///
-194    /// # Example
-195    ///
-196    /// ```rust
-197    /// # use hyper_util::client::proxy::matcher::Matcher;
-198    /// # let uri = http::Uri::from_static("https://hyper.rs");
-199    /// let m = Matcher::builder()
-200    ///     .all("socks5h://Aladdin:opensesame@localhost:8887")
-201    ///     .build();
-202    ///
-203    /// let proxy = m.intercept(&uri).expect("example");
-204    /// let auth = proxy.raw_auth().expect("example");
-205    /// assert_eq!(auth, ("Aladdin", "opensesame"));
-206    /// ```
-207    pub fn raw_auth(&self) -> Option<(&str, &str)> {
-208        if let Auth::Raw(ref u, ref p) = self.auth {
-209            Some((u.as_str(), p.as_str()))
-210        } else {
-211            None
-212        }
-213    }
-214}
-215
-216impl fmt::Debug for Intercept {
-217    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-218        f.debug_struct("Intercept")
-219            .field("uri", &self.uri)
-220            // dont output auth, its sensitive
-221            .finish()
-222    }
-223}
-224
-225// ===== impl Builder =====
-226
-227impl Builder {
-228    fn from_env() -> Self {
-229        Builder {
-230            is_cgi: std::env::var_os("REQUEST_METHOD").is_some(),
-231            all: get_first_env(&["ALL_PROXY", "all_proxy"]),
-232            http: get_first_env(&["HTTP_PROXY", "http_proxy"]),
-233            https: get_first_env(&["HTTPS_PROXY", "https_proxy"]),
-234            no: get_first_env(&["NO_PROXY", "no_proxy"]),
-235        }
-236    }
-237
-238    fn from_system() -> Self {
-239        #[allow(unused_mut)]
-240        let mut builder = Self::from_env();
-241
-242        #[cfg(all(feature = "client-proxy-system", target_os = "macos"))]
-243        mac::with_system(&mut builder);
-244
-245        #[cfg(all(feature = "client-proxy-system", windows))]
-246        win::with_system(&mut builder);
-247
-248        builder
-249    }
-250
-251    /// Set the target proxy for all destinations.
-252    pub fn all<S>(mut self, val: S) -> Self
-253    where
-254        S: IntoValue,
-255    {
-256        self.all = val.into_value();
-257        self
-258    }
-259
-260    /// Set the target proxy for HTTP destinations.
-261    pub fn http<S>(mut self, val: S) -> Self
-262    where
-263        S: IntoValue,
-264    {
-265        self.http = val.into_value();
-266        self
-267    }
-268
-269    /// Set the target proxy for HTTPS destinations.
-270    pub fn https<S>(mut self, val: S) -> Self
-271    where
-272        S: IntoValue,
-273    {
-274        self.https = val.into_value();
-275        self
-276    }
-277
-278    /// Set the "no" proxy filter.
-279    ///
-280    /// The rules are as follows:
-281    /// * Entries are expected to be comma-separated (whitespace between entries is ignored)
-282    /// * IP addresses (both IPv4 and IPv6) are allowed, as are optional subnet masks (by adding /size,
-283    ///   for example "`192.168.1.0/24`").
-284    /// * An entry "`*`" matches all hostnames (this is the only wildcard allowed)
-285    /// * Any other entry is considered a domain name (and may contain a leading dot, for example `google.com`
-286    ///   and `.google.com` are equivalent) and would match both that domain AND all subdomains.
-287    ///
-288    /// For example, if `"NO_PROXY=google.com, 192.168.1.0/24"` was set, all of the following would match
-289    /// (and therefore would bypass the proxy):
-290    /// * `http://google.com/`
-291    /// * `http://www.google.com/`
-292    /// * `http://192.168.1.42/`
-293    ///
-294    /// The URL `http://notgoogle.com/` would not match.
-295    pub fn no<S>(mut self, val: S) -> Self
-296    where
-297        S: IntoValue,
-298    {
-299        self.no = val.into_value();
-300        self
-301    }
-302
-303    /// Construct a [`Matcher`] using the configured values.
-304    pub fn build(self) -> Matcher {
-305        if self.is_cgi {
-306            return Matcher {
-307                http: None,
-308                https: None,
-309                no: NoProxy::empty(),
-310            };
-311        }
-312
-313        let all = parse_env_uri(&self.all);
-314
-315        Matcher {
-316            http: parse_env_uri(&self.http).or_else(|| all.clone()),
-317            https: parse_env_uri(&self.https).or(all),
-318            no: NoProxy::from_string(&self.no),
-319        }
-320    }
-321}
-322
-323fn get_first_env(names: &[&str]) -> String {
-324    for name in names {
-325        if let Ok(val) = std::env::var(name) {
-326            return val;
-327        }
-328    }
-329
-330    String::new()
-331}
-332
-333fn parse_env_uri(val: &str) -> Option<Intercept> {
-334    use std::borrow::Cow;
-335
-336    let uri = val.parse::<http::Uri>().ok()?;
-337    let mut builder = http::Uri::builder();
-338    let mut is_httpish = false;
-339    let mut auth = Auth::Empty;
-340
-341    builder = builder.scheme(match uri.scheme() {
-342        Some(s) => {
-343            if s == &http::uri::Scheme::HTTP || s == &http::uri::Scheme::HTTPS {
-344                is_httpish = true;
-345                s.clone()
-346            } else if matches!(s.as_str(), "socks4" | "socks4a" | "socks5" | "socks5h") {
-347                s.clone()
-348            } else {
-349                // can't use this proxy scheme
-350                return None;
-351            }
-352        }
-353        // if no scheme provided, assume they meant 'http'
-354        None => {
-355            is_httpish = true;
-356            http::uri::Scheme::HTTP
-357        }
-358    });
-359
-360    let authority = uri.authority()?;
-361
-362    if let Some((userinfo, host_port)) = authority.as_str().split_once('@') {
-363        let (user, pass) = match userinfo.split_once(':') {
-364            Some((user, pass)) => (user, Some(pass)),
-365            None => (userinfo, None),
-366        };
-367        let user = percent_decode_str(user).decode_utf8_lossy();
-368        let pass = pass.map(|pass| percent_decode_str(pass).decode_utf8_lossy());
-369        if is_httpish {
-370            auth = Auth::Basic(encode_basic_auth(&user, pass.as_deref()));
-371        } else {
-372            auth = Auth::Raw(
-373                user.into_owned(),
-374                pass.map_or_else(String::new, Cow::into_owned),
-375            );
-376        }
-377        builder = builder.authority(host_port);
-378    } else {
-379        builder = builder.authority(authority.clone());
-380    }
-381
-382    // removing any path, but we MUST specify one or the builder errors
-383    builder = builder.path_and_query("/");
-384
-385    let dst = builder.build().ok()?;
-386
-387    Some(Intercept { uri: dst, auth })
-388}
-389
-390fn encode_basic_auth(user: &str, pass: Option<&str>) -> HeaderValue {
-391    use base64::prelude::BASE64_STANDARD;
-392    use base64::write::EncoderWriter;
-393    use std::io::Write;
-394
-395    let mut buf = b"Basic ".to_vec();
-396    {
-397        let mut encoder = EncoderWriter::new(&mut buf, &BASE64_STANDARD);
-398        let _ = write!(encoder, "{user}:");
-399        if let Some(password) = pass {
-400            let _ = write!(encoder, "{password}");
-401        }
-402    }
-403    let mut header = HeaderValue::from_bytes(&buf).expect("base64 is always valid HeaderValue");
-404    header.set_sensitive(true);
-405    header
-406}
-407
-408impl NoProxy {
-409    /*
-410    fn from_env() -> NoProxy {
-411        let raw = std::env::var("NO_PROXY")
-412            .or_else(|_| std::env::var("no_proxy"))
-413            .unwrap_or_default();
-414
-415        Self::from_string(&raw)
-416    }
-417    */
-418
-419    fn empty() -> NoProxy {
-420        NoProxy {
-421            ips: IpMatcher(Vec::new()),
-422            domains: DomainMatcher(Vec::new()),
-423        }
-424    }
-425
-426    /// Returns a new no-proxy configuration based on a `no_proxy` string (or `None` if no variables
-427    /// are set)
-428    /// The rules are as follows:
-429    /// * The environment variable `NO_PROXY` is checked, if it is not set, `no_proxy` is checked
-430    /// * If neither environment variable is set, `None` is returned
-431    /// * Entries are expected to be comma-separated (whitespace between entries is ignored)
-432    /// * IP addresses (both IPv4 and IPv6) are allowed, as are optional subnet masks (by adding /size,
-433    ///   for example "`192.168.1.0/24`").
-434    /// * An entry "`*`" matches all hostnames (this is the only wildcard allowed)
-435    /// * Any other entry is considered a domain name (and may contain a leading dot, for example `google.com`
-436    ///   and `.google.com` are equivalent) and would match both that domain AND all subdomains.
-437    ///
-438    /// For example, if `"NO_PROXY=google.com, 192.168.1.0/24"` was set, all of the following would match
-439    /// (and therefore would bypass the proxy):
-440    /// * `http://google.com/`
-441    /// * `http://www.google.com/`
-442    /// * `http://192.168.1.42/`
-443    ///
-444    /// The URL `http://notgoogle.com/` would not match.
-445    pub fn from_string(no_proxy_list: &str) -> Self {
-446        let mut ips = Vec::new();
-447        let mut domains = Vec::new();
-448        let parts = no_proxy_list.split(',').map(str::trim);
-449        for part in parts {
-450            match part.parse::<IpNet>() {
-451                // If we can parse an IP net or address, then use it, otherwise, assume it is a domain
-452                Ok(ip) => ips.push(Ip::Network(ip)),
-453                Err(_) => match part.parse::<IpAddr>() {
-454                    Ok(addr) => ips.push(Ip::Address(addr)),
-455                    Err(_) => {
-456                        if !part.trim().is_empty() {
-457                            domains.push(part.to_owned())
-458                        }
-459                    }
-460                },
-461            }
-462        }
-463        NoProxy {
-464            ips: IpMatcher(ips),
-465            domains: DomainMatcher(domains),
-466        }
-467    }
-468
-469    /// Return true if this matches the host (domain or IP).
-470    pub fn contains(&self, host: &str) -> bool {
-471        // According to RFC3986, raw IPv6 hosts will be wrapped in []. So we need to strip those off
-472        // the end in order to parse correctly
-473        let host = if host.starts_with('[') {
-474            let x: &[_] = &['[', ']'];
-475            host.trim_matches(x)
-476        } else {
-477            host
-478        };
-479        match host.parse::<IpAddr>() {
-480            // If we can parse an IP addr, then use it, otherwise, assume it is a domain
-481            Ok(ip) => self.ips.contains(ip),
-482            Err(_) => self.domains.contains(host),
-483        }
-484    }
-485
-486    fn is_empty(&self) -> bool {
-487        self.ips.0.is_empty() && self.domains.0.is_empty()
-488    }
-489}
-490
-491impl IpMatcher {
-492    fn contains(&self, addr: IpAddr) -> bool {
-493        for ip in &self.0 {
-494            match ip {
-495                Ip::Address(address) => {
-496                    if &addr == address {
-497                        return true;
-498                    }
-499                }
-500                Ip::Network(net) => {
-501                    if net.contains(&addr) {
-502                        return true;
-503                    }
-504                }
-505            }
-506        }
-507        false
-508    }
-509}
-510
-511impl DomainMatcher {
-512    // The following links may be useful to understand the origin of these rules:
-513    // * https://curl.se/libcurl/c/CURLOPT_NOPROXY.html
-514    // * https://github.com/curl/curl/issues/1208
-515    fn contains(&self, domain: &str) -> bool {
-516        let domain_len = domain.len();
-517        for d in &self.0 {
-518            if d == domain || d.strip_prefix('.') == Some(domain) {
-519                return true;
-520            } else if domain.ends_with(d) {
-521                if d.starts_with('.') {
-522                    // If the first character of d is a dot, that means the first character of domain
-523                    // must also be a dot, so we are looking at a subdomain of d and that matches
-524                    return true;
-525                } else if domain.as_bytes().get(domain_len - d.len() - 1) == Some(&b'.') {
-526                    // Given that d is a prefix of domain, if the prior character in domain is a dot
-527                    // then that means we must be matching a subdomain of d, and that matches
-528                    return true;
-529                }
-530            } else if d == "*" {
-531                return true;
-532            }
-533        }
-534        false
-535    }
-536}
-537
-538mod builder {
-539    /// A type that can used as a `Builder` value.
-540    ///
-541    /// Private and sealed, only visible in docs.
-542    pub trait IntoValue {
-543        #[doc(hidden)]
-544        fn into_value(self) -> String;
-545    }
-546
-547    impl IntoValue for String {
-548        #[doc(hidden)]
-549        fn into_value(self) -> String {
-550            self
-551        }
-552    }
-553
-554    impl IntoValue for &String {
-555        #[doc(hidden)]
-556        fn into_value(self) -> String {
-557            self.into()
-558        }
-559    }
-560
-561    impl IntoValue for &str {
-562        #[doc(hidden)]
-563        fn into_value(self) -> String {
-564            self.into()
-565        }
-566    }
-567}
-568
-569#[cfg(feature = "client-proxy-system")]
-570#[cfg(target_os = "macos")]
-571mod mac {
-572    use system_configuration::core_foundation::base::{CFType, TCFType, TCFTypeRef};
-573    use system_configuration::core_foundation::dictionary::CFDictionary;
-574    use system_configuration::core_foundation::number::CFNumber;
-575    use system_configuration::core_foundation::string::{CFString, CFStringRef};
-576    use system_configuration::dynamic_store::SCDynamicStoreBuilder;
-577    use system_configuration::sys::schema_definitions::{
-578        kSCPropNetProxiesHTTPEnable, kSCPropNetProxiesHTTPPort, kSCPropNetProxiesHTTPProxy,
-579        kSCPropNetProxiesHTTPSEnable, kSCPropNetProxiesHTTPSPort, kSCPropNetProxiesHTTPSProxy,
-580    };
-581
-582    pub(super) fn with_system(builder: &mut super::Builder) {
-583        let store = SCDynamicStoreBuilder::new("").build();
-584
-585        let proxies_map = if let Some(proxies_map) = store.get_proxies() {
-586            proxies_map
-587        } else {
-588            return;
-589        };
-590
-591        if builder.http.is_empty() {
-592            let http_proxy_config = parse_setting_from_dynamic_store(
-593                &proxies_map,
-594                unsafe { kSCPropNetProxiesHTTPEnable },
-595                unsafe { kSCPropNetProxiesHTTPProxy },
-596                unsafe { kSCPropNetProxiesHTTPPort },
-597            );
-598            if let Some(http) = http_proxy_config {
-599                builder.http = http;
-600            }
-601        }
-602
-603        if builder.https.is_empty() {
-604            let https_proxy_config = parse_setting_from_dynamic_store(
-605                &proxies_map,
-606                unsafe { kSCPropNetProxiesHTTPSEnable },
-607                unsafe { kSCPropNetProxiesHTTPSProxy },
-608                unsafe { kSCPropNetProxiesHTTPSPort },
-609            );
-610
-611            if let Some(https) = https_proxy_config {
-612                builder.https = https;
-613            }
-614        }
-615    }
-616
-617    fn parse_setting_from_dynamic_store(
-618        proxies_map: &CFDictionary<CFString, CFType>,
-619        enabled_key: CFStringRef,
-620        host_key: CFStringRef,
-621        port_key: CFStringRef,
-622    ) -> Option<String> {
-623        let proxy_enabled = proxies_map
-624            .find(enabled_key)
-625            .and_then(|flag| flag.downcast::<CFNumber>())
-626            .and_then(|flag| flag.to_i32())
-627            .unwrap_or(0)
-628            == 1;
-629
-630        if proxy_enabled {
-631            let proxy_host = proxies_map
-632                .find(host_key)
-633                .and_then(|host| host.downcast::<CFString>())
-634                .map(|host| host.to_string());
-635            let proxy_port = proxies_map
-636                .find(port_key)
-637                .and_then(|port| port.downcast::<CFNumber>())
-638                .and_then(|port| port.to_i32());
-639
-640            return match (proxy_host, proxy_port) {
-641                (Some(proxy_host), Some(proxy_port)) => Some(format!("{proxy_host}:{proxy_port}")),
-642                (Some(proxy_host), None) => Some(proxy_host),
-643                (None, Some(_)) => None,
-644                (None, None) => None,
-645            };
-646        }
-647
-648        None
-649    }
-650}
-651
-652#[cfg(feature = "client-proxy-system")]
-653#[cfg(windows)]
-654mod win {
-655    pub(super) fn with_system(builder: &mut super::Builder) {
-656        let settings = if let Ok(settings) = windows_registry::CURRENT_USER
-657            .open("Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings")
-658        {
-659            settings
-660        } else {
-661            return;
-662        };
-663
-664        if settings.get_u32("ProxyEnable").unwrap_or(0) == 0 {
-665            return;
-666        }
-667
-668        if let Ok(val) = settings.get_string("ProxyServer") {
-669            if builder.http.is_empty() {
-670                builder.http = val.clone();
-671            }
-672            if builder.https.is_empty() {
-673                builder.https = val;
-674            }
-675        }
-676
-677        if builder.no.is_empty() {
-678            if let Ok(val) = settings.get_string("ProxyOverride") {
-679                builder.no = val
-680                    .split(';')
-681                    .map(|s| s.trim())
-682                    .collect::<Vec<&str>>()
-683                    .join(",")
-684                    .replace("*.", "");
-685            }
-686        }
-687    }
-688}
-689
-690#[cfg(test)]
-691mod tests {
-692    use super::*;
-693
-694    #[test]
-695    fn test_domain_matcher() {
-696        let domains = vec![".foo.bar".into(), "bar.foo".into()];
-697        let matcher = DomainMatcher(domains);
-698
-699        // domains match with leading `.`
-700        assert!(matcher.contains("foo.bar"));
-701        // subdomains match with leading `.`
-702        assert!(matcher.contains("www.foo.bar"));
-703
-704        // domains match with no leading `.`
-705        assert!(matcher.contains("bar.foo"));
-706        // subdomains match with no leading `.`
-707        assert!(matcher.contains("www.bar.foo"));
-708
-709        // non-subdomain string prefixes don't match
-710        assert!(!matcher.contains("notfoo.bar"));
-711        assert!(!matcher.contains("notbar.foo"));
-712    }
-713
-714    #[test]
-715    fn test_no_proxy_wildcard() {
-716        let no_proxy = NoProxy::from_string("*");
-717        assert!(no_proxy.contains("any.where"));
-718    }
-719
-720    #[test]
-721    fn test_no_proxy_ip_ranges() {
-722        let no_proxy =
-723            NoProxy::from_string(".foo.bar, bar.baz,10.42.1.1/24,::1,10.124.7.8,2001::/17");
-724
-725        let should_not_match = [
-726            // random url, not in no_proxy
-727            "hyper.rs",
-728            // make sure that random non-subdomain string prefixes don't match
-729            "notfoo.bar",
-730            // make sure that random non-subdomain string prefixes don't match
-731            "notbar.baz",
-732            // ipv4 address out of range
-733            "10.43.1.1",
-734            // ipv4 address out of range
-735            "10.124.7.7",
-736            // ipv6 address out of range
-737            "[ffff:db8:a0b:12f0::1]",
-738            // ipv6 address out of range
-739            "[2005:db8:a0b:12f0::1]",
-740        ];
-741
-742        for host in &should_not_match {
-743            assert!(!no_proxy.contains(host), "should not contain {host:?}");
-744        }
-745
-746        let should_match = [
-747            // make sure subdomains (with leading .) match
-748            "hello.foo.bar",
-749            // make sure exact matches (without leading .) match (also makes sure spaces between entries work)
-750            "bar.baz",
-751            // make sure subdomains (without leading . in no_proxy) match
-752            "foo.bar.baz",
-753            // make sure subdomains (without leading . in no_proxy) match - this differs from cURL
-754            "foo.bar",
-755            // ipv4 address match within range
-756            "10.42.1.100",
-757            // ipv6 address exact match
-758            "[::1]",
-759            // ipv6 address match within range
-760            "[2001:db8:a0b:12f0::1]",
-761            // ipv4 address exact match
-762            "10.124.7.8",
-763        ];
-764
-765        for host in &should_match {
-766            assert!(no_proxy.contains(host), "should contain {host:?}");
-767        }
-768    }
-769
-770    macro_rules! p {
-771        ($($n:ident = $v:expr,)*) => ({Builder {
-772            $($n: $v.into(),)*
-773            ..Builder::default()
-774        }.build()});
-775    }
-776
-777    fn intercept(p: &Matcher, u: &str) -> Intercept {
-778        p.intercept(&u.parse().unwrap()).unwrap()
-779    }
-780
-781    #[test]
-782    fn test_all_proxy() {
-783        let p = p! {
-784            all = "http://om.nom",
-785        };
-786
-787        assert_eq!("http://om.nom", intercept(&p, "http://example.com").uri());
-788
-789        assert_eq!("http://om.nom", intercept(&p, "https://example.com").uri());
-790    }
-791
-792    #[test]
-793    fn test_specific_overrides_all() {
-794        let p = p! {
-795            all = "http://no.pe",
-796            http = "http://y.ep",
-797        };
-798
-799        assert_eq!("http://no.pe", intercept(&p, "https://example.com").uri());
-800
-801        // the http rule is "more specific" than the all rule
-802        assert_eq!("http://y.ep", intercept(&p, "http://example.com").uri());
-803    }
-804
-805    #[test]
-806    fn test_parse_no_scheme_defaults_to_http() {
-807        let p = p! {
-808            https = "y.ep",
-809            http = "127.0.0.1:8887",
-810        };
-811
-812        assert_eq!(intercept(&p, "https://example.local").uri(), "http://y.ep");
-813        assert_eq!(
-814            intercept(&p, "http://example.local").uri(),
-815            "http://127.0.0.1:8887"
-816        );
-817    }
-818
-819    #[test]
-820    fn test_parse_http_auth() {
-821        let p = p! {
-822            all = "http://Aladdin:opensesame@y.ep",
-823        };
-824
-825        let proxy = intercept(&p, "https://example.local");
-826        assert_eq!(proxy.uri(), "http://y.ep");
-827        assert_eq!(
-828            proxy.basic_auth().expect("basic_auth"),
-829            "Basic QWxhZGRpbjpvcGVuc2VzYW1l"
-830        );
-831    }
-832
-833    #[test]
-834    fn test_parse_http_auth_without_password() {
-835        let p = p! {
-836            all = "http://Aladdin@y.ep",
-837        };
-838        let proxy = intercept(&p, "https://example.local");
-839        assert_eq!(proxy.uri(), "http://y.ep");
-840        assert_eq!(
-841            proxy.basic_auth().expect("basic_auth"),
-842            "Basic QWxhZGRpbjo="
-843        );
-844    }
-845
-846    #[test]
-847    fn test_parse_http_auth_without_scheme() {
-848        let p = p! {
-849            all = "Aladdin:opensesame@y.ep",
-850        };
-851
-852        let proxy = intercept(&p, "https://example.local");
-853        assert_eq!(proxy.uri(), "http://y.ep");
-854        assert_eq!(
-855            proxy.basic_auth().expect("basic_auth"),
-856            "Basic QWxhZGRpbjpvcGVuc2VzYW1l"
-857        );
-858    }
-859
-860    #[test]
-861    fn test_dont_parse_http_when_is_cgi() {
-862        let mut builder = Matcher::builder();
-863        builder.is_cgi = true;
-864        builder.http = "http://never.gonna.let.you.go".into();
-865        let m = builder.build();
-866
-867        assert!(m.intercept(&"http://rick.roll".parse().unwrap()).is_none());
-868    }
-869}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/client/proxy/mod.rs.html b/core/target/doc/src/hyper_util/client/proxy/mod.rs.html deleted file mode 100644 index fe5660a4..00000000 --- a/core/target/doc/src/hyper_util/client/proxy/mod.rs.html +++ /dev/null @@ -1,4 +0,0 @@ -mod.rs - source

hyper_util/client/proxy/
mod.rs

1//! Proxy utilities
-2
-3pub mod matcher;
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/common/exec.rs.html b/core/target/doc/src/hyper_util/common/exec.rs.html deleted file mode 100644 index 4d3f0beb..00000000 --- a/core/target/doc/src/hyper_util/common/exec.rs.html +++ /dev/null @@ -1,54 +0,0 @@ -exec.rs - source

hyper_util/common/
exec.rs

1#![allow(dead_code)]
-2
-3use hyper::rt::Executor;
-4use std::fmt;
-5use std::future::Future;
-6use std::pin::Pin;
-7use std::sync::Arc;
-8
-9pub(crate) type BoxSendFuture = Pin<Box<dyn Future<Output = ()> + Send>>;
-10
-11// Either the user provides an executor for background tasks, or we use
-12// `tokio::spawn`.
-13#[derive(Clone)]
-14pub(crate) enum Exec {
-15    Executor(Arc<dyn Executor<BoxSendFuture> + Send + Sync>),
-16}
-17
-18// ===== impl Exec =====
-19
-20impl Exec {
-21    pub(crate) fn new<E>(inner: E) -> Self
-22    where
-23        E: Executor<BoxSendFuture> + Send + Sync + 'static,
-24    {
-25        Exec::Executor(Arc::new(inner))
-26    }
-27
-28    pub(crate) fn execute<F>(&self, fut: F)
-29    where
-30        F: Future<Output = ()> + Send + 'static,
-31    {
-32        match *self {
-33            Exec::Executor(ref e) => {
-34                e.execute(Box::pin(fut));
-35            }
-36        }
-37    }
-38}
-39
-40impl fmt::Debug for Exec {
-41    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-42        f.debug_struct("Exec").finish()
-43    }
-44}
-45
-46impl<F> hyper::rt::Executor<F> for Exec
-47where
-48    F: Future<Output = ()> + Send + 'static,
-49{
-50    fn execute(&self, fut: F) {
-51        Exec::execute(self, fut);
-52    }
-53}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/common/future.rs.html b/core/target/doc/src/hyper_util/common/future.rs.html deleted file mode 100644 index e98c3c6b..00000000 --- a/core/target/doc/src/hyper_util/common/future.rs.html +++ /dev/null @@ -1,31 +0,0 @@ -future.rs - source

hyper_util/common/
future.rs

1use std::{
-2    future::Future,
-3    pin::Pin,
-4    task::{Context, Poll},
-5};
-6
-7// TODO: replace with `std::future::poll_fn` once MSRV >= 1.64
-8pub(crate) fn poll_fn<T, F>(f: F) -> PollFn<F>
-9where
-10    F: FnMut(&mut Context<'_>) -> Poll<T>,
-11{
-12    PollFn { f }
-13}
-14
-15pub(crate) struct PollFn<F> {
-16    f: F,
-17}
-18
-19impl<F> Unpin for PollFn<F> {}
-20
-21impl<T, F> Future for PollFn<F>
-22where
-23    F: FnMut(&mut Context<'_>) -> Poll<T>,
-24{
-25    type Output = T;
-26
-27    fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
-28        (self.f)(cx)
-29    }
-30}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/common/lazy.rs.html b/core/target/doc/src/hyper_util/common/lazy.rs.html deleted file mode 100644 index 1c9f6337..00000000 --- a/core/target/doc/src/hyper_util/common/lazy.rs.html +++ /dev/null @@ -1,79 +0,0 @@ -lazy.rs - source

hyper_util/common/
lazy.rs

1use pin_project_lite::pin_project;
-2
-3use std::future::Future;
-4use std::pin::Pin;
-5use std::task::{self, Poll};
-6
-7pub(crate) trait Started: Future {
-8    fn started(&self) -> bool;
-9}
-10
-11pub(crate) fn lazy<F, R>(func: F) -> Lazy<F, R>
-12where
-13    F: FnOnce() -> R,
-14    R: Future + Unpin,
-15{
-16    Lazy {
-17        inner: Inner::Init { func },
-18    }
-19}
-20
-21// FIXME: allow() required due to `impl Trait` leaking types to this lint
-22pin_project! {
-23    #[allow(missing_debug_implementations)]
-24    pub(crate) struct Lazy<F, R> {
-25        #[pin]
-26        inner: Inner<F, R>,
-27    }
-28}
-29
-30pin_project! {
-31    #[project = InnerProj]
-32    #[project_replace = InnerProjReplace]
-33    enum Inner<F, R> {
-34        Init { func: F },
-35        Fut { #[pin] fut: R },
-36        Empty,
-37    }
-38}
-39
-40impl<F, R> Started for Lazy<F, R>
-41where
-42    F: FnOnce() -> R,
-43    R: Future,
-44{
-45    fn started(&self) -> bool {
-46        match self.inner {
-47            Inner::Init { .. } => false,
-48            Inner::Fut { .. } | Inner::Empty => true,
-49        }
-50    }
-51}
-52
-53impl<F, R> Future for Lazy<F, R>
-54where
-55    F: FnOnce() -> R,
-56    R: Future,
-57{
-58    type Output = R::Output;
-59
-60    fn poll(self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Self::Output> {
-61        let mut this = self.project();
-62
-63        if let InnerProj::Fut { fut } = this.inner.as_mut().project() {
-64            return fut.poll(cx);
-65        }
-66
-67        match this.inner.as_mut().project_replace(Inner::Empty) {
-68            InnerProjReplace::Init { func } => {
-69                this.inner.set(Inner::Fut { fut: func() });
-70                if let InnerProj::Fut { fut } = this.inner.project() {
-71                    return fut.poll(cx);
-72                }
-73                unreachable!()
-74            }
-75            _ => unreachable!("lazy state wrong"),
-76        }
-77    }
-78}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/common/mod.rs.html b/core/target/doc/src/hyper_util/common/mod.rs.html deleted file mode 100644 index 6766379c..00000000 --- a/core/target/doc/src/hyper_util/common/mod.rs.html +++ /dev/null @@ -1,22 +0,0 @@ -mod.rs - source

hyper_util/common/
mod.rs

1#![allow(missing_docs)]
-2
-3pub(crate) mod exec;
-4#[cfg(feature = "client-legacy")]
-5mod lazy;
-6#[cfg(feature = "server")]
-7// #[cfg(feature = "server-auto")]
-8pub(crate) mod rewind;
-9#[cfg(feature = "client-legacy")]
-10mod sync;
-11pub(crate) mod timer;
-12
-13#[cfg(feature = "client-legacy")]
-14pub(crate) use exec::Exec;
-15
-16#[cfg(feature = "client-legacy")]
-17pub(crate) use lazy::{lazy, Started as Lazy};
-18#[cfg(feature = "client-legacy")]
-19pub(crate) use sync::SyncWrapper;
-20
-21pub(crate) mod future;
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/common/rewind.rs.html b/core/target/doc/src/hyper_util/common/rewind.rs.html deleted file mode 100644 index 76c93f86..00000000 --- a/core/target/doc/src/hyper_util/common/rewind.rs.html +++ /dev/null @@ -1,138 +0,0 @@ -rewind.rs - source

hyper_util/common/
rewind.rs

1use std::{cmp, io};
-2
-3use bytes::{Buf, Bytes};
-4use hyper::rt::{Read, ReadBufCursor, Write};
-5
-6use std::{
-7    pin::Pin,
-8    task::{self, Poll},
-9};
-10
-11/// Combine a buffer with an IO, rewinding reads to use the buffer.
-12#[derive(Debug)]
-13pub(crate) struct Rewind<T> {
-14    pub(crate) pre: Option<Bytes>,
-15    pub(crate) inner: T,
-16}
-17
-18impl<T> Rewind<T> {
-19    #[cfg(all(feature = "server", any(feature = "http1", feature = "http2")))]
-20    pub(crate) fn new_buffered(io: T, buf: Bytes) -> Self {
-21        Rewind {
-22            pre: Some(buf),
-23            inner: io,
-24        }
-25    }
-26}
-27
-28impl<T> Read for Rewind<T>
-29where
-30    T: Read + Unpin,
-31{
-32    fn poll_read(
-33        mut self: Pin<&mut Self>,
-34        cx: &mut task::Context<'_>,
-35        mut buf: ReadBufCursor<'_>,
-36    ) -> Poll<io::Result<()>> {
-37        if let Some(mut prefix) = self.pre.take() {
-38            // If there are no remaining bytes, let the bytes get dropped.
-39            if !prefix.is_empty() {
-40                let copy_len = cmp::min(prefix.len(), buf.remaining());
-41                buf.put_slice(&prefix[..copy_len]);
-42                prefix.advance(copy_len);
-43                // Put back what's left
-44                if !prefix.is_empty() {
-45                    self.pre = Some(prefix);
-46                }
-47
-48                return Poll::Ready(Ok(()));
-49            }
-50        }
-51        Pin::new(&mut self.inner).poll_read(cx, buf)
-52    }
-53}
-54
-55impl<T> Write for Rewind<T>
-56where
-57    T: Write + Unpin,
-58{
-59    fn poll_write(
-60        mut self: Pin<&mut Self>,
-61        cx: &mut task::Context<'_>,
-62        buf: &[u8],
-63    ) -> Poll<io::Result<usize>> {
-64        Pin::new(&mut self.inner).poll_write(cx, buf)
-65    }
-66
-67    fn poll_write_vectored(
-68        mut self: Pin<&mut Self>,
-69        cx: &mut task::Context<'_>,
-70        bufs: &[io::IoSlice<'_>],
-71    ) -> Poll<io::Result<usize>> {
-72        Pin::new(&mut self.inner).poll_write_vectored(cx, bufs)
-73    }
-74
-75    fn poll_flush(mut self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<io::Result<()>> {
-76        Pin::new(&mut self.inner).poll_flush(cx)
-77    }
-78
-79    fn poll_shutdown(mut self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<io::Result<()>> {
-80        Pin::new(&mut self.inner).poll_shutdown(cx)
-81    }
-82
-83    fn is_write_vectored(&self) -> bool {
-84        self.inner.is_write_vectored()
-85    }
-86}
-87
-88/*
-89#[cfg(test)]
-90mod tests {
-91    use super::Rewind;
-92    use bytes::Bytes;
-93    use tokio::io::AsyncReadExt;
-94
-95    #[cfg(not(miri))]
-96    #[tokio::test]
-97    async fn partial_rewind() {
-98        let underlying = [104, 101, 108, 108, 111];
-99
-100        let mock = tokio_test::io::Builder::new().read(&underlying).build();
-101
-102        let mut stream = Rewind::new(mock);
-103
-104        // Read off some bytes, ensure we filled o1
-105        let mut buf = [0; 2];
-106        stream.read_exact(&mut buf).await.expect("read1");
-107
-108        // Rewind the stream so that it is as if we never read in the first place.
-109        stream.rewind(Bytes::copy_from_slice(&buf[..]));
-110
-111        let mut buf = [0; 5];
-112        stream.read_exact(&mut buf).await.expect("read1");
-113
-114        // At this point we should have read everything that was in the MockStream
-115        assert_eq!(&buf, &underlying);
-116    }
-117
-118    #[cfg(not(miri))]
-119    #[tokio::test]
-120    async fn full_rewind() {
-121        let underlying = [104, 101, 108, 108, 111];
-122
-123        let mock = tokio_test::io::Builder::new().read(&underlying).build();
-124
-125        let mut stream = Rewind::new(mock);
-126
-127        let mut buf = [0; 5];
-128        stream.read_exact(&mut buf).await.expect("read1");
-129
-130        // Rewind the stream so that it is as if we never read in the first place.
-131        stream.rewind(Bytes::copy_from_slice(&buf[..]));
-132
-133        let mut buf = [0; 5];
-134        stream.read_exact(&mut buf).await.expect("read1");
-135    }
-136}
-137*/
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/common/sync.rs.html b/core/target/doc/src/hyper_util/common/sync.rs.html deleted file mode 100644 index 9f9ad953..00000000 --- a/core/target/doc/src/hyper_util/common/sync.rs.html +++ /dev/null @@ -1,68 +0,0 @@ -sync.rs - source

hyper_util/common/
sync.rs

1pub(crate) struct SyncWrapper<T>(T);
-2
-3impl<T> SyncWrapper<T> {
-4    /// Creates a new SyncWrapper containing the given value.
-5    ///
-6    /// # Examples
-7    ///
-8    /// ```ignore
-9    /// use hyper::common::sync_wrapper::SyncWrapper;
-10    ///
-11    /// let wrapped = SyncWrapper::new(42);
-12    /// ```
-13    pub(crate) fn new(value: T) -> Self {
-14        Self(value)
-15    }
-16
-17    /// Acquires a reference to the protected value.
-18    ///
-19    /// This is safe because it requires an exclusive reference to the wrapper. Therefore this method
-20    /// neither panics nor does it return an error. This is in contrast to [`Mutex::get_mut`] which
-21    /// returns an error if another thread panicked while holding the lock. It is not recommended
-22    /// to send an exclusive reference to a potentially damaged value to another thread for further
-23    /// processing.
-24    ///
-25    /// [`Mutex::get_mut`]: https://doc.rust-lang.org/std/sync/struct.Mutex.html#method.get_mut
-26    ///
-27    /// # Examples
-28    ///
-29    /// ```ignore
-30    /// use hyper::common::sync_wrapper::SyncWrapper;
-31    ///
-32    /// let mut wrapped = SyncWrapper::new(42);
-33    /// let value = wrapped.get_mut();
-34    /// *value = 0;
-35    /// assert_eq!(*wrapped.get_mut(), 0);
-36    /// ```
-37    pub(crate) fn get_mut(&mut self) -> &mut T {
-38        &mut self.0
-39    }
-40
-41    /// Consumes this wrapper, returning the underlying data.
-42    ///
-43    /// This is safe because it requires ownership of the wrapper, aherefore this method will neither
-44    /// panic nor does it return an error. This is in contrast to [`Mutex::into_inner`] which
-45    /// returns an error if another thread panicked while holding the lock. It is not recommended
-46    /// to send an exclusive reference to a potentially damaged value to another thread for further
-47    /// processing.
-48    ///
-49    /// [`Mutex::into_inner`]: https://doc.rust-lang.org/std/sync/struct.Mutex.html#method.into_inner
-50    ///
-51    /// # Examples
-52    ///
-53    /// ```ignore
-54    /// use hyper::common::sync_wrapper::SyncWrapper;
-55    ///
-56    /// let mut wrapped = SyncWrapper::new(42);
-57    /// assert_eq!(wrapped.into_inner(), 42);
-58    /// ```
-59    #[allow(dead_code)]
-60    pub(crate) fn into_inner(self) -> T {
-61        self.0
-62    }
-63}
-64
-65// this is safe because the only operations permitted on this data structure require exclusive
-66// access or ownership
-67unsafe impl<T: Send> Sync for SyncWrapper<T> {}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/common/timer.rs.html b/core/target/doc/src/hyper_util/common/timer.rs.html deleted file mode 100644 index a89c035c..00000000 --- a/core/target/doc/src/hyper_util/common/timer.rs.html +++ /dev/null @@ -1,43 +0,0 @@ -timer.rs - source

hyper_util/common/
timer.rs

1#![allow(dead_code)]
-2
-3use std::fmt;
-4use std::pin::Pin;
-5use std::sync::Arc;
-6use std::time::Duration;
-7use std::time::Instant;
-8
-9use hyper::rt::Sleep;
-10
-11#[derive(Clone)]
-12pub(crate) struct Timer(Arc<dyn hyper::rt::Timer + Send + Sync>);
-13
-14// =====impl Timer=====
-15impl Timer {
-16    pub(crate) fn new<T>(inner: T) -> Self
-17    where
-18        T: hyper::rt::Timer + Send + Sync + 'static,
-19    {
-20        Self(Arc::new(inner))
-21    }
-22}
-23
-24impl fmt::Debug for Timer {
-25    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-26        f.debug_struct("Timer").finish()
-27    }
-28}
-29
-30impl hyper::rt::Timer for Timer {
-31    fn sleep(&self, duration: Duration) -> Pin<Box<dyn Sleep>> {
-32        self.0.sleep(duration)
-33    }
-34
-35    fn sleep_until(&self, deadline: Instant) -> Pin<Box<dyn Sleep>> {
-36        self.0.sleep_until(deadline)
-37    }
-38
-39    fn now(&self) -> Instant {
-40        self.0.now()
-41    }
-42}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/error.rs.html b/core/target/doc/src/hyper_util/error.rs.html deleted file mode 100644 index d5bc882d..00000000 --- a/core/target/doc/src/hyper_util/error.rs.html +++ /dev/null @@ -1,15 +0,0 @@ -error.rs - source

hyper_util/
error.rs

1/*
-2use std::error::Error;
-3
-4pub(crate) fn find<'a, E: Error + 'static>(top: &'a (dyn Error + 'static)) -> Option<&'a E> {
-5    let mut err = Some(top);
-6    while let Some(src) = err {
-7        if src.is::<E>() {
-8            return src.downcast_ref();
-9        }
-10        err = src.source();
-11    }
-12    None
-13}
-14*/
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/lib.rs.html b/core/target/doc/src/hyper_util/lib.rs.html deleted file mode 100644 index 3e875604..00000000 --- a/core/target/doc/src/hyper_util/lib.rs.html +++ /dev/null @@ -1,19 +0,0 @@ -lib.rs - source

hyper_util/
lib.rs

1#![deny(missing_docs)]
-2#![cfg_attr(docsrs, feature(doc_cfg))]
-3
-4//! Utilities for working with hyper.
-5//!
-6//! This crate is less-stable than [`hyper`](https://docs.rs/hyper). However,
-7//! does respect Rust's semantic version regarding breaking changes.
-8
-9#[cfg(feature = "client")]
-10pub mod client;
-11mod common;
-12pub mod rt;
-13#[cfg(feature = "server")]
-14pub mod server;
-15#[cfg(any(feature = "service", feature = "client-legacy"))]
-16pub mod service;
-17
-18mod error;
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/rt/io.rs.html b/core/target/doc/src/hyper_util/rt/io.rs.html deleted file mode 100644 index adb9c669..00000000 --- a/core/target/doc/src/hyper_util/rt/io.rs.html +++ /dev/null @@ -1,35 +0,0 @@ -io.rs - source

hyper_util/rt/
io.rs

1use std::marker::Unpin;
-2use std::pin::Pin;
-3use std::task::Poll;
-4
-5use futures_core::ready;
-6use hyper::rt::{Read, ReadBuf, Write};
-7
-8use crate::common::future::poll_fn;
-9
-10pub(crate) async fn read<T>(io: &mut T, buf: &mut [u8]) -> Result<usize, std::io::Error>
-11where
-12    T: Read + Unpin,
-13{
-14    poll_fn(move |cx| {
-15        let mut buf = ReadBuf::new(buf);
-16        ready!(Pin::new(&mut *io).poll_read(cx, buf.unfilled()))?;
-17        Poll::Ready(Ok(buf.filled().len()))
-18    })
-19    .await
-20}
-21
-22pub(crate) async fn write_all<T>(io: &mut T, buf: &[u8]) -> Result<(), std::io::Error>
-23where
-24    T: Write + Unpin,
-25{
-26    let mut n = 0;
-27    poll_fn(move |cx| {
-28        while n < buf.len() {
-29            n += ready!(Pin::new(&mut *io).poll_write(cx, &buf[n..])?);
-30        }
-31        Poll::Ready(Ok(()))
-32    })
-33    .await
-34}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/rt/mod.rs.html b/core/target/doc/src/hyper_util/rt/mod.rs.html deleted file mode 100644 index 17a7665e..00000000 --- a/core/target/doc/src/hyper_util/rt/mod.rs.html +++ /dev/null @@ -1,13 +0,0 @@ -mod.rs - source

hyper_util/rt/
mod.rs

1//! Runtime utilities
-2
-3#[cfg(feature = "client-legacy")]
-4mod io;
-5#[cfg(feature = "client-legacy")]
-6pub(crate) use self::io::{read, write_all};
-7
-8#[cfg(feature = "tokio")]
-9pub mod tokio;
-10
-11#[cfg(feature = "tokio")]
-12pub use self::tokio::{TokioExecutor, TokioIo, TokioTimer};
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/rt/tokio.rs.html b/core/target/doc/src/hyper_util/rt/tokio.rs.html deleted file mode 100644 index b8774c91..00000000 --- a/core/target/doc/src/hyper_util/rt/tokio.rs.html +++ /dev/null @@ -1,343 +0,0 @@ -tokio.rs - source

hyper_util/rt/
tokio.rs

1//! [`tokio`] runtime components integration for [`hyper`].
-2//!
-3//! [`hyper::rt`] exposes a set of traits to allow hyper to be agnostic to
-4//! its underlying asynchronous runtime. This submodule provides glue for
-5//! [`tokio`] users to bridge those types to [`hyper`]'s interfaces.
-6//!
-7//! # IO
-8//!
-9//! [`hyper`] abstracts over asynchronous readers and writers using [`Read`]
-10//! and [`Write`], while [`tokio`] abstracts over this using [`AsyncRead`]
-11//! and [`AsyncWrite`]. This submodule provides a collection of IO adaptors
-12//! to bridge these two IO ecosystems together: [`TokioIo<I>`],
-13//! [`WithHyperIo<I>`], and [`WithTokioIo<I>`].
-14//!
-15//! To compare and constrast these IO adaptors and to help explain which
-16//! is the proper choice for your needs, here is a table showing which IO
-17//! traits these implement, given two types `T` and `H` which implement
-18//! Tokio's and Hyper's corresponding IO traits:
-19//!
-20//! |                    | [`AsyncRead`]    | [`AsyncWrite`]    | [`Read`]     | [`Write`]    |
-21//! |--------------------|------------------|-------------------|--------------|--------------|
-22//! | `T`                | ✅ **true**      | ✅ **true**       | ❌ **false** | ❌ **false** |
-23//! | `H`                | ❌ **false**     | ❌ **false**      | ✅ **true**  | ✅ **true**  |
-24//! | [`TokioIo<T>`]     | ❌ **false**     | ❌ **false**      | ✅ **true**  | ✅ **true**  |
-25//! | [`TokioIo<H>`]     | ✅ **true**      | ✅ **true**       | ❌ **false** | ❌ **false** |
-26//! | [`WithHyperIo<T>`] | ✅ **true**      | ✅ **true**       | ✅ **true**  | ✅ **true**  |
-27//! | [`WithHyperIo<H>`] | ❌ **false**     | ❌ **false**      | ❌ **false** | ❌ **false** |
-28//! | [`WithTokioIo<T>`] | ❌ **false**     | ❌ **false**      | ❌ **false** | ❌ **false** |
-29//! | [`WithTokioIo<H>`] | ✅ **true**      | ✅ **true**       | ✅ **true**  | ✅ **true**  |
-30//!
-31//! For most situations, [`TokioIo<I>`] is the proper choice. This should be
-32//! constructed, wrapping some underlying [`hyper`] or [`tokio`] IO, at the
-33//! call-site of a function like [`hyper::client::conn::http1::handshake`].
-34//!
-35//! [`TokioIo<I>`] switches across these ecosystems, but notably does not
-36//! preserve the existing IO trait implementations of its underlying IO. If
-37//! one wishes to _extend_ IO with additional implementations,
-38//! [`WithHyperIo<I>`] and [`WithTokioIo<I>`] are the correct choice.
-39//!
-40//! For example, a Tokio reader/writer can be wrapped in [`WithHyperIo<I>`].
-41//! That will implement _both_ sets of IO traits. Conversely,
-42//! [`WithTokioIo<I>`] will implement both sets of IO traits given a
-43//! reader/writer that implements Hyper's [`Read`] and [`Write`].
-44//!
-45//! See [`tokio::io`] and ["_Asynchronous IO_"][tokio-async-docs] for more
-46//! information.
-47//!
-48//! [`AsyncRead`]: tokio::io::AsyncRead
-49//! [`AsyncWrite`]: tokio::io::AsyncWrite
-50//! [`Read`]: hyper::rt::Read
-51//! [`Write`]: hyper::rt::Write
-52//! [tokio-async-docs]: https://docs.rs/tokio/latest/tokio/#asynchronous-io
-53
-54use std::{
-55    future::Future,
-56    pin::Pin,
-57    task::{Context, Poll},
-58    time::{Duration, Instant},
-59};
-60
-61use hyper::rt::{Executor, Sleep, Timer};
-62use pin_project_lite::pin_project;
-63
-64#[cfg(feature = "tracing")]
-65use tracing::instrument::Instrument;
-66
-67pub use self::{with_hyper_io::WithHyperIo, with_tokio_io::WithTokioIo};
-68
-69mod with_hyper_io;
-70mod with_tokio_io;
-71
-72/// Future executor that utilises `tokio` threads.
-73#[non_exhaustive]
-74#[derive(Default, Debug, Clone)]
-75pub struct TokioExecutor {}
-76
-77pin_project! {
-78    /// A wrapper that implements Tokio's IO traits for an inner type that
-79    /// implements hyper's IO traits, or vice versa (implements hyper's IO
-80    /// traits for a type that implements Tokio's IO traits).
-81    #[derive(Debug)]
-82    pub struct TokioIo<T> {
-83        #[pin]
-84        inner: T,
-85    }
-86}
-87
-88/// A Timer that uses the tokio runtime.
-89#[non_exhaustive]
-90#[derive(Default, Clone, Debug)]
-91pub struct TokioTimer;
-92
-93// Use TokioSleep to get tokio::time::Sleep to implement Unpin.
-94// see https://docs.rs/tokio/latest/tokio/time/struct.Sleep.html
-95pin_project! {
-96    #[derive(Debug)]
-97    struct TokioSleep {
-98        #[pin]
-99        inner: tokio::time::Sleep,
-100    }
-101}
-102
-103// ===== impl TokioExecutor =====
-104
-105impl<Fut> Executor<Fut> for TokioExecutor
-106where
-107    Fut: Future + Send + 'static,
-108    Fut::Output: Send + 'static,
-109{
-110    fn execute(&self, fut: Fut) {
-111        #[cfg(feature = "tracing")]
-112        tokio::spawn(fut.in_current_span());
-113
-114        #[cfg(not(feature = "tracing"))]
-115        tokio::spawn(fut);
-116    }
-117}
-118
-119impl TokioExecutor {
-120    /// Create new executor that relies on [`tokio::spawn`] to execute futures.
-121    pub fn new() -> Self {
-122        Self {}
-123    }
-124}
-125
-126// ==== impl TokioIo =====
-127
-128impl<T> TokioIo<T> {
-129    /// Wrap a type implementing Tokio's or hyper's IO traits.
-130    pub fn new(inner: T) -> Self {
-131        Self { inner }
-132    }
-133
-134    /// Borrow the inner type.
-135    pub fn inner(&self) -> &T {
-136        &self.inner
-137    }
-138
-139    /// Mut borrow the inner type.
-140    pub fn inner_mut(&mut self) -> &mut T {
-141        &mut self.inner
-142    }
-143
-144    /// Consume this wrapper and get the inner type.
-145    pub fn into_inner(self) -> T {
-146        self.inner
-147    }
-148}
-149
-150impl<T> hyper::rt::Read for TokioIo<T>
-151where
-152    T: tokio::io::AsyncRead,
-153{
-154    fn poll_read(
-155        self: Pin<&mut Self>,
-156        cx: &mut Context<'_>,
-157        mut buf: hyper::rt::ReadBufCursor<'_>,
-158    ) -> Poll<Result<(), std::io::Error>> {
-159        let n = unsafe {
-160            let mut tbuf = tokio::io::ReadBuf::uninit(buf.as_mut());
-161            match tokio::io::AsyncRead::poll_read(self.project().inner, cx, &mut tbuf) {
-162                Poll::Ready(Ok(())) => tbuf.filled().len(),
-163                other => return other,
-164            }
-165        };
-166
-167        unsafe {
-168            buf.advance(n);
-169        }
-170        Poll::Ready(Ok(()))
-171    }
-172}
-173
-174impl<T> hyper::rt::Write for TokioIo<T>
-175where
-176    T: tokio::io::AsyncWrite,
-177{
-178    fn poll_write(
-179        self: Pin<&mut Self>,
-180        cx: &mut Context<'_>,
-181        buf: &[u8],
-182    ) -> Poll<Result<usize, std::io::Error>> {
-183        tokio::io::AsyncWrite::poll_write(self.project().inner, cx, buf)
-184    }
-185
-186    fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), std::io::Error>> {
-187        tokio::io::AsyncWrite::poll_flush(self.project().inner, cx)
-188    }
-189
-190    fn poll_shutdown(
-191        self: Pin<&mut Self>,
-192        cx: &mut Context<'_>,
-193    ) -> Poll<Result<(), std::io::Error>> {
-194        tokio::io::AsyncWrite::poll_shutdown(self.project().inner, cx)
-195    }
-196
-197    fn is_write_vectored(&self) -> bool {
-198        tokio::io::AsyncWrite::is_write_vectored(&self.inner)
-199    }
-200
-201    fn poll_write_vectored(
-202        self: Pin<&mut Self>,
-203        cx: &mut Context<'_>,
-204        bufs: &[std::io::IoSlice<'_>],
-205    ) -> Poll<Result<usize, std::io::Error>> {
-206        tokio::io::AsyncWrite::poll_write_vectored(self.project().inner, cx, bufs)
-207    }
-208}
-209
-210impl<T> tokio::io::AsyncRead for TokioIo<T>
-211where
-212    T: hyper::rt::Read,
-213{
-214    fn poll_read(
-215        self: Pin<&mut Self>,
-216        cx: &mut Context<'_>,
-217        tbuf: &mut tokio::io::ReadBuf<'_>,
-218    ) -> Poll<Result<(), std::io::Error>> {
-219        //let init = tbuf.initialized().len();
-220        let filled = tbuf.filled().len();
-221        let sub_filled = unsafe {
-222            let mut buf = hyper::rt::ReadBuf::uninit(tbuf.unfilled_mut());
-223
-224            match hyper::rt::Read::poll_read(self.project().inner, cx, buf.unfilled()) {
-225                Poll::Ready(Ok(())) => buf.filled().len(),
-226                other => return other,
-227            }
-228        };
-229
-230        let n_filled = filled + sub_filled;
-231        // At least sub_filled bytes had to have been initialized.
-232        let n_init = sub_filled;
-233        unsafe {
-234            tbuf.assume_init(n_init);
-235            tbuf.set_filled(n_filled);
-236        }
-237
-238        Poll::Ready(Ok(()))
-239    }
-240}
-241
-242impl<T> tokio::io::AsyncWrite for TokioIo<T>
-243where
-244    T: hyper::rt::Write,
-245{
-246    fn poll_write(
-247        self: Pin<&mut Self>,
-248        cx: &mut Context<'_>,
-249        buf: &[u8],
-250    ) -> Poll<Result<usize, std::io::Error>> {
-251        hyper::rt::Write::poll_write(self.project().inner, cx, buf)
-252    }
-253
-254    fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), std::io::Error>> {
-255        hyper::rt::Write::poll_flush(self.project().inner, cx)
-256    }
-257
-258    fn poll_shutdown(
-259        self: Pin<&mut Self>,
-260        cx: &mut Context<'_>,
-261    ) -> Poll<Result<(), std::io::Error>> {
-262        hyper::rt::Write::poll_shutdown(self.project().inner, cx)
-263    }
-264
-265    fn is_write_vectored(&self) -> bool {
-266        hyper::rt::Write::is_write_vectored(&self.inner)
-267    }
-268
-269    fn poll_write_vectored(
-270        self: Pin<&mut Self>,
-271        cx: &mut Context<'_>,
-272        bufs: &[std::io::IoSlice<'_>],
-273    ) -> Poll<Result<usize, std::io::Error>> {
-274        hyper::rt::Write::poll_write_vectored(self.project().inner, cx, bufs)
-275    }
-276}
-277
-278// ==== impl TokioTimer =====
-279
-280impl Timer for TokioTimer {
-281    fn sleep(&self, duration: Duration) -> Pin<Box<dyn Sleep>> {
-282        Box::pin(TokioSleep {
-283            inner: tokio::time::sleep(duration),
-284        })
-285    }
-286
-287    fn sleep_until(&self, deadline: Instant) -> Pin<Box<dyn Sleep>> {
-288        Box::pin(TokioSleep {
-289            inner: tokio::time::sleep_until(deadline.into()),
-290        })
-291    }
-292
-293    fn reset(&self, sleep: &mut Pin<Box<dyn Sleep>>, new_deadline: Instant) {
-294        if let Some(sleep) = sleep.as_mut().downcast_mut_pin::<TokioSleep>() {
-295            sleep.reset(new_deadline)
-296        }
-297    }
-298
-299    fn now(&self) -> Instant {
-300        tokio::time::Instant::now().into()
-301    }
-302}
-303
-304impl TokioTimer {
-305    /// Create a new TokioTimer
-306    pub fn new() -> Self {
-307        Self {}
-308    }
-309}
-310
-311impl Future for TokioSleep {
-312    type Output = ();
-313
-314    fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
-315        self.project().inner.poll(cx)
-316    }
-317}
-318
-319impl Sleep for TokioSleep {}
-320
-321impl TokioSleep {
-322    fn reset(self: Pin<&mut Self>, deadline: Instant) {
-323        self.project().inner.as_mut().reset(deadline.into());
-324    }
-325}
-326
-327#[cfg(test)]
-328mod tests {
-329    use crate::rt::TokioExecutor;
-330    use hyper::rt::Executor;
-331    use tokio::sync::oneshot;
-332
-333    #[tokio::test]
-334    async fn simple_execute() -> Result<(), Box<dyn std::error::Error>> {
-335        let (tx, rx) = oneshot::channel();
-336        let executor = TokioExecutor::new();
-337        executor.execute(async move {
-338            tx.send(()).unwrap();
-339        });
-340        rx.await.map_err(Into::into)
-341    }
-342}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/rt/tokio/with_hyper_io.rs.html b/core/target/doc/src/hyper_util/rt/tokio/with_hyper_io.rs.html deleted file mode 100644 index d7b436dc..00000000 --- a/core/target/doc/src/hyper_util/rt/tokio/with_hyper_io.rs.html +++ /dev/null @@ -1,171 +0,0 @@ -with_hyper_io.rs - source

hyper_util/rt/tokio/
with_hyper_io.rs

1use pin_project_lite::pin_project;
-2use std::{
-3    pin::Pin,
-4    task::{Context, Poll},
-5};
-6
-7pin_project! {
-8    /// Extends an underlying [`tokio`] I/O with [`hyper`] I/O implementations.
-9    ///
-10    /// This implements [`Read`] and [`Write`] given an inner type that implements [`AsyncRead`]
-11    /// and [`AsyncWrite`], respectively.
-12    #[derive(Debug)]
-13    pub struct WithHyperIo<I> {
-14        #[pin]
-15        inner: I,
-16    }
-17}
-18
-19// ==== impl WithHyperIo =====
-20
-21impl<I> WithHyperIo<I> {
-22    /// Wraps the inner I/O in an [`WithHyperIo<I>`]
-23    pub fn new(inner: I) -> Self {
-24        Self { inner }
-25    }
-26
-27    /// Returns a reference to the inner type.
-28    pub fn inner(&self) -> &I {
-29        &self.inner
-30    }
-31
-32    /// Returns a mutable reference to the inner type.
-33    pub fn inner_mut(&mut self) -> &mut I {
-34        &mut self.inner
-35    }
-36
-37    /// Consumes this wrapper and returns the inner type.
-38    pub fn into_inner(self) -> I {
-39        self.inner
-40    }
-41}
-42
-43/// [`WithHyperIo<I>`] is [`Read`] if `I` is [`AsyncRead`].
-44///
-45/// [`AsyncRead`]: tokio::io::AsyncRead
-46/// [`Read`]: hyper::rt::Read
-47impl<I> hyper::rt::Read for WithHyperIo<I>
-48where
-49    I: tokio::io::AsyncRead,
-50{
-51    fn poll_read(
-52        self: Pin<&mut Self>,
-53        cx: &mut Context<'_>,
-54        mut buf: hyper::rt::ReadBufCursor<'_>,
-55    ) -> Poll<Result<(), std::io::Error>> {
-56        let n = unsafe {
-57            let mut tbuf = tokio::io::ReadBuf::uninit(buf.as_mut());
-58            match tokio::io::AsyncRead::poll_read(self.project().inner, cx, &mut tbuf) {
-59                Poll::Ready(Ok(())) => tbuf.filled().len(),
-60                other => return other,
-61            }
-62        };
-63
-64        unsafe {
-65            buf.advance(n);
-66        }
-67        Poll::Ready(Ok(()))
-68    }
-69}
-70
-71/// [`WithHyperIo<I>`] is [`Write`] if `I` is [`AsyncWrite`].
-72///
-73/// [`AsyncWrite`]: tokio::io::AsyncWrite
-74/// [`Write`]: hyper::rt::Write
-75impl<I> hyper::rt::Write for WithHyperIo<I>
-76where
-77    I: tokio::io::AsyncWrite,
-78{
-79    fn poll_write(
-80        self: Pin<&mut Self>,
-81        cx: &mut Context<'_>,
-82        buf: &[u8],
-83    ) -> Poll<Result<usize, std::io::Error>> {
-84        tokio::io::AsyncWrite::poll_write(self.project().inner, cx, buf)
-85    }
-86
-87    fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), std::io::Error>> {
-88        tokio::io::AsyncWrite::poll_flush(self.project().inner, cx)
-89    }
-90
-91    fn poll_shutdown(
-92        self: Pin<&mut Self>,
-93        cx: &mut Context<'_>,
-94    ) -> Poll<Result<(), std::io::Error>> {
-95        tokio::io::AsyncWrite::poll_shutdown(self.project().inner, cx)
-96    }
-97
-98    fn is_write_vectored(&self) -> bool {
-99        tokio::io::AsyncWrite::is_write_vectored(&self.inner)
-100    }
-101
-102    fn poll_write_vectored(
-103        self: Pin<&mut Self>,
-104        cx: &mut Context<'_>,
-105        bufs: &[std::io::IoSlice<'_>],
-106    ) -> Poll<Result<usize, std::io::Error>> {
-107        tokio::io::AsyncWrite::poll_write_vectored(self.project().inner, cx, bufs)
-108    }
-109}
-110
-111/// [`WithHyperIo<I>`] exposes its inner `I`'s [`AsyncRead`] implementation.
-112///
-113/// [`AsyncRead`]: tokio::io::AsyncRead
-114impl<I> tokio::io::AsyncRead for WithHyperIo<I>
-115where
-116    I: tokio::io::AsyncRead,
-117{
-118    #[inline]
-119    fn poll_read(
-120        self: Pin<&mut Self>,
-121        cx: &mut Context<'_>,
-122        buf: &mut tokio::io::ReadBuf<'_>,
-123    ) -> Poll<Result<(), std::io::Error>> {
-124        self.project().inner.poll_read(cx, buf)
-125    }
-126}
-127
-128/// [`WithHyperIo<I>`] exposes its inner `I`'s [`AsyncWrite`] implementation.
-129///
-130/// [`AsyncWrite`]: tokio::io::AsyncWrite
-131impl<I> tokio::io::AsyncWrite for WithHyperIo<I>
-132where
-133    I: tokio::io::AsyncWrite,
-134{
-135    #[inline]
-136    fn poll_write(
-137        self: Pin<&mut Self>,
-138        cx: &mut Context<'_>,
-139        buf: &[u8],
-140    ) -> Poll<Result<usize, std::io::Error>> {
-141        self.project().inner.poll_write(cx, buf)
-142    }
-143
-144    #[inline]
-145    fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), std::io::Error>> {
-146        self.project().inner.poll_flush(cx)
-147    }
-148
-149    #[inline]
-150    fn poll_shutdown(
-151        self: Pin<&mut Self>,
-152        cx: &mut Context<'_>,
-153    ) -> Poll<Result<(), std::io::Error>> {
-154        self.project().inner.poll_shutdown(cx)
-155    }
-156
-157    #[inline]
-158    fn is_write_vectored(&self) -> bool {
-159        self.inner.is_write_vectored()
-160    }
-161
-162    #[inline]
-163    fn poll_write_vectored(
-164        self: Pin<&mut Self>,
-165        cx: &mut Context<'_>,
-166        bufs: &[std::io::IoSlice<'_>],
-167    ) -> Poll<Result<usize, std::io::Error>> {
-168        self.project().inner.poll_write_vectored(cx, bufs)
-169    }
-170}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/rt/tokio/with_tokio_io.rs.html b/core/target/doc/src/hyper_util/rt/tokio/with_tokio_io.rs.html deleted file mode 100644 index 21446bb6..00000000 --- a/core/target/doc/src/hyper_util/rt/tokio/with_tokio_io.rs.html +++ /dev/null @@ -1,179 +0,0 @@ -with_tokio_io.rs - source

hyper_util/rt/tokio/
with_tokio_io.rs

1use pin_project_lite::pin_project;
-2use std::{
-3    pin::Pin,
-4    task::{Context, Poll},
-5};
-6
-7pin_project! {
-8    /// Extends an underlying [`hyper`] I/O with [`tokio`] I/O implementations.
-9    ///
-10    /// This implements [`AsyncRead`] and [`AsyncWrite`] given an inner type that implements
-11    /// [`Read`] and [`Write`], respectively.
-12    #[derive(Debug)]
-13    pub struct WithTokioIo<I> {
-14        #[pin]
-15        inner: I,
-16    }
-17}
-18
-19// ==== impl WithTokioIo =====
-20
-21/// [`WithTokioIo<I>`] is [`AsyncRead`] if `I` is [`Read`].
-22///
-23/// [`AsyncRead`]: tokio::io::AsyncRead
-24/// [`Read`]: hyper::rt::Read
-25impl<I> tokio::io::AsyncRead for WithTokioIo<I>
-26where
-27    I: hyper::rt::Read,
-28{
-29    fn poll_read(
-30        self: Pin<&mut Self>,
-31        cx: &mut Context<'_>,
-32        tbuf: &mut tokio::io::ReadBuf<'_>,
-33    ) -> Poll<Result<(), std::io::Error>> {
-34        //let init = tbuf.initialized().len();
-35        let filled = tbuf.filled().len();
-36        let sub_filled = unsafe {
-37            let mut buf = hyper::rt::ReadBuf::uninit(tbuf.unfilled_mut());
-38
-39            match hyper::rt::Read::poll_read(self.project().inner, cx, buf.unfilled()) {
-40                Poll::Ready(Ok(())) => buf.filled().len(),
-41                other => return other,
-42            }
-43        };
-44
-45        let n_filled = filled + sub_filled;
-46        // At least sub_filled bytes had to have been initialized.
-47        let n_init = sub_filled;
-48        unsafe {
-49            tbuf.assume_init(n_init);
-50            tbuf.set_filled(n_filled);
-51        }
-52
-53        Poll::Ready(Ok(()))
-54    }
-55}
-56
-57/// [`WithTokioIo<I>`] is [`AsyncWrite`] if `I` is [`Write`].
-58///
-59/// [`AsyncWrite`]: tokio::io::AsyncWrite
-60/// [`Write`]: hyper::rt::Write
-61impl<I> tokio::io::AsyncWrite for WithTokioIo<I>
-62where
-63    I: hyper::rt::Write,
-64{
-65    fn poll_write(
-66        self: Pin<&mut Self>,
-67        cx: &mut Context<'_>,
-68        buf: &[u8],
-69    ) -> Poll<Result<usize, std::io::Error>> {
-70        hyper::rt::Write::poll_write(self.project().inner, cx, buf)
-71    }
-72
-73    fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), std::io::Error>> {
-74        hyper::rt::Write::poll_flush(self.project().inner, cx)
-75    }
-76
-77    fn poll_shutdown(
-78        self: Pin<&mut Self>,
-79        cx: &mut Context<'_>,
-80    ) -> Poll<Result<(), std::io::Error>> {
-81        hyper::rt::Write::poll_shutdown(self.project().inner, cx)
-82    }
-83
-84    fn is_write_vectored(&self) -> bool {
-85        hyper::rt::Write::is_write_vectored(&self.inner)
-86    }
-87
-88    fn poll_write_vectored(
-89        self: Pin<&mut Self>,
-90        cx: &mut Context<'_>,
-91        bufs: &[std::io::IoSlice<'_>],
-92    ) -> Poll<Result<usize, std::io::Error>> {
-93        hyper::rt::Write::poll_write_vectored(self.project().inner, cx, bufs)
-94    }
-95}
-96
-97/// [`WithTokioIo<I>`] exposes its inner `I`'s [`Write`] implementation.
-98///
-99/// [`Write`]: hyper::rt::Write
-100impl<I> hyper::rt::Write for WithTokioIo<I>
-101where
-102    I: hyper::rt::Write,
-103{
-104    #[inline]
-105    fn poll_write(
-106        self: Pin<&mut Self>,
-107        cx: &mut Context<'_>,
-108        buf: &[u8],
-109    ) -> Poll<Result<usize, std::io::Error>> {
-110        self.project().inner.poll_write(cx, buf)
-111    }
-112
-113    #[inline]
-114    fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), std::io::Error>> {
-115        self.project().inner.poll_flush(cx)
-116    }
-117
-118    #[inline]
-119    fn poll_shutdown(
-120        self: Pin<&mut Self>,
-121        cx: &mut Context<'_>,
-122    ) -> Poll<Result<(), std::io::Error>> {
-123        self.project().inner.poll_shutdown(cx)
-124    }
-125
-126    #[inline]
-127    fn is_write_vectored(&self) -> bool {
-128        self.inner.is_write_vectored()
-129    }
-130
-131    #[inline]
-132    fn poll_write_vectored(
-133        self: Pin<&mut Self>,
-134        cx: &mut Context<'_>,
-135        bufs: &[std::io::IoSlice<'_>],
-136    ) -> Poll<Result<usize, std::io::Error>> {
-137        self.project().inner.poll_write_vectored(cx, bufs)
-138    }
-139}
-140
-141impl<I> WithTokioIo<I> {
-142    /// Wraps the inner I/O in an [`WithTokioIo<I>`]
-143    pub fn new(inner: I) -> Self {
-144        Self { inner }
-145    }
-146
-147    /// Returns a reference to the inner type.
-148    pub fn inner(&self) -> &I {
-149        &self.inner
-150    }
-151
-152    /// Returns a mutable reference to the inner type.
-153    pub fn inner_mut(&mut self) -> &mut I {
-154        &mut self.inner
-155    }
-156
-157    /// Consumes this wrapper and returns the inner type.
-158    pub fn into_inner(self) -> I {
-159        self.inner
-160    }
-161}
-162
-163/// [`WithTokioIo<I>`] exposes its inner `I`'s [`Read`] implementation.
-164///
-165/// [`Read`]: hyper::rt::Read
-166impl<I> hyper::rt::Read for WithTokioIo<I>
-167where
-168    I: hyper::rt::Read,
-169{
-170    #[inline]
-171    fn poll_read(
-172        self: Pin<&mut Self>,
-173        cx: &mut Context<'_>,
-174        buf: hyper::rt::ReadBufCursor<'_>,
-175    ) -> Poll<Result<(), std::io::Error>> {
-176        self.project().inner.poll_read(cx, buf)
-177    }
-178}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/server/conn/auto/mod.rs.html b/core/target/doc/src/hyper_util/server/conn/auto/mod.rs.html deleted file mode 100644 index 954c5348..00000000 --- a/core/target/doc/src/hyper_util/server/conn/auto/mod.rs.html +++ /dev/null @@ -1,1378 +0,0 @@ -mod.rs - source

hyper_util/server/conn/auto/
mod.rs

1//! Http1 or Http2 connection.
-2
-3pub mod upgrade;
-4
-5use hyper::service::HttpService;
-6use std::future::Future;
-7use std::marker::PhantomPinned;
-8use std::mem::MaybeUninit;
-9use std::pin::Pin;
-10use std::task::{Context, Poll};
-11use std::{error::Error as StdError, io, time::Duration};
-12
-13use bytes::Bytes;
-14use futures_core::ready;
-15use http::{Request, Response};
-16use http_body::Body;
-17use hyper::{
-18    body::Incoming,
-19    rt::{Read, ReadBuf, Timer, Write},
-20    service::Service,
-21};
-22
-23#[cfg(feature = "http1")]
-24use hyper::server::conn::http1;
-25
-26#[cfg(feature = "http2")]
-27use hyper::{rt::bounds::Http2ServerConnExec, server::conn::http2};
-28
-29#[cfg(any(not(feature = "http2"), not(feature = "http1")))]
-30use std::marker::PhantomData;
-31
-32use pin_project_lite::pin_project;
-33
-34use crate::common::rewind::Rewind;
-35
-36type Error = Box<dyn std::error::Error + Send + Sync>;
-37
-38type Result<T> = std::result::Result<T, Error>;
-39
-40const H2_PREFACE: &[u8] = b"PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n";
-41
-42/// Exactly equivalent to [`Http2ServerConnExec`].
-43#[cfg(feature = "http2")]
-44pub trait HttpServerConnExec<A, B: Body>: Http2ServerConnExec<A, B> {}
-45
-46#[cfg(feature = "http2")]
-47impl<A, B: Body, T: Http2ServerConnExec<A, B>> HttpServerConnExec<A, B> for T {}
-48
-49/// Exactly equivalent to [`Http2ServerConnExec`].
-50#[cfg(not(feature = "http2"))]
-51pub trait HttpServerConnExec<A, B: Body> {}
-52
-53#[cfg(not(feature = "http2"))]
-54impl<A, B: Body, T> HttpServerConnExec<A, B> for T {}
-55
-56/// Http1 or Http2 connection builder.
-57#[derive(Clone, Debug)]
-58pub struct Builder<E> {
-59    #[cfg(feature = "http1")]
-60    http1: http1::Builder,
-61    #[cfg(feature = "http2")]
-62    http2: http2::Builder<E>,
-63    #[cfg(any(feature = "http1", feature = "http2"))]
-64    version: Option<Version>,
-65    #[cfg(not(feature = "http2"))]
-66    _executor: E,
-67}
-68
-69impl<E: Default> Default for Builder<E> {
-70    fn default() -> Self {
-71        Self::new(E::default())
-72    }
-73}
-74
-75impl<E> Builder<E> {
-76    /// Create a new auto connection builder.
-77    ///
-78    /// `executor` parameter should be a type that implements
-79    /// [`Executor`](hyper::rt::Executor) trait.
-80    ///
-81    /// # Example
-82    ///
-83    /// ```
-84    /// use hyper_util::{
-85    ///     rt::TokioExecutor,
-86    ///     server::conn::auto,
-87    /// };
-88    ///
-89    /// auto::Builder::new(TokioExecutor::new());
-90    /// ```
-91    pub fn new(executor: E) -> Self {
-92        Self {
-93            #[cfg(feature = "http1")]
-94            http1: http1::Builder::new(),
-95            #[cfg(feature = "http2")]
-96            http2: http2::Builder::new(executor),
-97            #[cfg(any(feature = "http1", feature = "http2"))]
-98            version: None,
-99            #[cfg(not(feature = "http2"))]
-100            _executor: executor,
-101        }
-102    }
-103
-104    /// Http1 configuration.
-105    #[cfg(feature = "http1")]
-106    pub fn http1(&mut self) -> Http1Builder<'_, E> {
-107        Http1Builder { inner: self }
-108    }
-109
-110    /// Http2 configuration.
-111    #[cfg(feature = "http2")]
-112    pub fn http2(&mut self) -> Http2Builder<'_, E> {
-113        Http2Builder { inner: self }
-114    }
-115
-116    /// Only accepts HTTP/2
-117    ///
-118    /// Does not do anything if used with [`serve_connection_with_upgrades`]
-119    ///
-120    /// [`serve_connection_with_upgrades`]: Builder::serve_connection_with_upgrades
-121    #[cfg(feature = "http2")]
-122    pub fn http2_only(mut self) -> Self {
-123        assert!(self.version.is_none());
-124        self.version = Some(Version::H2);
-125        self
-126    }
-127
-128    /// Only accepts HTTP/1
-129    ///
-130    /// Does not do anything if used with [`serve_connection_with_upgrades`]
-131    ///
-132    /// [`serve_connection_with_upgrades`]: Builder::serve_connection_with_upgrades
-133    #[cfg(feature = "http1")]
-134    pub fn http1_only(mut self) -> Self {
-135        assert!(self.version.is_none());
-136        self.version = Some(Version::H1);
-137        self
-138    }
-139
-140    /// Returns `true` if this builder can serve an HTTP/1.1-based connection.
-141    pub fn is_http1_available(&self) -> bool {
-142        match self.version {
-143            #[cfg(feature = "http1")]
-144            Some(Version::H1) => true,
-145            #[cfg(feature = "http2")]
-146            Some(Version::H2) => false,
-147            #[cfg(any(feature = "http1", feature = "http2"))]
-148            _ => true,
-149        }
-150    }
-151
-152    /// Returns `true` if this builder can serve an HTTP/2-based connection.
-153    pub fn is_http2_available(&self) -> bool {
-154        match self.version {
-155            #[cfg(feature = "http1")]
-156            Some(Version::H1) => false,
-157            #[cfg(feature = "http2")]
-158            Some(Version::H2) => true,
-159            #[cfg(any(feature = "http1", feature = "http2"))]
-160            _ => true,
-161        }
-162    }
-163
-164    /// Set whether HTTP/1 connections will write header names as title case at
-165    /// the socket level.
-166    ///
-167    /// This setting only affects HTTP/1 connections. HTTP/2 connections are
-168    /// not affected by this setting.
-169    ///
-170    /// Default is false.
-171    ///
-172    /// # Example
-173    ///
-174    /// ```
-175    /// use hyper_util::{
-176    ///     rt::TokioExecutor,
-177    ///     server::conn::auto,
-178    /// };
-179    ///
-180    /// auto::Builder::new(TokioExecutor::new())
-181    ///     .title_case_headers(true);
-182    /// ```
-183    #[cfg(feature = "http1")]
-184    pub fn title_case_headers(mut self, enabled: bool) -> Self {
-185        self.http1.title_case_headers(enabled);
-186        self
-187    }
-188
-189    /// Set whether HTTP/1 connections will preserve the original case of header names.
-190    ///
-191    /// This setting only affects HTTP/1 connections. HTTP/2 connections are
-192    /// not affected by this setting.
-193    ///
-194    /// Default is false.
-195    ///
-196    /// # Example
-197    ///
-198    /// ```
-199    /// use hyper_util::{
-200    ///     rt::TokioExecutor,
-201    ///     server::conn::auto,
-202    /// };
-203    ///
-204    /// auto::Builder::new(TokioExecutor::new())
-205    ///     .preserve_header_case(true);
-206    /// ```
-207    #[cfg(feature = "http1")]
-208    pub fn preserve_header_case(mut self, enabled: bool) -> Self {
-209        self.http1.preserve_header_case(enabled);
-210        self
-211    }
-212
-213    /// Bind a connection together with a [`Service`].
-214    pub fn serve_connection<I, S, B>(&self, io: I, service: S) -> Connection<'_, I, S, E>
-215    where
-216        S: Service<Request<Incoming>, Response = Response<B>>,
-217        S::Future: 'static,
-218        S::Error: Into<Box<dyn StdError + Send + Sync>>,
-219        B: Body + 'static,
-220        B::Error: Into<Box<dyn StdError + Send + Sync>>,
-221        I: Read + Write + Unpin + 'static,
-222        E: HttpServerConnExec<S::Future, B>,
-223    {
-224        let state = match self.version {
-225            #[cfg(feature = "http1")]
-226            Some(Version::H1) => {
-227                let io = Rewind::new_buffered(io, Bytes::new());
-228                let conn = self.http1.serve_connection(io, service);
-229                ConnState::H1 { conn }
-230            }
-231            #[cfg(feature = "http2")]
-232            Some(Version::H2) => {
-233                let io = Rewind::new_buffered(io, Bytes::new());
-234                let conn = self.http2.serve_connection(io, service);
-235                ConnState::H2 { conn }
-236            }
-237            #[cfg(any(feature = "http1", feature = "http2"))]
-238            _ => ConnState::ReadVersion {
-239                read_version: read_version(io),
-240                builder: Cow::Borrowed(self),
-241                service: Some(service),
-242            },
-243        };
-244
-245        Connection { state }
-246    }
-247
-248    /// Bind a connection together with a [`Service`], with the ability to
-249    /// handle HTTP upgrades. This requires that the IO object implements
-250    /// `Send`.
-251    ///
-252    /// Note that if you ever want to use [`hyper::upgrade::Upgraded::downcast`]
-253    /// with this crate, you'll need to use [`hyper_util::server::conn::auto::upgrade::downcast`]
-254    /// instead. See the documentation of the latter to understand why.
-255    ///
-256    /// [`hyper_util::server::conn::auto::upgrade::downcast`]: crate::server::conn::auto::upgrade::downcast
-257    pub fn serve_connection_with_upgrades<I, S, B>(
-258        &self,
-259        io: I,
-260        service: S,
-261    ) -> UpgradeableConnection<'_, I, S, E>
-262    where
-263        S: Service<Request<Incoming>, Response = Response<B>>,
-264        S::Future: 'static,
-265        S::Error: Into<Box<dyn StdError + Send + Sync>>,
-266        B: Body + 'static,
-267        B::Error: Into<Box<dyn StdError + Send + Sync>>,
-268        I: Read + Write + Unpin + Send + 'static,
-269        E: HttpServerConnExec<S::Future, B>,
-270    {
-271        UpgradeableConnection {
-272            state: UpgradeableConnState::ReadVersion {
-273                read_version: read_version(io),
-274                builder: Cow::Borrowed(self),
-275                service: Some(service),
-276            },
-277        }
-278    }
-279}
-280
-281#[derive(Copy, Clone, Debug)]
-282enum Version {
-283    H1,
-284    H2,
-285}
-286
-287impl Version {
-288    #[must_use]
-289    #[cfg(any(not(feature = "http2"), not(feature = "http1")))]
-290    pub fn unsupported(self) -> Error {
-291        match self {
-292            Version::H1 => Error::from("HTTP/1 is not supported"),
-293            Version::H2 => Error::from("HTTP/2 is not supported"),
-294        }
-295    }
-296}
-297
-298fn read_version<I>(io: I) -> ReadVersion<I>
-299where
-300    I: Read + Unpin,
-301{
-302    ReadVersion {
-303        io: Some(io),
-304        buf: [MaybeUninit::uninit(); 24],
-305        filled: 0,
-306        version: Version::H2,
-307        cancelled: false,
-308        _pin: PhantomPinned,
-309    }
-310}
-311
-312pin_project! {
-313    struct ReadVersion<I> {
-314        io: Option<I>,
-315        buf: [MaybeUninit<u8>; 24],
-316        // the amount of `buf` thats been filled
-317        filled: usize,
-318        version: Version,
-319        cancelled: bool,
-320        // Make this future `!Unpin` for compatibility with async trait methods.
-321        #[pin]
-322        _pin: PhantomPinned,
-323    }
-324}
-325
-326impl<I> ReadVersion<I> {
-327    pub fn cancel(self: Pin<&mut Self>) {
-328        *self.project().cancelled = true;
-329    }
-330}
-331
-332impl<I> Future for ReadVersion<I>
-333where
-334    I: Read + Unpin,
-335{
-336    type Output = io::Result<(Version, Rewind<I>)>;
-337
-338    fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
-339        let this = self.project();
-340        if *this.cancelled {
-341            return Poll::Ready(Err(io::Error::new(io::ErrorKind::Interrupted, "Cancelled")));
-342        }
-343
-344        let mut buf = ReadBuf::uninit(&mut *this.buf);
-345        // SAFETY: `this.filled` tracks how many bytes have been read (and thus initialized) and
-346        // we're only advancing by that many.
-347        unsafe {
-348            buf.unfilled().advance(*this.filled);
-349        };
-350
-351        // We start as H2 and switch to H1 as soon as we don't have the preface.
-352        while buf.filled().len() < H2_PREFACE.len() {
-353            let len = buf.filled().len();
-354            ready!(Pin::new(this.io.as_mut().unwrap()).poll_read(cx, buf.unfilled()))?;
-355            *this.filled = buf.filled().len();
-356
-357            // We starts as H2 and switch to H1 when we don't get the preface.
-358            if buf.filled().len() == len
-359                || buf.filled()[len..] != H2_PREFACE[len..buf.filled().len()]
-360            {
-361                *this.version = Version::H1;
-362                break;
-363            }
-364        }
-365
-366        let io = this.io.take().unwrap();
-367        let buf = buf.filled().to_vec();
-368        Poll::Ready(Ok((
-369            *this.version,
-370            Rewind::new_buffered(io, Bytes::from(buf)),
-371        )))
-372    }
-373}
-374
-375pin_project! {
-376    /// A [`Future`](core::future::Future) representing an HTTP/1 connection, returned from
-377    /// [`Builder::serve_connection`](struct.Builder.html#method.serve_connection).
-378    ///
-379    /// To drive HTTP on this connection this future **must be polled**, typically with
-380    /// `.await`. If it isn't polled, no progress will be made on this connection.
-381    #[must_use = "futures do nothing unless polled"]
-382    pub struct Connection<'a, I, S, E>
-383    where
-384        S: HttpService<Incoming>,
-385    {
-386        #[pin]
-387        state: ConnState<'a, I, S, E>,
-388    }
-389}
-390
-391// A custom COW, since the libstd is has ToOwned bounds that are too eager.
-392enum Cow<'a, T> {
-393    Borrowed(&'a T),
-394    Owned(T),
-395}
-396
-397impl<T> std::ops::Deref for Cow<'_, T> {
-398    type Target = T;
-399    fn deref(&self) -> &T {
-400        match self {
-401            Cow::Borrowed(t) => &*t,
-402            Cow::Owned(ref t) => t,
-403        }
-404    }
-405}
-406
-407#[cfg(feature = "http1")]
-408type Http1Connection<I, S> = hyper::server::conn::http1::Connection<Rewind<I>, S>;
-409
-410#[cfg(not(feature = "http1"))]
-411type Http1Connection<I, S> = (PhantomData<I>, PhantomData<S>);
-412
-413#[cfg(feature = "http2")]
-414type Http2Connection<I, S, E> = hyper::server::conn::http2::Connection<Rewind<I>, S, E>;
-415
-416#[cfg(not(feature = "http2"))]
-417type Http2Connection<I, S, E> = (PhantomData<I>, PhantomData<S>, PhantomData<E>);
-418
-419pin_project! {
-420    #[project = ConnStateProj]
-421    enum ConnState<'a, I, S, E>
-422    where
-423        S: HttpService<Incoming>,
-424    {
-425        ReadVersion {
-426            #[pin]
-427            read_version: ReadVersion<I>,
-428            builder: Cow<'a, Builder<E>>,
-429            service: Option<S>,
-430        },
-431        H1 {
-432            #[pin]
-433            conn: Http1Connection<I, S>,
-434        },
-435        H2 {
-436            #[pin]
-437            conn: Http2Connection<I, S, E>,
-438        },
-439    }
-440}
-441
-442impl<I, S, E, B> Connection<'_, I, S, E>
-443where
-444    S: HttpService<Incoming, ResBody = B>,
-445    S::Error: Into<Box<dyn StdError + Send + Sync>>,
-446    I: Read + Write + Unpin,
-447    B: Body + 'static,
-448    B::Error: Into<Box<dyn StdError + Send + Sync>>,
-449    E: HttpServerConnExec<S::Future, B>,
-450{
-451    /// Start a graceful shutdown process for this connection.
-452    ///
-453    /// This `Connection` should continue to be polled until shutdown can finish.
-454    ///
-455    /// # Note
-456    ///
-457    /// This should only be called while the `Connection` future is still pending. If called after
-458    /// `Connection::poll` has resolved, this does nothing.
-459    pub fn graceful_shutdown(self: Pin<&mut Self>) {
-460        match self.project().state.project() {
-461            ConnStateProj::ReadVersion { read_version, .. } => read_version.cancel(),
-462            #[cfg(feature = "http1")]
-463            ConnStateProj::H1 { conn } => conn.graceful_shutdown(),
-464            #[cfg(feature = "http2")]
-465            ConnStateProj::H2 { conn } => conn.graceful_shutdown(),
-466            #[cfg(any(not(feature = "http1"), not(feature = "http2")))]
-467            _ => unreachable!(),
-468        }
-469    }
-470
-471    /// Make this Connection static, instead of borrowing from Builder.
-472    pub fn into_owned(self) -> Connection<'static, I, S, E>
-473    where
-474        Builder<E>: Clone,
-475    {
-476        Connection {
-477            state: match self.state {
-478                ConnState::ReadVersion {
-479                    read_version,
-480                    builder,
-481                    service,
-482                } => ConnState::ReadVersion {
-483                    read_version,
-484                    service,
-485                    builder: Cow::Owned(builder.clone()),
-486                },
-487                #[cfg(feature = "http1")]
-488                ConnState::H1 { conn } => ConnState::H1 { conn },
-489                #[cfg(feature = "http2")]
-490                ConnState::H2 { conn } => ConnState::H2 { conn },
-491                #[cfg(any(not(feature = "http1"), not(feature = "http2")))]
-492                _ => unreachable!(),
-493            },
-494        }
-495    }
-496}
-497
-498impl<I, S, E, B> Future for Connection<'_, I, S, E>
-499where
-500    S: Service<Request<Incoming>, Response = Response<B>>,
-501    S::Future: 'static,
-502    S::Error: Into<Box<dyn StdError + Send + Sync>>,
-503    B: Body + 'static,
-504    B::Error: Into<Box<dyn StdError + Send + Sync>>,
-505    I: Read + Write + Unpin + 'static,
-506    E: HttpServerConnExec<S::Future, B>,
-507{
-508    type Output = Result<()>;
-509
-510    fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
-511        loop {
-512            let mut this = self.as_mut().project();
-513
-514            match this.state.as_mut().project() {
-515                ConnStateProj::ReadVersion {
-516                    read_version,
-517                    builder,
-518                    service,
-519                } => {
-520                    let (version, io) = ready!(read_version.poll(cx))?;
-521                    let service = service.take().unwrap();
-522                    match version {
-523                        #[cfg(feature = "http1")]
-524                        Version::H1 => {
-525                            let conn = builder.http1.serve_connection(io, service);
-526                            this.state.set(ConnState::H1 { conn });
-527                        }
-528                        #[cfg(feature = "http2")]
-529                        Version::H2 => {
-530                            let conn = builder.http2.serve_connection(io, service);
-531                            this.state.set(ConnState::H2 { conn });
-532                        }
-533                        #[cfg(any(not(feature = "http1"), not(feature = "http2")))]
-534                        _ => return Poll::Ready(Err(version.unsupported())),
-535                    }
-536                }
-537                #[cfg(feature = "http1")]
-538                ConnStateProj::H1 { conn } => {
-539                    return conn.poll(cx).map_err(Into::into);
-540                }
-541                #[cfg(feature = "http2")]
-542                ConnStateProj::H2 { conn } => {
-543                    return conn.poll(cx).map_err(Into::into);
-544                }
-545                #[cfg(any(not(feature = "http1"), not(feature = "http2")))]
-546                _ => unreachable!(),
-547            }
-548        }
-549    }
-550}
-551
-552pin_project! {
-553    /// An upgradable [`Connection`], returned by
-554    /// [`Builder::serve_upgradable_connection`](struct.Builder.html#method.serve_connection_with_upgrades).
-555    ///
-556    /// To drive HTTP on this connection this future **must be polled**, typically with
-557    /// `.await`. If it isn't polled, no progress will be made on this connection.
-558    #[must_use = "futures do nothing unless polled"]
-559    pub struct UpgradeableConnection<'a, I, S, E>
-560    where
-561        S: HttpService<Incoming>,
-562    {
-563        #[pin]
-564        state: UpgradeableConnState<'a, I, S, E>,
-565    }
-566}
-567
-568#[cfg(feature = "http1")]
-569type Http1UpgradeableConnection<I, S> = hyper::server::conn::http1::UpgradeableConnection<I, S>;
-570
-571#[cfg(not(feature = "http1"))]
-572type Http1UpgradeableConnection<I, S> = (PhantomData<I>, PhantomData<S>);
-573
-574pin_project! {
-575    #[project = UpgradeableConnStateProj]
-576    enum UpgradeableConnState<'a, I, S, E>
-577    where
-578        S: HttpService<Incoming>,
-579    {
-580        ReadVersion {
-581            #[pin]
-582            read_version: ReadVersion<I>,
-583            builder: Cow<'a, Builder<E>>,
-584            service: Option<S>,
-585        },
-586        H1 {
-587            #[pin]
-588            conn: Http1UpgradeableConnection<Rewind<I>, S>,
-589        },
-590        H2 {
-591            #[pin]
-592            conn: Http2Connection<I, S, E>,
-593        },
-594    }
-595}
-596
-597impl<I, S, E, B> UpgradeableConnection<'_, I, S, E>
-598where
-599    S: HttpService<Incoming, ResBody = B>,
-600    S::Error: Into<Box<dyn StdError + Send + Sync>>,
-601    I: Read + Write + Unpin,
-602    B: Body + 'static,
-603    B::Error: Into<Box<dyn StdError + Send + Sync>>,
-604    E: HttpServerConnExec<S::Future, B>,
-605{
-606    /// Start a graceful shutdown process for this connection.
-607    ///
-608    /// This `UpgradeableConnection` should continue to be polled until shutdown can finish.
-609    ///
-610    /// # Note
-611    ///
-612    /// This should only be called while the `Connection` future is still nothing. pending. If
-613    /// called after `UpgradeableConnection::poll` has resolved, this does nothing.
-614    pub fn graceful_shutdown(self: Pin<&mut Self>) {
-615        match self.project().state.project() {
-616            UpgradeableConnStateProj::ReadVersion { read_version, .. } => read_version.cancel(),
-617            #[cfg(feature = "http1")]
-618            UpgradeableConnStateProj::H1 { conn } => conn.graceful_shutdown(),
-619            #[cfg(feature = "http2")]
-620            UpgradeableConnStateProj::H2 { conn } => conn.graceful_shutdown(),
-621            #[cfg(any(not(feature = "http1"), not(feature = "http2")))]
-622            _ => unreachable!(),
-623        }
-624    }
-625
-626    /// Make this Connection static, instead of borrowing from Builder.
-627    pub fn into_owned(self) -> UpgradeableConnection<'static, I, S, E>
-628    where
-629        Builder<E>: Clone,
-630    {
-631        UpgradeableConnection {
-632            state: match self.state {
-633                UpgradeableConnState::ReadVersion {
-634                    read_version,
-635                    builder,
-636                    service,
-637                } => UpgradeableConnState::ReadVersion {
-638                    read_version,
-639                    service,
-640                    builder: Cow::Owned(builder.clone()),
-641                },
-642                #[cfg(feature = "http1")]
-643                UpgradeableConnState::H1 { conn } => UpgradeableConnState::H1 { conn },
-644                #[cfg(feature = "http2")]
-645                UpgradeableConnState::H2 { conn } => UpgradeableConnState::H2 { conn },
-646                #[cfg(any(not(feature = "http1"), not(feature = "http2")))]
-647                _ => unreachable!(),
-648            },
-649        }
-650    }
-651}
-652
-653impl<I, S, E, B> Future for UpgradeableConnection<'_, I, S, E>
-654where
-655    S: Service<Request<Incoming>, Response = Response<B>>,
-656    S::Future: 'static,
-657    S::Error: Into<Box<dyn StdError + Send + Sync>>,
-658    B: Body + 'static,
-659    B::Error: Into<Box<dyn StdError + Send + Sync>>,
-660    I: Read + Write + Unpin + Send + 'static,
-661    E: HttpServerConnExec<S::Future, B>,
-662{
-663    type Output = Result<()>;
-664
-665    fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
-666        loop {
-667            let mut this = self.as_mut().project();
-668
-669            match this.state.as_mut().project() {
-670                UpgradeableConnStateProj::ReadVersion {
-671                    read_version,
-672                    builder,
-673                    service,
-674                } => {
-675                    let (version, io) = ready!(read_version.poll(cx))?;
-676                    let service = service.take().unwrap();
-677                    match version {
-678                        #[cfg(feature = "http1")]
-679                        Version::H1 => {
-680                            let conn = builder.http1.serve_connection(io, service).with_upgrades();
-681                            this.state.set(UpgradeableConnState::H1 { conn });
-682                        }
-683                        #[cfg(feature = "http2")]
-684                        Version::H2 => {
-685                            let conn = builder.http2.serve_connection(io, service);
-686                            this.state.set(UpgradeableConnState::H2 { conn });
-687                        }
-688                        #[cfg(any(not(feature = "http1"), not(feature = "http2")))]
-689                        _ => return Poll::Ready(Err(version.unsupported())),
-690                    }
-691                }
-692                #[cfg(feature = "http1")]
-693                UpgradeableConnStateProj::H1 { conn } => {
-694                    return conn.poll(cx).map_err(Into::into);
-695                }
-696                #[cfg(feature = "http2")]
-697                UpgradeableConnStateProj::H2 { conn } => {
-698                    return conn.poll(cx).map_err(Into::into);
-699                }
-700                #[cfg(any(not(feature = "http1"), not(feature = "http2")))]
-701                _ => unreachable!(),
-702            }
-703        }
-704    }
-705}
-706
-707/// Http1 part of builder.
-708#[cfg(feature = "http1")]
-709pub struct Http1Builder<'a, E> {
-710    inner: &'a mut Builder<E>,
-711}
-712
-713#[cfg(feature = "http1")]
-714impl<E> Http1Builder<'_, E> {
-715    /// Http2 configuration.
-716    #[cfg(feature = "http2")]
-717    pub fn http2(&mut self) -> Http2Builder<'_, E> {
-718        Http2Builder { inner: self.inner }
-719    }
-720
-721    /// Set whether the `date` header should be included in HTTP responses.
-722    ///
-723    /// Note that including the `date` header is recommended by RFC 7231.
-724    ///
-725    /// Default is true.
-726    pub fn auto_date_header(&mut self, enabled: bool) -> &mut Self {
-727        self.inner.http1.auto_date_header(enabled);
-728        self
-729    }
-730
-731    /// Set whether HTTP/1 connections should support half-closures.
-732    ///
-733    /// Clients can chose to shutdown their write-side while waiting
-734    /// for the server to respond. Setting this to `true` will
-735    /// prevent closing the connection immediately if `read`
-736    /// detects an EOF in the middle of a request.
-737    ///
-738    /// Default is `false`.
-739    pub fn half_close(&mut self, val: bool) -> &mut Self {
-740        self.inner.http1.half_close(val);
-741        self
-742    }
-743
-744    /// Enables or disables HTTP/1 keep-alive.
-745    ///
-746    /// Default is true.
-747    pub fn keep_alive(&mut self, val: bool) -> &mut Self {
-748        self.inner.http1.keep_alive(val);
-749        self
-750    }
-751
-752    /// Set whether HTTP/1 connections will write header names as title case at
-753    /// the socket level.
-754    ///
-755    /// Note that this setting does not affect HTTP/2.
-756    ///
-757    /// Default is false.
-758    pub fn title_case_headers(&mut self, enabled: bool) -> &mut Self {
-759        self.inner.http1.title_case_headers(enabled);
-760        self
-761    }
-762
-763    /// Set whether HTTP/1 connections will silently ignored malformed header lines.
-764    ///
-765    /// If this is enabled and a header line does not start with a valid header
-766    /// name, or does not include a colon at all, the line will be silently ignored
-767    /// and no error will be reported.
-768    ///
-769    /// Default is false.
-770    pub fn ignore_invalid_headers(&mut self, enabled: bool) -> &mut Self {
-771        self.inner.http1.ignore_invalid_headers(enabled);
-772        self
-773    }
-774
-775    /// Set whether to support preserving original header cases.
-776    ///
-777    /// Currently, this will record the original cases received, and store them
-778    /// in a private extension on the `Request`. It will also look for and use
-779    /// such an extension in any provided `Response`.
-780    ///
-781    /// Since the relevant extension is still private, there is no way to
-782    /// interact with the original cases. The only effect this can have now is
-783    /// to forward the cases in a proxy-like fashion.
-784    ///
-785    /// Note that this setting does not affect HTTP/2.
-786    ///
-787    /// Default is false.
-788    pub fn preserve_header_case(&mut self, enabled: bool) -> &mut Self {
-789        self.inner.http1.preserve_header_case(enabled);
-790        self
-791    }
-792
-793    /// Set the maximum number of headers.
-794    ///
-795    /// When a request is received, the parser will reserve a buffer to store headers for optimal
-796    /// performance.
-797    ///
-798    /// If server receives more headers than the buffer size, it responds to the client with
-799    /// "431 Request Header Fields Too Large".
-800    ///
-801    /// The headers is allocated on the stack by default, which has higher performance. After
-802    /// setting this value, headers will be allocated in heap memory, that is, heap memory
-803    /// allocation will occur for each request, and there will be a performance drop of about 5%.
-804    ///
-805    /// Note that this setting does not affect HTTP/2.
-806    ///
-807    /// Default is 100.
-808    pub fn max_headers(&mut self, val: usize) -> &mut Self {
-809        self.inner.http1.max_headers(val);
-810        self
-811    }
-812
-813    /// Set a timeout for reading client request headers. If a client does not
-814    /// transmit the entire header within this time, the connection is closed.
-815    ///
-816    /// Requires a [`Timer`] set by [`Http1Builder::timer`] to take effect. Panics if `header_read_timeout` is configured
-817    /// without a [`Timer`].
-818    ///
-819    /// Pass `None` to disable.
-820    ///
-821    /// Default is currently 30 seconds, but do not depend on that.
-822    pub fn header_read_timeout(&mut self, read_timeout: impl Into<Option<Duration>>) -> &mut Self {
-823        self.inner.http1.header_read_timeout(read_timeout);
-824        self
-825    }
-826
-827    /// Set whether HTTP/1 connections should try to use vectored writes,
-828    /// or always flatten into a single buffer.
-829    ///
-830    /// Note that setting this to false may mean more copies of body data,
-831    /// but may also improve performance when an IO transport doesn't
-832    /// support vectored writes well, such as most TLS implementations.
-833    ///
-834    /// Setting this to true will force hyper to use queued strategy
-835    /// which may eliminate unnecessary cloning on some TLS backends
-836    ///
-837    /// Default is `auto`. In this mode hyper will try to guess which
-838    /// mode to use
-839    pub fn writev(&mut self, val: bool) -> &mut Self {
-840        self.inner.http1.writev(val);
-841        self
-842    }
-843
-844    /// Set the maximum buffer size for the connection.
-845    ///
-846    /// Default is ~400kb.
-847    ///
-848    /// # Panics
-849    ///
-850    /// The minimum value allowed is 8192. This method panics if the passed `max` is less than the minimum.
-851    pub fn max_buf_size(&mut self, max: usize) -> &mut Self {
-852        self.inner.http1.max_buf_size(max);
-853        self
-854    }
-855
-856    /// Aggregates flushes to better support pipelined responses.
-857    ///
-858    /// Experimental, may have bugs.
-859    ///
-860    /// Default is false.
-861    pub fn pipeline_flush(&mut self, enabled: bool) -> &mut Self {
-862        self.inner.http1.pipeline_flush(enabled);
-863        self
-864    }
-865
-866    /// Set the timer used in background tasks.
-867    pub fn timer<M>(&mut self, timer: M) -> &mut Self
-868    where
-869        M: Timer + Send + Sync + 'static,
-870    {
-871        self.inner.http1.timer(timer);
-872        self
-873    }
-874
-875    /// Bind a connection together with a [`Service`].
-876    #[cfg(feature = "http2")]
-877    pub async fn serve_connection<I, S, B>(&self, io: I, service: S) -> Result<()>
-878    where
-879        S: Service<Request<Incoming>, Response = Response<B>>,
-880        S::Future: 'static,
-881        S::Error: Into<Box<dyn StdError + Send + Sync>>,
-882        B: Body + 'static,
-883        B::Error: Into<Box<dyn StdError + Send + Sync>>,
-884        I: Read + Write + Unpin + 'static,
-885        E: HttpServerConnExec<S::Future, B>,
-886    {
-887        self.inner.serve_connection(io, service).await
-888    }
-889
-890    /// Bind a connection together with a [`Service`].
-891    #[cfg(not(feature = "http2"))]
-892    pub async fn serve_connection<I, S, B>(&self, io: I, service: S) -> Result<()>
-893    where
-894        S: Service<Request<Incoming>, Response = Response<B>>,
-895        S::Future: 'static,
-896        S::Error: Into<Box<dyn StdError + Send + Sync>>,
-897        B: Body + 'static,
-898        B::Error: Into<Box<dyn StdError + Send + Sync>>,
-899        I: Read + Write + Unpin + 'static,
-900    {
-901        self.inner.serve_connection(io, service).await
-902    }
-903
-904    /// Bind a connection together with a [`Service`], with the ability to
-905    /// handle HTTP upgrades. This requires that the IO object implements
-906    /// `Send`.
-907    #[cfg(feature = "http2")]
-908    pub fn serve_connection_with_upgrades<I, S, B>(
-909        &self,
-910        io: I,
-911        service: S,
-912    ) -> UpgradeableConnection<'_, I, S, E>
-913    where
-914        S: Service<Request<Incoming>, Response = Response<B>>,
-915        S::Future: 'static,
-916        S::Error: Into<Box<dyn StdError + Send + Sync>>,
-917        B: Body + 'static,
-918        B::Error: Into<Box<dyn StdError + Send + Sync>>,
-919        I: Read + Write + Unpin + Send + 'static,
-920        E: HttpServerConnExec<S::Future, B>,
-921    {
-922        self.inner.serve_connection_with_upgrades(io, service)
-923    }
-924}
-925
-926/// Http2 part of builder.
-927#[cfg(feature = "http2")]
-928pub struct Http2Builder<'a, E> {
-929    inner: &'a mut Builder<E>,
-930}
-931
-932#[cfg(feature = "http2")]
-933impl<E> Http2Builder<'_, E> {
-934    #[cfg(feature = "http1")]
-935    /// Http1 configuration.
-936    pub fn http1(&mut self) -> Http1Builder<'_, E> {
-937        Http1Builder { inner: self.inner }
-938    }
-939
-940    /// Configures the maximum number of pending reset streams allowed before a GOAWAY will be sent.
-941    ///
-942    /// This will default to the default value set by the [`h2` crate](https://crates.io/crates/h2).
-943    /// As of v0.4.0, it is 20.
-944    ///
-945    /// See <https://github.com/hyperium/hyper/issues/2877> for more information.
-946    pub fn max_pending_accept_reset_streams(&mut self, max: impl Into<Option<usize>>) -> &mut Self {
-947        self.inner.http2.max_pending_accept_reset_streams(max);
-948        self
-949    }
-950
-951    /// Configures the maximum number of local reset streams allowed before a GOAWAY will be sent.
-952    ///
-953    /// If not set, hyper will use a default, currently of 1024.
-954    ///
-955    /// If `None` is supplied, hyper will not apply any limit.
-956    /// This is not advised, as it can potentially expose servers to DOS vulnerabilities.
-957    ///
-958    /// See <https://rustsec.org/advisories/RUSTSEC-2024-0003.html> for more information.
-959    pub fn max_local_error_reset_streams(&mut self, max: impl Into<Option<usize>>) -> &mut Self {
-960        self.inner.http2.max_local_error_reset_streams(max);
-961        self
-962    }
-963
-964    /// Sets the [`SETTINGS_INITIAL_WINDOW_SIZE`][spec] option for HTTP2
-965    /// stream-level flow control.
-966    ///
-967    /// Passing `None` will do nothing.
-968    ///
-969    /// If not set, hyper will use a default.
-970    ///
-971    /// [spec]: https://http2.github.io/http2-spec/#SETTINGS_INITIAL_WINDOW_SIZE
-972    pub fn initial_stream_window_size(&mut self, sz: impl Into<Option<u32>>) -> &mut Self {
-973        self.inner.http2.initial_stream_window_size(sz);
-974        self
-975    }
-976
-977    /// Sets the max connection-level flow control for HTTP2.
-978    ///
-979    /// Passing `None` will do nothing.
-980    ///
-981    /// If not set, hyper will use a default.
-982    pub fn initial_connection_window_size(&mut self, sz: impl Into<Option<u32>>) -> &mut Self {
-983        self.inner.http2.initial_connection_window_size(sz);
-984        self
-985    }
-986
-987    /// Sets whether to use an adaptive flow control.
-988    ///
-989    /// Enabling this will override the limits set in
-990    /// `http2_initial_stream_window_size` and
-991    /// `http2_initial_connection_window_size`.
-992    pub fn adaptive_window(&mut self, enabled: bool) -> &mut Self {
-993        self.inner.http2.adaptive_window(enabled);
-994        self
-995    }
-996
-997    /// Sets the maximum frame size to use for HTTP2.
-998    ///
-999    /// Passing `None` will do nothing.
-1000    ///
-1001    /// If not set, hyper will use a default.
-1002    pub fn max_frame_size(&mut self, sz: impl Into<Option<u32>>) -> &mut Self {
-1003        self.inner.http2.max_frame_size(sz);
-1004        self
-1005    }
-1006
-1007    /// Sets the [`SETTINGS_MAX_CONCURRENT_STREAMS`][spec] option for HTTP2
-1008    /// connections.
-1009    ///
-1010    /// Default is 200. Passing `None` will remove any limit.
-1011    ///
-1012    /// [spec]: https://http2.github.io/http2-spec/#SETTINGS_MAX_CONCURRENT_STREAMS
-1013    pub fn max_concurrent_streams(&mut self, max: impl Into<Option<u32>>) -> &mut Self {
-1014        self.inner.http2.max_concurrent_streams(max);
-1015        self
-1016    }
-1017
-1018    /// Sets an interval for HTTP2 Ping frames should be sent to keep a
-1019    /// connection alive.
-1020    ///
-1021    /// Pass `None` to disable HTTP2 keep-alive.
-1022    ///
-1023    /// Default is currently disabled.
-1024    ///
-1025    /// # Cargo Feature
-1026    ///
-1027    pub fn keep_alive_interval(&mut self, interval: impl Into<Option<Duration>>) -> &mut Self {
-1028        self.inner.http2.keep_alive_interval(interval);
-1029        self
-1030    }
-1031
-1032    /// Sets a timeout for receiving an acknowledgement of the keep-alive ping.
-1033    ///
-1034    /// If the ping is not acknowledged within the timeout, the connection will
-1035    /// be closed. Does nothing if `http2_keep_alive_interval` is disabled.
-1036    ///
-1037    /// Default is 20 seconds.
-1038    ///
-1039    /// # Cargo Feature
-1040    ///
-1041    pub fn keep_alive_timeout(&mut self, timeout: Duration) -> &mut Self {
-1042        self.inner.http2.keep_alive_timeout(timeout);
-1043        self
-1044    }
-1045
-1046    /// Set the maximum write buffer size for each HTTP/2 stream.
-1047    ///
-1048    /// Default is currently ~400KB, but may change.
-1049    ///
-1050    /// # Panics
-1051    ///
-1052    /// The value must be no larger than `u32::MAX`.
-1053    pub fn max_send_buf_size(&mut self, max: usize) -> &mut Self {
-1054        self.inner.http2.max_send_buf_size(max);
-1055        self
-1056    }
-1057
-1058    /// Enables the [extended CONNECT protocol].
-1059    ///
-1060    /// [extended CONNECT protocol]: https://datatracker.ietf.org/doc/html/rfc8441#section-4
-1061    pub fn enable_connect_protocol(&mut self) -> &mut Self {
-1062        self.inner.http2.enable_connect_protocol();
-1063        self
-1064    }
-1065
-1066    /// Sets the max size of received header frames.
-1067    ///
-1068    /// Default is currently ~16MB, but may change.
-1069    pub fn max_header_list_size(&mut self, max: u32) -> &mut Self {
-1070        self.inner.http2.max_header_list_size(max);
-1071        self
-1072    }
-1073
-1074    /// Set the timer used in background tasks.
-1075    pub fn timer<M>(&mut self, timer: M) -> &mut Self
-1076    where
-1077        M: Timer + Send + Sync + 'static,
-1078    {
-1079        self.inner.http2.timer(timer);
-1080        self
-1081    }
-1082
-1083    /// Set whether the `date` header should be included in HTTP responses.
-1084    ///
-1085    /// Note that including the `date` header is recommended by RFC 7231.
-1086    ///
-1087    /// Default is true.
-1088    pub fn auto_date_header(&mut self, enabled: bool) -> &mut Self {
-1089        self.inner.http2.auto_date_header(enabled);
-1090        self
-1091    }
-1092
-1093    /// Bind a connection together with a [`Service`].
-1094    pub async fn serve_connection<I, S, B>(&self, io: I, service: S) -> Result<()>
-1095    where
-1096        S: Service<Request<Incoming>, Response = Response<B>>,
-1097        S::Future: 'static,
-1098        S::Error: Into<Box<dyn StdError + Send + Sync>>,
-1099        B: Body + 'static,
-1100        B::Error: Into<Box<dyn StdError + Send + Sync>>,
-1101        I: Read + Write + Unpin + 'static,
-1102        E: HttpServerConnExec<S::Future, B>,
-1103    {
-1104        self.inner.serve_connection(io, service).await
-1105    }
-1106
-1107    /// Bind a connection together with a [`Service`], with the ability to
-1108    /// handle HTTP upgrades. This requires that the IO object implements
-1109    /// `Send`.
-1110    pub fn serve_connection_with_upgrades<I, S, B>(
-1111        &self,
-1112        io: I,
-1113        service: S,
-1114    ) -> UpgradeableConnection<'_, I, S, E>
-1115    where
-1116        S: Service<Request<Incoming>, Response = Response<B>>,
-1117        S::Future: 'static,
-1118        S::Error: Into<Box<dyn StdError + Send + Sync>>,
-1119        B: Body + 'static,
-1120        B::Error: Into<Box<dyn StdError + Send + Sync>>,
-1121        I: Read + Write + Unpin + Send + 'static,
-1122        E: HttpServerConnExec<S::Future, B>,
-1123    {
-1124        self.inner.serve_connection_with_upgrades(io, service)
-1125    }
-1126}
-1127
-1128#[cfg(test)]
-1129mod tests {
-1130    use crate::{
-1131        rt::{TokioExecutor, TokioIo},
-1132        server::conn::auto,
-1133    };
-1134    use http::{Request, Response};
-1135    use http_body::Body;
-1136    use http_body_util::{BodyExt, Empty, Full};
-1137    use hyper::{body, body::Bytes, client, service::service_fn};
-1138    use std::{convert::Infallible, error::Error as StdError, net::SocketAddr, time::Duration};
-1139    use tokio::{
-1140        net::{TcpListener, TcpStream},
-1141        pin,
-1142    };
-1143
-1144    const BODY: &[u8] = b"Hello, world!";
-1145
-1146    #[test]
-1147    fn configuration() {
-1148        // One liner.
-1149        auto::Builder::new(TokioExecutor::new())
-1150            .http1()
-1151            .keep_alive(true)
-1152            .http2()
-1153            .keep_alive_interval(None);
-1154        //  .serve_connection(io, service);
-1155
-1156        // Using variable.
-1157        let mut builder = auto::Builder::new(TokioExecutor::new());
-1158
-1159        builder.http1().keep_alive(true);
-1160        builder.http2().keep_alive_interval(None);
-1161        // builder.serve_connection(io, service);
-1162    }
-1163
-1164    #[test]
-1165    #[cfg(feature = "http1")]
-1166    fn title_case_headers_configuration() {
-1167        // Test title_case_headers can be set on the main builder
-1168        auto::Builder::new(TokioExecutor::new()).title_case_headers(true);
-1169
-1170        // Can be combined with other configuration
-1171        auto::Builder::new(TokioExecutor::new())
-1172            .title_case_headers(true)
-1173            .http1_only();
-1174    }
-1175
-1176    #[test]
-1177    #[cfg(feature = "http1")]
-1178    fn preserve_header_case_configuration() {
-1179        // Test preserve_header_case can be set on the main builder
-1180        auto::Builder::new(TokioExecutor::new()).preserve_header_case(true);
-1181
-1182        // Can be combined with other configuration
-1183        auto::Builder::new(TokioExecutor::new())
-1184            .preserve_header_case(true)
-1185            .http1_only();
-1186    }
-1187
-1188    #[cfg(not(miri))]
-1189    #[tokio::test]
-1190    async fn http1() {
-1191        let addr = start_server(false, false).await;
-1192        let mut sender = connect_h1(addr).await;
-1193
-1194        let response = sender
-1195            .send_request(Request::new(Empty::<Bytes>::new()))
-1196            .await
-1197            .unwrap();
-1198
-1199        let body = response.into_body().collect().await.unwrap().to_bytes();
-1200
-1201        assert_eq!(body, BODY);
-1202    }
-1203
-1204    #[cfg(not(miri))]
-1205    #[tokio::test]
-1206    async fn http2() {
-1207        let addr = start_server(false, false).await;
-1208        let mut sender = connect_h2(addr).await;
-1209
-1210        let response = sender
-1211            .send_request(Request::new(Empty::<Bytes>::new()))
-1212            .await
-1213            .unwrap();
-1214
-1215        let body = response.into_body().collect().await.unwrap().to_bytes();
-1216
-1217        assert_eq!(body, BODY);
-1218    }
-1219
-1220    #[cfg(not(miri))]
-1221    #[tokio::test]
-1222    async fn http2_only() {
-1223        let addr = start_server(false, true).await;
-1224        let mut sender = connect_h2(addr).await;
-1225
-1226        let response = sender
-1227            .send_request(Request::new(Empty::<Bytes>::new()))
-1228            .await
-1229            .unwrap();
-1230
-1231        let body = response.into_body().collect().await.unwrap().to_bytes();
-1232
-1233        assert_eq!(body, BODY);
-1234    }
-1235
-1236    #[cfg(not(miri))]
-1237    #[tokio::test]
-1238    async fn http2_only_fail_if_client_is_http1() {
-1239        let addr = start_server(false, true).await;
-1240        let mut sender = connect_h1(addr).await;
-1241
-1242        let _ = sender
-1243            .send_request(Request::new(Empty::<Bytes>::new()))
-1244            .await
-1245            .expect_err("should fail");
-1246    }
-1247
-1248    #[cfg(not(miri))]
-1249    #[tokio::test]
-1250    async fn http1_only() {
-1251        let addr = start_server(true, false).await;
-1252        let mut sender = connect_h1(addr).await;
-1253
-1254        let response = sender
-1255            .send_request(Request::new(Empty::<Bytes>::new()))
-1256            .await
-1257            .unwrap();
-1258
-1259        let body = response.into_body().collect().await.unwrap().to_bytes();
-1260
-1261        assert_eq!(body, BODY);
-1262    }
-1263
-1264    #[cfg(not(miri))]
-1265    #[tokio::test]
-1266    async fn http1_only_fail_if_client_is_http2() {
-1267        let addr = start_server(true, false).await;
-1268        let mut sender = connect_h2(addr).await;
-1269
-1270        let _ = sender
-1271            .send_request(Request::new(Empty::<Bytes>::new()))
-1272            .await
-1273            .expect_err("should fail");
-1274    }
-1275
-1276    #[cfg(not(miri))]
-1277    #[tokio::test]
-1278    async fn graceful_shutdown() {
-1279        let listener = TcpListener::bind(SocketAddr::from(([127, 0, 0, 1], 0)))
-1280            .await
-1281            .unwrap();
-1282
-1283        let listener_addr = listener.local_addr().unwrap();
-1284
-1285        // Spawn the task in background so that we can connect there
-1286        let listen_task = tokio::spawn(async move { listener.accept().await.unwrap() });
-1287        // Only connect a stream, do not send headers or anything
-1288        let _stream = TcpStream::connect(listener_addr).await.unwrap();
-1289
-1290        let (stream, _) = listen_task.await.unwrap();
-1291        let stream = TokioIo::new(stream);
-1292        let builder = auto::Builder::new(TokioExecutor::new());
-1293        let connection = builder.serve_connection(stream, service_fn(hello));
-1294
-1295        pin!(connection);
-1296
-1297        connection.as_mut().graceful_shutdown();
-1298
-1299        let connection_error = tokio::time::timeout(Duration::from_millis(200), connection)
-1300            .await
-1301            .expect("Connection should have finished in a timely manner after graceful shutdown.")
-1302            .expect_err("Connection should have been interrupted.");
-1303
-1304        let connection_error = connection_error
-1305            .downcast_ref::<std::io::Error>()
-1306            .expect("The error should have been `std::io::Error`.");
-1307        assert_eq!(connection_error.kind(), std::io::ErrorKind::Interrupted);
-1308    }
-1309
-1310    async fn connect_h1<B>(addr: SocketAddr) -> client::conn::http1::SendRequest<B>
-1311    where
-1312        B: Body + Send + 'static,
-1313        B::Data: Send,
-1314        B::Error: Into<Box<dyn StdError + Send + Sync>>,
-1315    {
-1316        let stream = TokioIo::new(TcpStream::connect(addr).await.unwrap());
-1317        let (sender, connection) = client::conn::http1::handshake(stream).await.unwrap();
-1318
-1319        tokio::spawn(connection);
-1320
-1321        sender
-1322    }
-1323
-1324    async fn connect_h2<B>(addr: SocketAddr) -> client::conn::http2::SendRequest<B>
-1325    where
-1326        B: Body + Unpin + Send + 'static,
-1327        B::Data: Send,
-1328        B::Error: Into<Box<dyn StdError + Send + Sync>>,
-1329    {
-1330        let stream = TokioIo::new(TcpStream::connect(addr).await.unwrap());
-1331        let (sender, connection) = client::conn::http2::Builder::new(TokioExecutor::new())
-1332            .handshake(stream)
-1333            .await
-1334            .unwrap();
-1335
-1336        tokio::spawn(connection);
-1337
-1338        sender
-1339    }
-1340
-1341    async fn start_server(h1_only: bool, h2_only: bool) -> SocketAddr {
-1342        let addr: SocketAddr = ([127, 0, 0, 1], 0).into();
-1343        let listener = TcpListener::bind(addr).await.unwrap();
-1344
-1345        let local_addr = listener.local_addr().unwrap();
-1346
-1347        tokio::spawn(async move {
-1348            loop {
-1349                let (stream, _) = listener.accept().await.unwrap();
-1350                let stream = TokioIo::new(stream);
-1351                tokio::task::spawn(async move {
-1352                    let mut builder = auto::Builder::new(TokioExecutor::new());
-1353                    if h1_only {
-1354                        builder = builder.http1_only();
-1355                        builder.serve_connection(stream, service_fn(hello)).await
-1356                    } else if h2_only {
-1357                        builder = builder.http2_only();
-1358                        builder.serve_connection(stream, service_fn(hello)).await
-1359                    } else {
-1360                        builder
-1361                            .http2()
-1362                            .max_header_list_size(4096)
-1363                            .serve_connection_with_upgrades(stream, service_fn(hello))
-1364                            .await
-1365                    }
-1366                    .unwrap();
-1367                });
-1368            }
-1369        });
-1370
-1371        local_addr
-1372    }
-1373
-1374    async fn hello(_req: Request<body::Incoming>) -> Result<Response<Full<Bytes>>, Infallible> {
-1375        Ok(Response::new(Full::new(Bytes::from(BODY))))
-1376    }
-1377}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/server/conn/auto/upgrade.rs.html b/core/target/doc/src/hyper_util/server/conn/auto/upgrade.rs.html deleted file mode 100644 index f4e441dc..00000000 --- a/core/target/doc/src/hyper_util/server/conn/auto/upgrade.rs.html +++ /dev/null @@ -1,69 +0,0 @@ -upgrade.rs - source

hyper_util/server/conn/auto/
upgrade.rs

1//! Upgrade utilities.
-2
-3use bytes::{Bytes, BytesMut};
-4use hyper::{
-5    rt::{Read, Write},
-6    upgrade::Upgraded,
-7};
-8
-9use crate::common::rewind::Rewind;
-10
-11/// Tries to downcast the internal trait object to the type passed.
-12///
-13/// On success, returns the downcasted parts. On error, returns the Upgraded back.
-14/// This is a kludge to work around the fact that the machinery provided by
-15/// [`hyper_util::server::conn::auto`] wraps the inner `T` with a private type
-16/// that is not reachable from outside the crate.
-17///
-18/// [`hyper_util::server::conn::auto`]: crate::server::conn::auto
-19///
-20/// This kludge will be removed when this machinery is added back to the main
-21/// `hyper` code.
-22pub fn downcast<T>(upgraded: Upgraded) -> Result<Parts<T>, Upgraded>
-23where
-24    T: Read + Write + Unpin + 'static,
-25{
-26    let hyper::upgrade::Parts {
-27        io: rewind,
-28        mut read_buf,
-29        ..
-30    } = upgraded.downcast::<Rewind<T>>()?;
-31
-32    if let Some(pre) = rewind.pre {
-33        read_buf = if read_buf.is_empty() {
-34            pre
-35        } else {
-36            let mut buf = BytesMut::from(read_buf);
-37
-38            buf.extend_from_slice(&pre);
-39
-40            buf.freeze()
-41        };
-42    }
-43
-44    Ok(Parts {
-45        io: rewind.inner,
-46        read_buf,
-47    })
-48}
-49
-50/// The deconstructed parts of an [`Upgraded`] type.
-51///
-52/// Includes the original IO type, and a read buffer of bytes that the
-53/// HTTP state machine may have already read before completing an upgrade.
-54#[derive(Debug)]
-55#[non_exhaustive]
-56pub struct Parts<T> {
-57    /// The original IO object used before the upgrade.
-58    pub io: T,
-59    /// A buffer of bytes that have been read but not processed as HTTP.
-60    ///
-61    /// For instance, if the `Connection` is used for an HTTP upgrade request,
-62    /// it is possible the server sent back the first bytes of the new protocol
-63    /// along with the response upgrade.
-64    ///
-65    /// You will want to check for any existing bytes if you plan to continue
-66    /// communicating on the IO object.
-67    pub read_buf: Bytes,
-68}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/server/conn/mod.rs.html b/core/target/doc/src/hyper_util/server/conn/mod.rs.html deleted file mode 100644 index 2f442317..00000000 --- a/core/target/doc/src/hyper_util/server/conn/mod.rs.html +++ /dev/null @@ -1,5 +0,0 @@ -mod.rs - source

hyper_util/server/conn/
mod.rs

1//! Connection utilities.
-2
-3#[cfg(any(feature = "http1", feature = "http2"))]
-4pub mod auto;
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/server/graceful.rs.html b/core/target/doc/src/hyper_util/server/graceful.rs.html deleted file mode 100644 index ad40557d..00000000 --- a/core/target/doc/src/hyper_util/server/graceful.rs.html +++ /dev/null @@ -1,489 +0,0 @@ -graceful.rs - source

hyper_util/server/
graceful.rs

1//! Utility to gracefully shutdown a server.
-2//!
-3//! This module provides a [`GracefulShutdown`] type,
-4//! which can be used to gracefully shutdown a server.
-5//!
-6//! See <https://github.com/hyperium/hyper-util/blob/master/examples/server_graceful.rs>
-7//! for an example of how to use this.
-8
-9use std::{
-10    fmt::{self, Debug},
-11    future::Future,
-12    pin::Pin,
-13    task::{self, Poll},
-14};
-15
-16use pin_project_lite::pin_project;
-17use tokio::sync::watch;
-18
-19/// A graceful shutdown utility
-20// Purposefully not `Clone`, see `watcher()` method for why.
-21pub struct GracefulShutdown {
-22    tx: watch::Sender<()>,
-23}
-24
-25/// A watcher side of the graceful shutdown.
-26///
-27/// This type can only watch a connection, it cannot trigger a shutdown.
-28///
-29/// Call [`GracefulShutdown::watcher()`] to construct one of these.
-30pub struct Watcher {
-31    rx: watch::Receiver<()>,
-32}
-33
-34impl GracefulShutdown {
-35    /// Create a new graceful shutdown helper.
-36    pub fn new() -> Self {
-37        let (tx, _) = watch::channel(());
-38        Self { tx }
-39    }
-40
-41    /// Wrap a future for graceful shutdown watching.
-42    pub fn watch<C: GracefulConnection>(&self, conn: C) -> impl Future<Output = C::Output> {
-43        self.watcher().watch(conn)
-44    }
-45
-46    /// Create an owned type that can watch a connection.
-47    ///
-48    /// This method allows created an owned type that can be sent onto another
-49    /// task before calling [`Watcher::watch()`].
-50    // Internal: this function exists because `Clone` allows footguns.
-51    // If the `tx` were cloned (or the `rx`), race conditions can happens where
-52    // one task starting a shutdown is scheduled and interwined with a task
-53    // starting to watch a connection, and the "watch version" is one behind.
-54    pub fn watcher(&self) -> Watcher {
-55        let rx = self.tx.subscribe();
-56        Watcher { rx }
-57    }
-58
-59    /// Signal shutdown for all watched connections.
-60    ///
-61    /// This returns a `Future` which will complete once all watched
-62    /// connections have shutdown.
-63    pub async fn shutdown(self) {
-64        let Self { tx } = self;
-65
-66        // signal all the watched futures about the change
-67        let _ = tx.send(());
-68        // and then wait for all of them to complete
-69        tx.closed().await;
-70    }
-71
-72    /// Returns the number of the watching connections.
-73    pub fn count(&self) -> usize {
-74        self.tx.receiver_count()
-75    }
-76}
-77
-78impl Debug for GracefulShutdown {
-79    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-80        f.debug_struct("GracefulShutdown").finish()
-81    }
-82}
-83
-84impl Default for GracefulShutdown {
-85    fn default() -> Self {
-86        Self::new()
-87    }
-88}
-89
-90impl Watcher {
-91    /// Wrap a future for graceful shutdown watching.
-92    pub fn watch<C: GracefulConnection>(self, conn: C) -> impl Future<Output = C::Output> {
-93        let Watcher { mut rx } = self;
-94        GracefulConnectionFuture::new(conn, async move {
-95            let _ = rx.changed().await;
-96            // hold onto the rx until the watched future is completed
-97            rx
-98        })
-99    }
-100}
-101
-102impl Debug for Watcher {
-103    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-104        f.debug_struct("GracefulWatcher").finish()
-105    }
-106}
-107
-108pin_project! {
-109    struct GracefulConnectionFuture<C, F: Future> {
-110        #[pin]
-111        conn: C,
-112        #[pin]
-113        cancel: F,
-114        #[pin]
-115        // If cancelled, this is held until the inner conn is done.
-116        cancelled_guard: Option<F::Output>,
-117    }
-118}
-119
-120impl<C, F: Future> GracefulConnectionFuture<C, F> {
-121    fn new(conn: C, cancel: F) -> Self {
-122        Self {
-123            conn,
-124            cancel,
-125            cancelled_guard: None,
-126        }
-127    }
-128}
-129
-130impl<C, F: Future> Debug for GracefulConnectionFuture<C, F> {
-131    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-132        f.debug_struct("GracefulConnectionFuture").finish()
-133    }
-134}
-135
-136impl<C, F> Future for GracefulConnectionFuture<C, F>
-137where
-138    C: GracefulConnection,
-139    F: Future,
-140{
-141    type Output = C::Output;
-142
-143    fn poll(self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Self::Output> {
-144        let mut this = self.project();
-145        if this.cancelled_guard.is_none() {
-146            if let Poll::Ready(guard) = this.cancel.poll(cx) {
-147                this.cancelled_guard.set(Some(guard));
-148                this.conn.as_mut().graceful_shutdown();
-149            }
-150        }
-151        this.conn.poll(cx)
-152    }
-153}
-154
-155/// An internal utility trait as an umbrella target for all (hyper) connection
-156/// types that the [`GracefulShutdown`] can watch.
-157pub trait GracefulConnection: Future<Output = Result<(), Self::Error>> + private::Sealed {
-158    /// The error type returned by the connection when used as a future.
-159    type Error;
-160
-161    /// Start a graceful shutdown process for this connection.
-162    fn graceful_shutdown(self: Pin<&mut Self>);
-163}
-164
-165#[cfg(feature = "http1")]
-166impl<I, B, S> GracefulConnection for hyper::server::conn::http1::Connection<I, S>
-167where
-168    S: hyper::service::HttpService<hyper::body::Incoming, ResBody = B>,
-169    S::Error: Into<Box<dyn std::error::Error + Send + Sync>>,
-170    I: hyper::rt::Read + hyper::rt::Write + Unpin + 'static,
-171    B: hyper::body::Body + 'static,
-172    B::Error: Into<Box<dyn std::error::Error + Send + Sync>>,
-173{
-174    type Error = hyper::Error;
-175
-176    fn graceful_shutdown(self: Pin<&mut Self>) {
-177        hyper::server::conn::http1::Connection::graceful_shutdown(self);
-178    }
-179}
-180
-181#[cfg(feature = "http2")]
-182impl<I, B, S, E> GracefulConnection for hyper::server::conn::http2::Connection<I, S, E>
-183where
-184    S: hyper::service::HttpService<hyper::body::Incoming, ResBody = B>,
-185    S::Error: Into<Box<dyn std::error::Error + Send + Sync>>,
-186    I: hyper::rt::Read + hyper::rt::Write + Unpin + 'static,
-187    B: hyper::body::Body + 'static,
-188    B::Error: Into<Box<dyn std::error::Error + Send + Sync>>,
-189    E: hyper::rt::bounds::Http2ServerConnExec<S::Future, B>,
-190{
-191    type Error = hyper::Error;
-192
-193    fn graceful_shutdown(self: Pin<&mut Self>) {
-194        hyper::server::conn::http2::Connection::graceful_shutdown(self);
-195    }
-196}
-197
-198#[cfg(feature = "server-auto")]
-199impl<I, B, S, E> GracefulConnection for crate::server::conn::auto::Connection<'_, I, S, E>
-200where
-201    S: hyper::service::Service<http::Request<hyper::body::Incoming>, Response = http::Response<B>>,
-202    S::Error: Into<Box<dyn std::error::Error + Send + Sync>>,
-203    S::Future: 'static,
-204    I: hyper::rt::Read + hyper::rt::Write + Unpin + 'static,
-205    B: hyper::body::Body + 'static,
-206    B::Error: Into<Box<dyn std::error::Error + Send + Sync>>,
-207    E: hyper::rt::bounds::Http2ServerConnExec<S::Future, B>,
-208{
-209    type Error = Box<dyn std::error::Error + Send + Sync>;
-210
-211    fn graceful_shutdown(self: Pin<&mut Self>) {
-212        crate::server::conn::auto::Connection::graceful_shutdown(self);
-213    }
-214}
-215
-216#[cfg(feature = "server-auto")]
-217impl<I, B, S, E> GracefulConnection
-218    for crate::server::conn::auto::UpgradeableConnection<'_, I, S, E>
-219where
-220    S: hyper::service::Service<http::Request<hyper::body::Incoming>, Response = http::Response<B>>,
-221    S::Error: Into<Box<dyn std::error::Error + Send + Sync>>,
-222    S::Future: 'static,
-223    I: hyper::rt::Read + hyper::rt::Write + Unpin + Send + 'static,
-224    B: hyper::body::Body + 'static,
-225    B::Error: Into<Box<dyn std::error::Error + Send + Sync>>,
-226    E: hyper::rt::bounds::Http2ServerConnExec<S::Future, B>,
-227{
-228    type Error = Box<dyn std::error::Error + Send + Sync>;
-229
-230    fn graceful_shutdown(self: Pin<&mut Self>) {
-231        crate::server::conn::auto::UpgradeableConnection::graceful_shutdown(self);
-232    }
-233}
-234
-235mod private {
-236    pub trait Sealed {}
-237
-238    #[cfg(feature = "http1")]
-239    impl<I, B, S> Sealed for hyper::server::conn::http1::Connection<I, S>
-240    where
-241        S: hyper::service::HttpService<hyper::body::Incoming, ResBody = B>,
-242        S::Error: Into<Box<dyn std::error::Error + Send + Sync>>,
-243        I: hyper::rt::Read + hyper::rt::Write + Unpin + 'static,
-244        B: hyper::body::Body + 'static,
-245        B::Error: Into<Box<dyn std::error::Error + Send + Sync>>,
-246    {
-247    }
-248
-249    #[cfg(feature = "http1")]
-250    impl<I, B, S> Sealed for hyper::server::conn::http1::UpgradeableConnection<I, S>
-251    where
-252        S: hyper::service::HttpService<hyper::body::Incoming, ResBody = B>,
-253        S::Error: Into<Box<dyn std::error::Error + Send + Sync>>,
-254        I: hyper::rt::Read + hyper::rt::Write + Unpin + 'static,
-255        B: hyper::body::Body + 'static,
-256        B::Error: Into<Box<dyn std::error::Error + Send + Sync>>,
-257    {
-258    }
-259
-260    #[cfg(feature = "http2")]
-261    impl<I, B, S, E> Sealed for hyper::server::conn::http2::Connection<I, S, E>
-262    where
-263        S: hyper::service::HttpService<hyper::body::Incoming, ResBody = B>,
-264        S::Error: Into<Box<dyn std::error::Error + Send + Sync>>,
-265        I: hyper::rt::Read + hyper::rt::Write + Unpin + 'static,
-266        B: hyper::body::Body + 'static,
-267        B::Error: Into<Box<dyn std::error::Error + Send + Sync>>,
-268        E: hyper::rt::bounds::Http2ServerConnExec<S::Future, B>,
-269    {
-270    }
-271
-272    #[cfg(feature = "server-auto")]
-273    impl<I, B, S, E> Sealed for crate::server::conn::auto::Connection<'_, I, S, E>
-274    where
-275        S: hyper::service::Service<
-276            http::Request<hyper::body::Incoming>,
-277            Response = http::Response<B>,
-278        >,
-279        S::Error: Into<Box<dyn std::error::Error + Send + Sync>>,
-280        S::Future: 'static,
-281        I: hyper::rt::Read + hyper::rt::Write + Unpin + 'static,
-282        B: hyper::body::Body + 'static,
-283        B::Error: Into<Box<dyn std::error::Error + Send + Sync>>,
-284        E: hyper::rt::bounds::Http2ServerConnExec<S::Future, B>,
-285    {
-286    }
-287
-288    #[cfg(feature = "server-auto")]
-289    impl<I, B, S, E> Sealed for crate::server::conn::auto::UpgradeableConnection<'_, I, S, E>
-290    where
-291        S: hyper::service::Service<
-292            http::Request<hyper::body::Incoming>,
-293            Response = http::Response<B>,
-294        >,
-295        S::Error: Into<Box<dyn std::error::Error + Send + Sync>>,
-296        S::Future: 'static,
-297        I: hyper::rt::Read + hyper::rt::Write + Unpin + Send + 'static,
-298        B: hyper::body::Body + 'static,
-299        B::Error: Into<Box<dyn std::error::Error + Send + Sync>>,
-300        E: hyper::rt::bounds::Http2ServerConnExec<S::Future, B>,
-301    {
-302    }
-303}
-304
-305#[cfg(test)]
-306mod test {
-307    use super::*;
-308    use pin_project_lite::pin_project;
-309    use std::sync::atomic::{AtomicUsize, Ordering};
-310    use std::sync::Arc;
-311
-312    pin_project! {
-313        #[derive(Debug)]
-314        struct DummyConnection<F> {
-315            #[pin]
-316            future: F,
-317            shutdown_counter: Arc<AtomicUsize>,
-318        }
-319    }
-320
-321    impl<F> private::Sealed for DummyConnection<F> {}
-322
-323    impl<F: Future> GracefulConnection for DummyConnection<F> {
-324        type Error = ();
-325
-326        fn graceful_shutdown(self: Pin<&mut Self>) {
-327            self.shutdown_counter.fetch_add(1, Ordering::SeqCst);
-328        }
-329    }
-330
-331    impl<F: Future> Future for DummyConnection<F> {
-332        type Output = Result<(), ()>;
-333
-334        fn poll(self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Self::Output> {
-335            match self.project().future.poll(cx) {
-336                Poll::Ready(_) => Poll::Ready(Ok(())),
-337                Poll::Pending => Poll::Pending,
-338            }
-339        }
-340    }
-341
-342    #[cfg(not(miri))]
-343    #[tokio::test]
-344    async fn test_graceful_shutdown_ok() {
-345        let graceful = GracefulShutdown::new();
-346        let shutdown_counter = Arc::new(AtomicUsize::new(0));
-347        let (dummy_tx, _) = tokio::sync::broadcast::channel(1);
-348
-349        for i in 1..=3 {
-350            let mut dummy_rx = dummy_tx.subscribe();
-351            let shutdown_counter = shutdown_counter.clone();
-352
-353            let future = async move {
-354                tokio::time::sleep(std::time::Duration::from_millis(i * 10)).await;
-355                let _ = dummy_rx.recv().await;
-356            };
-357            let dummy_conn = DummyConnection {
-358                future,
-359                shutdown_counter,
-360            };
-361            let conn = graceful.watch(dummy_conn);
-362            tokio::spawn(async move {
-363                conn.await.unwrap();
-364            });
-365        }
-366
-367        assert_eq!(shutdown_counter.load(Ordering::SeqCst), 0);
-368        let _ = dummy_tx.send(());
-369
-370        tokio::select! {
-371            _ = tokio::time::sleep(std::time::Duration::from_millis(100)) => {
-372                panic!("timeout")
-373            },
-374            _ = graceful.shutdown() => {
-375                assert_eq!(shutdown_counter.load(Ordering::SeqCst), 3);
-376            }
-377        }
-378    }
-379
-380    #[cfg(not(miri))]
-381    #[tokio::test]
-382    async fn test_graceful_shutdown_delayed_ok() {
-383        let graceful = GracefulShutdown::new();
-384        let shutdown_counter = Arc::new(AtomicUsize::new(0));
-385
-386        for i in 1..=3 {
-387            let shutdown_counter = shutdown_counter.clone();
-388
-389            //tokio::time::sleep(std::time::Duration::from_millis(i * 5)).await;
-390            let future = async move {
-391                tokio::time::sleep(std::time::Duration::from_millis(i * 50)).await;
-392            };
-393            let dummy_conn = DummyConnection {
-394                future,
-395                shutdown_counter,
-396            };
-397            let conn = graceful.watch(dummy_conn);
-398            tokio::spawn(async move {
-399                conn.await.unwrap();
-400            });
-401        }
-402
-403        assert_eq!(shutdown_counter.load(Ordering::SeqCst), 0);
-404
-405        tokio::select! {
-406            _ = tokio::time::sleep(std::time::Duration::from_millis(200)) => {
-407                panic!("timeout")
-408            },
-409            _ = graceful.shutdown() => {
-410                assert_eq!(shutdown_counter.load(Ordering::SeqCst), 3);
-411            }
-412        }
-413    }
-414
-415    #[cfg(not(miri))]
-416    #[tokio::test]
-417    async fn test_graceful_shutdown_multi_per_watcher_ok() {
-418        let graceful = GracefulShutdown::new();
-419        let shutdown_counter = Arc::new(AtomicUsize::new(0));
-420
-421        for i in 1..=3 {
-422            let shutdown_counter = shutdown_counter.clone();
-423
-424            let mut futures = Vec::new();
-425            for u in 1..=i {
-426                let future = tokio::time::sleep(std::time::Duration::from_millis(u * 50));
-427                let dummy_conn = DummyConnection {
-428                    future,
-429                    shutdown_counter: shutdown_counter.clone(),
-430                };
-431                let conn = graceful.watch(dummy_conn);
-432                futures.push(conn);
-433            }
-434            tokio::spawn(async move {
-435                futures_util::future::join_all(futures).await;
-436            });
-437        }
-438
-439        assert_eq!(shutdown_counter.load(Ordering::SeqCst), 0);
-440
-441        tokio::select! {
-442            _ = tokio::time::sleep(std::time::Duration::from_millis(200)) => {
-443                panic!("timeout")
-444            },
-445            _ = graceful.shutdown() => {
-446                assert_eq!(shutdown_counter.load(Ordering::SeqCst), 6);
-447            }
-448        }
-449    }
-450
-451    #[cfg(not(miri))]
-452    #[tokio::test]
-453    async fn test_graceful_shutdown_timeout() {
-454        let graceful = GracefulShutdown::new();
-455        let shutdown_counter = Arc::new(AtomicUsize::new(0));
-456
-457        for i in 1..=3 {
-458            let shutdown_counter = shutdown_counter.clone();
-459
-460            let future = async move {
-461                if i == 1 {
-462                    std::future::pending::<()>().await
-463                } else {
-464                    std::future::ready(()).await
-465                }
-466            };
-467            let dummy_conn = DummyConnection {
-468                future,
-469                shutdown_counter,
-470            };
-471            let conn = graceful.watch(dummy_conn);
-472            tokio::spawn(async move {
-473                conn.await.unwrap();
-474            });
-475        }
-476
-477        assert_eq!(shutdown_counter.load(Ordering::SeqCst), 0);
-478
-479        tokio::select! {
-480            _ = tokio::time::sleep(std::time::Duration::from_millis(100)) => {
-481                assert_eq!(shutdown_counter.load(Ordering::SeqCst), 3);
-482            },
-483            _ = graceful.shutdown() => {
-484                panic!("shutdown should not be completed: as not all our conns finish")
-485            }
-486        }
-487    }
-488}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/server/mod.rs.html b/core/target/doc/src/hyper_util/server/mod.rs.html deleted file mode 100644 index 93564c45..00000000 --- a/core/target/doc/src/hyper_util/server/mod.rs.html +++ /dev/null @@ -1,7 +0,0 @@ -mod.rs - source

hyper_util/server/
mod.rs

1//! Server utilities.
-2
-3pub mod conn;
-4
-5#[cfg(feature = "server-graceful")]
-6pub mod graceful;
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/service/glue.rs.html b/core/target/doc/src/hyper_util/service/glue.rs.html deleted file mode 100644 index 657316d7..00000000 --- a/core/target/doc/src/hyper_util/service/glue.rs.html +++ /dev/null @@ -1,73 +0,0 @@ -glue.rs - source

hyper_util/service/
glue.rs

1use pin_project_lite::pin_project;
-2use std::{
-3    future::Future,
-4    pin::Pin,
-5    task::{Context, Poll},
-6};
-7
-8use super::Oneshot;
-9
-10/// A tower [`Service`][tower-svc] converted into a hyper [`Service`][hyper-svc].
-11///
-12/// This wraps an inner tower service `S` in a [`hyper::service::Service`] implementation. See
-13/// the module-level documentation of [`service`][crate::service] for more information about using
-14/// [`tower`][tower] services and middleware with [`hyper`].
-15///
-16/// [hyper-svc]: hyper::service::Service
-17/// [tower]: https://docs.rs/tower/latest/tower/
-18/// [tower-svc]: https://docs.rs/tower/latest/tower/trait.Service.html
-19#[derive(Debug, Copy, Clone)]
-20pub struct TowerToHyperService<S> {
-21    service: S,
-22}
-23
-24impl<S> TowerToHyperService<S> {
-25    /// Create a new [`TowerToHyperService`] from a tower service.
-26    pub fn new(tower_service: S) -> Self {
-27        Self {
-28            service: tower_service,
-29        }
-30    }
-31}
-32
-33impl<S, R> hyper::service::Service<R> for TowerToHyperService<S>
-34where
-35    S: tower_service::Service<R> + Clone,
-36{
-37    type Response = S::Response;
-38    type Error = S::Error;
-39    type Future = TowerToHyperServiceFuture<S, R>;
-40
-41    fn call(&self, req: R) -> Self::Future {
-42        TowerToHyperServiceFuture {
-43            future: Oneshot::new(self.service.clone(), req),
-44        }
-45    }
-46}
-47
-48pin_project! {
-49    /// Response future for [`TowerToHyperService`].
-50    ///
-51    /// This future is acquired by [`call`][hyper::service::Service::call]ing a
-52    /// [`TowerToHyperService`].
-53    pub struct TowerToHyperServiceFuture<S, R>
-54    where
-55        S: tower_service::Service<R>,
-56    {
-57        #[pin]
-58        future: Oneshot<S, R>,
-59    }
-60}
-61
-62impl<S, R> Future for TowerToHyperServiceFuture<S, R>
-63where
-64    S: tower_service::Service<R>,
-65{
-66    type Output = Result<S::Response, S::Error>;
-67
-68    #[inline]
-69    fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
-70        self.project().future.poll(cx)
-71    }
-72}
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/service/mod.rs.html b/core/target/doc/src/hyper_util/service/mod.rs.html deleted file mode 100644 index 8467ca5c..00000000 --- a/core/target/doc/src/hyper_util/service/mod.rs.html +++ /dev/null @@ -1,33 +0,0 @@ -mod.rs - source

hyper_util/service/
mod.rs

1//! Service utilities.
-2//!
-3//! [`hyper::service`] provides a [`Service`][hyper-svc] trait, representing an asynchronous
-4//! function from a `Request` to a `Response`. This provides an interface allowing middleware for
-5//! network application to be written in a modular and reusable way.
-6//!
-7//! This submodule provides an assortment of utilities for working with [`Service`][hyper-svc]s.
-8//! See the module-level documentation of [`hyper::service`] for more information.
-9//!
-10//! # Tower
-11//!
-12//! While [`hyper`] uses its own notion of a [`Service`][hyper-svc] internally, many other
-13//! libraries use a library such as [`tower`][tower] to provide the fundamental model of an
-14//! asynchronous function.
-15//!
-16//! The [`TowerToHyperService`] type provided by this submodule can be used to bridge these
-17//! ecosystems together. By wrapping a [`tower::Service`][tower-svc] in [`TowerToHyperService`],
-18//! it can be passed into [`hyper`] interfaces that expect a [`hyper::service::Service`].
-19//!
-20//! [hyper-svc]: hyper::service::Service
-21//! [tower]: https://docs.rs/tower/latest/tower/
-22//! [tower-svc]: https://docs.rs/tower/latest/tower/trait.Service.html
-23
-24#[cfg(feature = "service")]
-25mod glue;
-26#[cfg(any(feature = "client-legacy", feature = "service"))]
-27mod oneshot;
-28
-29#[cfg(feature = "service")]
-30pub use self::glue::{TowerToHyperService, TowerToHyperServiceFuture};
-31#[cfg(any(feature = "client-legacy", feature = "service"))]
-32pub(crate) use self::oneshot::Oneshot;
-
\ No newline at end of file diff --git a/core/target/doc/src/hyper_util/service/oneshot.rs.html b/core/target/doc/src/hyper_util/service/oneshot.rs.html deleted file mode 100644 index 853b7a03..00000000 --- a/core/target/doc/src/hyper_util/service/oneshot.rs.html +++ /dev/null @@ -1,64 +0,0 @@ -oneshot.rs - source

hyper_util/service/
oneshot.rs

1use futures_core::ready;
-2use pin_project_lite::pin_project;
-3use std::future::Future;
-4use std::pin::Pin;
-5use std::task::{Context, Poll};
-6use tower_service::Service;
-7
-8// Vendored from tower::util to reduce dependencies, the code is small enough.
-9
-10// Not really pub, but used in a trait for bounds
-11pin_project! {
-12    #[project = OneshotProj]
-13    #[derive(Debug)]
-14    pub enum Oneshot<S: Service<Req>, Req> {
-15        NotReady {
-16            svc: S,
-17            req: Option<Req>,
-18        },
-19        Called {
-20            #[pin]
-21            fut: S::Future,
-22        },
-23        Done,
-24    }
-25}
-26
-27impl<S, Req> Oneshot<S, Req>
-28where
-29    S: Service<Req>,
-30{
-31    pub(crate) const fn new(svc: S, req: Req) -> Self {
-32        Oneshot::NotReady {
-33            svc,
-34            req: Some(req),
-35        }
-36    }
-37}
-38
-39impl<S, Req> Future for Oneshot<S, Req>
-40where
-41    S: Service<Req>,
-42{
-43    type Output = Result<S::Response, S::Error>;
-44
-45    fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
-46        loop {
-47            let this = self.as_mut().project();
-48            match this {
-49                OneshotProj::NotReady { svc, req } => {
-50                    ready!(svc.poll_ready(cx))?;
-51                    let fut = svc.call(req.take().expect("already called"));
-52                    self.set(Oneshot::Called { fut });
-53                }
-54                OneshotProj::Called { fut } => {
-55                    let res = ready!(fut.poll(cx))?;
-56                    self.set(Oneshot::Done);
-57                    return Poll::Ready(Ok(res));
-58                }
-59                OneshotProj::Done => panic!("polled after complete"),
-60            }
-61        }
-62    }
-63}
-
\ No newline at end of file diff --git a/core/target/doc/static.files/COPYRIGHT-7fb11f4e.txt b/core/target/doc/static.files/COPYRIGHT-7fb11f4e.txt deleted file mode 100644 index 752dab0a..00000000 --- a/core/target/doc/static.files/COPYRIGHT-7fb11f4e.txt +++ /dev/null @@ -1,71 +0,0 @@ -# REUSE-IgnoreStart - -These documentation pages include resources by third parties. This copyright -file applies only to those resources. The following third party resources are -included, and carry their own copyright notices and license terms: - -* Fira Sans (FiraSans-Regular.woff2, FiraSans-Medium.woff2): - - Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ - with Reserved Font Name Fira Sans. - - Copyright (c) 2014, Telefonica S.A. - - Licensed under the SIL Open Font License, Version 1.1. - See FiraSans-LICENSE.txt. - -* rustdoc.css, main.js, and playpen.js: - - Copyright 2015 The Rust Developers. - Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or - the MIT license (LICENSE-MIT.txt) at your option. - -* normalize.css: - - Copyright (c) Nicolas Gallagher and Jonathan Neal. - Licensed under the MIT license (see LICENSE-MIT.txt). - -* Source Code Pro (SourceCodePro-Regular.ttf.woff2, - SourceCodePro-Semibold.ttf.woff2, SourceCodePro-It.ttf.woff2): - - Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), - with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark - of Adobe Systems Incorporated in the United States and/or other countries. - - Licensed under the SIL Open Font License, Version 1.1. - See SourceCodePro-LICENSE.txt. - -* Source Serif 4 (SourceSerif4-Regular.ttf.woff2, SourceSerif4-Bold.ttf.woff2, - SourceSerif4-It.ttf.woff2, SourceSerif4-Semibold.ttf.woff2): - - Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name - 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United - States and/or other countries. - - Licensed under the SIL Open Font License, Version 1.1. - See SourceSerif4-LICENSE.md. - -* Nanum Barun Gothic Font (NanumBarunGothic.woff2) - - Copyright 2010, NAVER Corporation (http://www.nhncorp.com) - with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic, - NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen, - Naver NanumPen, Naver NanumGothicEco, NanumGothicEco, - Naver NanumMyeongjoEco, NanumMyeongjoEco, Naver NanumGothicLight, - NanumGothicLight, NanumBarunGothic, Naver NanumBarunGothic. - - https://hangeul.naver.com/2017/nanum - https://github.com/hiun/NanumBarunGothic - - Licensed under the SIL Open Font License, Version 1.1. - See NanumBarunGothic-LICENSE.txt. - -* Rust logos (rust-logo.svg, favicon.svg, favicon-32x32.png) - - Copyright 2025 Rust Foundation. - Licensed under the Creative Commons Attribution license (CC-BY). - https://rustfoundation.org/policy/rust-trademark-policy/ - -This copyright file is intended to be distributed with rustdoc output. - -# REUSE-IgnoreEnd diff --git a/core/target/doc/static.files/FiraMono-Medium-86f75c8c.woff2 b/core/target/doc/static.files/FiraMono-Medium-86f75c8c.woff2 deleted file mode 100644 index 610e9b20..00000000 Binary files a/core/target/doc/static.files/FiraMono-Medium-86f75c8c.woff2 and /dev/null differ diff --git a/core/target/doc/static.files/FiraMono-Regular-87c26294.woff2 b/core/target/doc/static.files/FiraMono-Regular-87c26294.woff2 deleted file mode 100644 index 9fa44b7c..00000000 Binary files a/core/target/doc/static.files/FiraMono-Regular-87c26294.woff2 and /dev/null differ diff --git a/core/target/doc/static.files/FiraSans-Italic-81dc35de.woff2 b/core/target/doc/static.files/FiraSans-Italic-81dc35de.woff2 deleted file mode 100644 index 3f63664f..00000000 Binary files a/core/target/doc/static.files/FiraSans-Italic-81dc35de.woff2 and /dev/null differ diff --git a/core/target/doc/static.files/FiraSans-LICENSE-05ab6dbd.txt b/core/target/doc/static.files/FiraSans-LICENSE-05ab6dbd.txt deleted file mode 100644 index d7e9c149..00000000 --- a/core/target/doc/static.files/FiraSans-LICENSE-05ab6dbd.txt +++ /dev/null @@ -1,98 +0,0 @@ -// REUSE-IgnoreStart - -Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. -with Reserved Font Name < Fira >, - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -// REUSE-IgnoreEnd diff --git a/core/target/doc/static.files/FiraSans-Medium-e1aa3f0a.woff2 b/core/target/doc/static.files/FiraSans-Medium-e1aa3f0a.woff2 deleted file mode 100644 index 7a1e5fc5..00000000 Binary files a/core/target/doc/static.files/FiraSans-Medium-e1aa3f0a.woff2 and /dev/null differ diff --git a/core/target/doc/static.files/FiraSans-MediumItalic-ccf7e434.woff2 b/core/target/doc/static.files/FiraSans-MediumItalic-ccf7e434.woff2 deleted file mode 100644 index 2d08f9f7..00000000 Binary files a/core/target/doc/static.files/FiraSans-MediumItalic-ccf7e434.woff2 and /dev/null differ diff --git a/core/target/doc/static.files/FiraSans-Regular-0fe48ade.woff2 b/core/target/doc/static.files/FiraSans-Regular-0fe48ade.woff2 deleted file mode 100644 index e766e06c..00000000 Binary files a/core/target/doc/static.files/FiraSans-Regular-0fe48ade.woff2 and /dev/null differ diff --git a/core/target/doc/static.files/LICENSE-APACHE-a60eea81.txt b/core/target/doc/static.files/LICENSE-APACHE-a60eea81.txt deleted file mode 100644 index 16fe87b0..00000000 --- a/core/target/doc/static.files/LICENSE-APACHE-a60eea81.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/core/target/doc/static.files/LICENSE-MIT-23f18e03.txt b/core/target/doc/static.files/LICENSE-MIT-23f18e03.txt deleted file mode 100644 index 31aa7938..00000000 --- a/core/target/doc/static.files/LICENSE-MIT-23f18e03.txt +++ /dev/null @@ -1,23 +0,0 @@ -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/core/target/doc/static.files/NanumBarunGothic-13b3dcba.ttf.woff2 b/core/target/doc/static.files/NanumBarunGothic-13b3dcba.ttf.woff2 deleted file mode 100644 index 1866ad4b..00000000 Binary files a/core/target/doc/static.files/NanumBarunGothic-13b3dcba.ttf.woff2 and /dev/null differ diff --git a/core/target/doc/static.files/NanumBarunGothic-LICENSE-a37d393b.txt b/core/target/doc/static.files/NanumBarunGothic-LICENSE-a37d393b.txt deleted file mode 100644 index 4b3edc29..00000000 --- a/core/target/doc/static.files/NanumBarunGothic-LICENSE-a37d393b.txt +++ /dev/null @@ -1,103 +0,0 @@ -// REUSE-IgnoreStart - -Copyright (c) 2010, NAVER Corporation (https://www.navercorp.com/), - -with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic, -NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen, -Naver NanumPen, Naver NanumGothicEco, NanumGothicEco, Naver NanumMyeongjoEco, -NanumMyeongjoEco, Naver NanumGothicLight, NanumGothicLight, NanumBarunGothic, -Naver NanumBarunGothic, NanumSquareRound, NanumBarunPen, MaruBuri - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -// REUSE-IgnoreEnd diff --git a/core/target/doc/static.files/SourceCodePro-It-fc8b9304.ttf.woff2 b/core/target/doc/static.files/SourceCodePro-It-fc8b9304.ttf.woff2 deleted file mode 100644 index 462c34ef..00000000 Binary files a/core/target/doc/static.files/SourceCodePro-It-fc8b9304.ttf.woff2 and /dev/null differ diff --git a/core/target/doc/static.files/SourceCodePro-LICENSE-67f54ca7.txt b/core/target/doc/static.files/SourceCodePro-LICENSE-67f54ca7.txt deleted file mode 100644 index 0d2941e1..00000000 --- a/core/target/doc/static.files/SourceCodePro-LICENSE-67f54ca7.txt +++ /dev/null @@ -1,97 +0,0 @@ -// REUSE-IgnoreStart - -Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. - -This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -// REUSE-IgnoreEnd diff --git a/core/target/doc/static.files/SourceCodePro-Regular-8badfe75.ttf.woff2 b/core/target/doc/static.files/SourceCodePro-Regular-8badfe75.ttf.woff2 deleted file mode 100644 index 10b558e0..00000000 Binary files a/core/target/doc/static.files/SourceCodePro-Regular-8badfe75.ttf.woff2 and /dev/null differ diff --git a/core/target/doc/static.files/SourceCodePro-Semibold-aa29a496.ttf.woff2 b/core/target/doc/static.files/SourceCodePro-Semibold-aa29a496.ttf.woff2 deleted file mode 100644 index 5ec64eef..00000000 Binary files a/core/target/doc/static.files/SourceCodePro-Semibold-aa29a496.ttf.woff2 and /dev/null differ diff --git a/core/target/doc/static.files/SourceSerif4-Bold-6d4fd4c0.ttf.woff2 b/core/target/doc/static.files/SourceSerif4-Bold-6d4fd4c0.ttf.woff2 deleted file mode 100644 index 181a07f6..00000000 Binary files a/core/target/doc/static.files/SourceSerif4-Bold-6d4fd4c0.ttf.woff2 and /dev/null differ diff --git a/core/target/doc/static.files/SourceSerif4-It-ca3b17ed.ttf.woff2 b/core/target/doc/static.files/SourceSerif4-It-ca3b17ed.ttf.woff2 deleted file mode 100644 index 2ae08a7b..00000000 Binary files a/core/target/doc/static.files/SourceSerif4-It-ca3b17ed.ttf.woff2 and /dev/null differ diff --git a/core/target/doc/static.files/SourceSerif4-LICENSE-a2cfd9d5.md b/core/target/doc/static.files/SourceSerif4-LICENSE-a2cfd9d5.md deleted file mode 100644 index 175fa4f4..00000000 --- a/core/target/doc/static.files/SourceSerif4-LICENSE-a2cfd9d5.md +++ /dev/null @@ -1,98 +0,0 @@ - - -Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. -Copyright 2014 - 2023 Adobe (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. - -This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - - diff --git a/core/target/doc/static.files/SourceSerif4-Regular-6b053e98.ttf.woff2 b/core/target/doc/static.files/SourceSerif4-Regular-6b053e98.ttf.woff2 deleted file mode 100644 index 0263fc30..00000000 Binary files a/core/target/doc/static.files/SourceSerif4-Regular-6b053e98.ttf.woff2 and /dev/null differ diff --git a/core/target/doc/static.files/SourceSerif4-Semibold-457a13ac.ttf.woff2 b/core/target/doc/static.files/SourceSerif4-Semibold-457a13ac.ttf.woff2 deleted file mode 100644 index dd55f4e9..00000000 Binary files a/core/target/doc/static.files/SourceSerif4-Semibold-457a13ac.ttf.woff2 and /dev/null differ diff --git a/core/target/doc/static.files/favicon-044be391.svg b/core/target/doc/static.files/favicon-044be391.svg deleted file mode 100644 index 8b34b511..00000000 --- a/core/target/doc/static.files/favicon-044be391.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/core/target/doc/static.files/favicon-32x32-eab170b8.png b/core/target/doc/static.files/favicon-32x32-eab170b8.png deleted file mode 100644 index 0670c4da..00000000 Binary files a/core/target/doc/static.files/favicon-32x32-eab170b8.png and /dev/null differ diff --git a/core/target/doc/static.files/main-a410ff4d.js b/core/target/doc/static.files/main-a410ff4d.js deleted file mode 100644 index 60c36bfa..00000000 --- a/core/target/doc/static.files/main-a410ff4d.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict";window.RUSTDOC_TOOLTIP_HOVER_MS=300;window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS=450;function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension;}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden");const toggle=document.getElementById("toggle-all-docs");if(toggle){toggle.setAttribute("disabled","disabled");}}function showMain(){const main=document.getElementById(MAIN_ID);if(!main){return;}removeClass(main,"hidden");const mainHeading=main.querySelector(".main-heading");if(mainHeading&&window.searchState.rustdocToolbar){if(window.searchState.rustdocToolbar.parentElement){window.searchState.rustdocToolbar.parentElement.removeChild(window.searchState.rustdocToolbar,);}mainHeading.appendChild(window.searchState.rustdocToolbar);}const toggle=document.getElementById("toggle-all-docs");if(toggle){toggle.removeAttribute("disabled");}}window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key;}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape";}return String.fromCharCode(c);}const MAIN_ID="main-content";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0];}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling);}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID));}return el;}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden");}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden");}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild);}if(elemToDisplay===null){addClass(el,"hidden");showMain();return;}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden");const mainHeading=elemToDisplay.querySelector(".main-heading");if(mainHeading&&window.searchState.rustdocToolbar){if(window.searchState.rustdocToolbar.parentElement){window.searchState.rustdocToolbar.parentElement.removeChild(window.searchState.rustdocToolbar,);}mainHeading.appendChild(window.searchState.rustdocToolbar);}}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function";}function preLoadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="preload";link.as="style";document.getElementsByTagName("head")[0].appendChild(link);}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url,errorCallback){const script=document.createElement("script");script.src=url;if(errorCallback!==undefined){script.onerror=errorCallback;}document.head.append(script);}onEachLazy(document.querySelectorAll(".settings-menu"),settingsMenu=>{settingsMenu.querySelector("a").onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return;}window.hideAllModals(false);addClass(settingsMenu,"rotate");event.preventDefault();loadScript(getVar("static-root-path")+getVar("settings-js"));setTimeout(()=>{const themes=getVar("themes").split(",");for(const theme of themes){if(theme!==""){preLoadCss(getVar("root-path")+theme+".css");}}},0);};});window.searchState={rustdocToolbar:document.querySelector("rustdoc-toolbar"),loadingText:"Loading search results...",inputElement:()=>{let el=document.getElementsByClassName("search-input")[0];if(!el){const out=nonnull(nonnull(window.searchState.outputElement()).parentElement);const hdr=document.createElement("div");hdr.className="main-heading search-results-main-heading";const params=window.searchState.getQueryStringParams();const autofocusParam=params.search===""?"autofocus":"";hdr.innerHTML=`
`;out.insertBefore(hdr,window.searchState.outputElement());el=document.getElementsByClassName("search-input")[0];}if(el instanceof HTMLInputElement){return el;}return null;},containerElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el);}return el;},outputElement:()=>{const container=window.searchState.containerElement();if(!container){return null;}let el=container.querySelector(".search-out");if(!el){el=document.createElement("div");el.className="search-out";container.appendChild(el);}return el;},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(window.searchState.timeout!==null){clearTimeout(window.searchState.timeout);window.searchState.timeout=null;}},isDisplayed:()=>{const container=window.searchState.containerElement();if(!container){return false;}return!!container.parentElement&&container.parentElement.id===ALTERNATIVE_DISPLAY_ID;},focus:()=>{const inputElement=window.searchState.inputElement();window.searchState.showResults();if(inputElement){inputElement.focus();requestAnimationFrame(()=>inputElement.focus());}},defocus:()=>{nonnull(window.searchState.inputElement()).blur();},toggle:()=>{if(window.searchState.isDisplayed()){window.searchState.defocus();window.searchState.hideResults();}else{window.searchState.focus();}},showResults:()=>{document.title=window.searchState.title;if(window.searchState.isDisplayed()){return;}const search=window.searchState.containerElement();switchDisplayedElement(search);const btn=document.querySelector("#search-button a");if(browserSupportsHistoryApi()&&btn instanceof HTMLAnchorElement&&window.searchState.getQueryStringParams().search===undefined){history.pushState(null,"",btn.href);}const btnLabel=document.querySelector("#search-button a span.label");if(btnLabel){btnLabel.innerHTML="Exit";}},removeQueryParameters:()=>{document.title=window.searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.hash);}},hideResults:()=>{switchDisplayedElement(null);window.searchState.removeQueryParameters();const btnLabel=document.querySelector("#search-button a span.label");if(btnLabel){btnLabel.innerHTML="Search";}},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=").map(x=>x.replace(/\+/g," "));params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1]);});return params;},setup:()=>{let searchLoaded=false;const search_input=window.searchState.inputElement();if(!search_input){return;}function sendSearchForm(){document.getElementsByClassName("search-form")[0].submit();}function loadSearch(){if(!searchLoaded){searchLoaded=true;window.rr_=data=>{window.searchIndex=data;};if(!window.StringdexOnload){window.StringdexOnload=[];}window.StringdexOnload.push(()=>{loadScript(getVar("static-root-path")+getVar("search-js"),sendSearchForm,);});loadScript(getVar("static-root-path")+getVar("stringdex-js"),sendSearchForm);loadScript(resourcePath("search.index/root",".js"),sendSearchForm);}}search_input.addEventListener("focus",()=>{loadSearch();});const btn=document.getElementById("search-button");if(btn){btn.onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return;}event.preventDefault();window.searchState.toggle();loadSearch();};}if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=window.searchState.getQueryStringParams();document.title=previousTitle;const inputElement=window.searchState.inputElement();if(params.search!==undefined&&inputElement!==null){loadSearch();inputElement.value=params.search;e.preventDefault();window.searchState.showResults();if(params.search===""){window.searchState.focus();}}else{window.searchState.hideResults();}});}window.onpageshow=()=>{const inputElement=window.searchState.inputElement();const qSearch=window.searchState.getQueryStringParams().search;if(qSearch!==undefined&&inputElement!==null){if(inputElement.value===""){inputElement.value=qSearch;}window.searchState.showResults();if(qSearch===""){loadSearch();window.searchState.focus();}}else{window.searchState.hideResults();}};const params=window.searchState.getQueryStringParams();if(params.search!==undefined){window.searchState.setLoadingSearch();loadSearch();}},setLoadingSearch:()=>{const search=window.searchState.outputElement();nonnull(search).innerHTML="

"+window.searchState.loadingText+"

";window.searchState.showResults();},descShards:new Map(),loadDesc:async function({descShard,descIndex}){if(descShard.promise===null){descShard.promise=new Promise((resolve,reject)=>{descShard.resolve=resolve;const ds=descShard;const fname=`${ds.crate}-desc-${ds.shard}-`;const url=resourcePath(`search.desc/${descShard.crate}/${fname}`,".js",);loadScript(url,reject);});}const list=await descShard.promise;return list[descIndex];},loadedDescShard:function(crate,shard,data){this.descShards.get(crate)[shard].resolve(data.split("\n"));},};const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&window.searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash);}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView();}}const pageId=window.location.hash.replace(/^#/,"");if(savedHash!==pageId){savedHash=pageId;if(pageId!==""){expandSection(pageId);}}if(savedHash.startsWith("impl-")){const splitAt=savedHash.indexOf("/");if(splitAt!==-1){const implId=savedHash.slice(0,splitAt);const assocId=savedHash.slice(splitAt+1);const implElems=document.querySelectorAll(`details > summary > section[id^="${implId}"]`,);onEachLazy(implElems,implElem=>{const numbered=/^(.+?)-([0-9]+)$/.exec(implElem.id);if(implElem.id!==implId&&(!numbered||numbered[1]!==implId)){return false;}return onEachLazy(implElem.parentElement.parentElement.querySelectorAll(`[id^="${assocId}"]`),item=>{const numbered=/^(.+?)-([0-9]+)$/.exec(item.id);if(item.id===assocId||(numbered&&numbered[1]===assocId)){openParentDetails(item);item.scrollIntoView();setTimeout(()=>{window.location.replace("#"+item.id);},0);return true;}},);});}}}function onHashChange(ev){hideSidebar();handleHashes(ev);}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true;}elem=elem.parentElement;}}function expandSection(id){openParentDetails(document.getElementById(id));}function handleEscape(ev){window.searchState.clearInputTimeout();window.searchState.hideResults();ev.preventDefault();window.searchState.defocus();window.hideAllModals(true);}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return;}if(document.activeElement&&document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"&&document.activeElement.type!=="radio"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":case"/":ev.preventDefault();window.searchState.focus();break;case"+":case"=":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs(false);break;case"_":ev.preventDefault();collapseAllDocs(true);break;case"?":showHelp();break;default:break;}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return;}const sidebar=document.getElementById("rustdoc-modnav");function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return;}const modpath=hasClass(document.querySelector(".rustdoc"),"mod")?"../":"";const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=`${modpath}${name}/index.html`;}else{path=`${modpath}${shortty}.${name}.html`;}let current_page=document.location.href.toString();if(current_page.endsWith("/")){current_page+="index.html";}const link=document.createElement("a");link.href=path;link.textContent=name;const li=document.createElement("li");if(link.href===current_page){li.classList.add("current");}li.appendChild(link);ul.appendChild(li);}sidebar.appendChild(h3);sidebar.appendChild(ul);}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Aliases");block("union","unions","Unions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("attribute","attributes","Attributes");block("attr","attributes","Attribute Macros");block("derive","derives","Derive Macros");block("traitalias","trait-aliases","Trait Aliases");}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return;}aliases.split(",").forEach(alias=>{inlined_types.add(alias);});});}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector(".main-heading h1 > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=new Set((script?script.getAttribute("data-ignore-extern-crates"):"").split(","),);for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.has(lib)){continue;}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop;}inlined_types.add(struct_type);}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href);}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1;}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors);}window.register_type_impls=imp=>{if(!imp||!imp[window.currentCrate]){return;}window.pending_type_impls=undefined;const idMap=new Map();let implementations=document.getElementById("implementations-list");let trait_implementations=document.getElementById("trait-implementations-list");let trait_implementations_header=document.getElementById("trait-implementations");const script=document.querySelector("script[data-self-path]");const selfPath=script?script.getAttribute("data-self-path"):null;const mainContent=document.querySelector("#main-content");const sidebarSection=document.querySelector(".sidebar section");let methods=document.querySelector(".sidebar .block.method");let associatedTypes=document.querySelector(".sidebar .block.associatedtype");let associatedConstants=document.querySelector(".sidebar .block.associatedconstant");let sidebarTraitList=document.querySelector(".sidebar .block.trait-implementation");for(const impList of imp[window.currentCrate]){const types=impList.slice(2);const text=impList[0];const isTrait=impList[1]!==0;const traitName=impList[1];if(types.indexOf(selfPath)===-1){continue;}let outputList=isTrait?trait_implementations:implementations;if(outputList===null){const outputListName=isTrait?"Trait Implementations":"Implementations";const outputListId=isTrait?"trait-implementations-list":"implementations-list";const outputListHeaderId=isTrait?"trait-implementations":"implementations";const outputListHeader=document.createElement("h2");outputListHeader.id=outputListHeaderId;outputListHeader.innerText=outputListName;outputList=document.createElement("div");outputList.id=outputListId;if(isTrait){const link=document.createElement("a");link.href=`#${outputListHeaderId}`;link.innerText="Trait Implementations";const h=document.createElement("h3");h.appendChild(link);trait_implementations=outputList;trait_implementations_header=outputListHeader;sidebarSection.appendChild(h);sidebarTraitList=document.createElement("ul");sidebarTraitList.className="block trait-implementation";sidebarSection.appendChild(sidebarTraitList);mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList);}else{implementations=outputList;if(trait_implementations){mainContent.insertBefore(outputListHeader,trait_implementations_header);mainContent.insertBefore(outputList,trait_implementations_header);}else{const mainContent=document.querySelector("#main-content");mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList);}}}const template=document.createElement("template");template.innerHTML=text;onEachLazy(template.content.querySelectorAll("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href);}});onEachLazy(template.content.querySelectorAll("[id]"),el=>{let i=0;if(idMap.has(el.id)){i=idMap.get(el.id);}else if(document.getElementById(el.id)){i=1;while(document.getElementById(`${el.id}-${2 * i}`)){i=2*i;}while(document.getElementById(`${el.id}-${i}`)){i+=1;}}if(i!==0){const oldHref=`#${el.id}`;const newHref=`#${el.id}-${i}`;el.id=`${el.id}-${i}`;onEachLazy(template.content.querySelectorAll("a[href]"),link=>{if(link.getAttribute("href")===oldHref){link.href=newHref;}});}idMap.set(el.id,i+1);});const templateAssocItems=template.content.querySelectorAll("section.tymethod, "+"section.method, section.associatedtype, section.associatedconstant");if(isTrait){const li=document.createElement("li");const a=document.createElement("a");a.href=`#${template.content.querySelector(".impl").id}`;a.textContent=traitName;li.appendChild(a);sidebarTraitList.append(li);}else{onEachLazy(templateAssocItems,item=>{let block=hasClass(item,"associatedtype")?associatedTypes:(hasClass(item,"associatedconstant")?associatedConstants:(methods));if(!block){const blockTitle=hasClass(item,"associatedtype")?"Associated Types":(hasClass(item,"associatedconstant")?"Associated Constants":("Methods"));const blockClass=hasClass(item,"associatedtype")?"associatedtype":(hasClass(item,"associatedconstant")?"associatedconstant":("method"));const blockHeader=document.createElement("h3");const blockLink=document.createElement("a");blockLink.href="#implementations";blockLink.innerText=blockTitle;blockHeader.appendChild(blockLink);block=document.createElement("ul");block.className=`block ${blockClass}`;const insertionReference=methods||sidebarTraitList;if(insertionReference){const insertionReferenceH=insertionReference.previousElementSibling;sidebarSection.insertBefore(blockHeader,insertionReferenceH);sidebarSection.insertBefore(block,insertionReferenceH);}else{sidebarSection.appendChild(blockHeader);sidebarSection.appendChild(block);}if(hasClass(item,"associatedtype")){associatedTypes=block;}else if(hasClass(item,"associatedconstant")){associatedConstants=block;}else{methods=block;}}const li=document.createElement("li");const a=document.createElement("a");a.innerText=item.id.split("-")[0].split(".")[1];a.href=`#${item.id}`;li.appendChild(a);block.appendChild(li);});}outputList.appendChild(template.content);}for(const list of[methods,associatedTypes,associatedConstants,sidebarTraitList]){if(!list){continue;}const newChildren=Array.prototype.slice.call(list.children);newChildren.sort((a,b)=>{const aI=a.innerText;const bI=b.innerText;return aIbI?1:0;});list.replaceChildren(...newChildren);}};if(window.pending_type_impls){window.register_type_impls(window.pending_type_impls);}function addSidebarCrates(){if(!window.ALL_CRATES){return;}const sidebarElems=document.getElementById("rustdoc-modnav");if(!sidebarElems){return;}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";link.textContent=crate;const li=document.createElement("li");if(window.rootPath!=="./"&&crate===window.currentCrate){li.className="current";}li.appendChild(link);ul.appendChild(li);}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul);}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hasClass(e,"type-contents-toggle")&&!hasClass(e,"more-examples-toggle")){e.open=true;}});innerToggle.children[0].innerText="Summary";}function collapseAllDocs(collapseImpls){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if((collapseImpls||e.parentNode.id!=="implementations-list")||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false;}});innerToggle.children[0].innerText="Show all";}function toggleAllDocs(ev){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return;}if(hasClass(innerToggle,"will-expand")){expandAllDocs();}else{collapseAllDocs(ev!==undefined&&ev.shiftKey);}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs;}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open;});}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false);}onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true;}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false;}});}());window.rustdoc_add_line_numbers_to_examples=()=>{function generateLine(nb){return`${nb}`;}onEachLazy(document.querySelectorAll(".rustdoc:not(.src) :not(.scraped-example) > .example-wrap > pre > code",),code=>{if(hasClass(code.parentElement.parentElement,"hide-lines")){removeClass(code.parentElement.parentElement,"hide-lines");return;}const lines=code.innerHTML.split("\n");const digits=(lines.length+"").length;code.innerHTML=lines.map((line,index)=>generateLine(index+1)+line).join("\n");addClass(code.parentElement.parentElement,`digits-${digits}`);});};window.rustdoc_remove_line_numbers_from_examples=()=>{onEachLazy(document.querySelectorAll(".rustdoc:not(.src) :not(.scraped-example) > .example-wrap"),x=>addClass(x,"hide-lines"),);};if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples();}function showSidebar(){window.hideAllModals(false);const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown");}function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown");}window.addEventListener("resize",()=>{if(window.CURRENT_TOOLTIP_ELEMENT){const base=window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE;const force_visible=base.TOOLTIP_FORCE_VISIBLE;hideTooltip(false);if(force_visible){showTooltip(base);base.TOOLTIP_FORCE_VISIBLE=true;}}});const mainElem=document.getElementById(MAIN_ID);if(mainElem){mainElem.addEventListener("click",hideSidebar);}onEachLazy(document.querySelectorAll("a[href^='#']"),el=>{el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar();});});onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(!e.target.matches("summary, a, a *")){e.preventDefault();}});});function showTooltip(e){const notable_ty=e.getAttribute("data-notable-ty");if(!window.NOTABLE_TRAITS&¬able_ty){const data=document.getElementById("notable-traits-data");if(data){window.NOTABLE_TRAITS=JSON.parse(data.innerText);}else{throw new Error("showTooltip() called with notable without any notable traits!");}}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE===e){clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);return;}window.hideAllModals(false);const wrapper=Object.assign(document.createElement("div"),{TOOLTIP_BASE:e});if(notable_ty){wrapper.innerHTML="
"+window.NOTABLE_TRAITS[notable_ty]+"
";}else{const ttl=e.getAttribute("title");if(ttl!==null){e.setAttribute("data-title",ttl);e.removeAttribute("title");}const dttl=e.getAttribute("data-title");if(dttl!==null){const titleContent=document.createElement("div");titleContent.className="content";titleContent.appendChild(document.createTextNode(dttl));wrapper.appendChild(titleContent);}}wrapper.className="tooltip popover";const focusCatcher=document.createElement("div");focusCatcher.setAttribute("tabindex","0");focusCatcher.onfocus=hideTooltip;wrapper.appendChild(focusCatcher);const pos=e.getBoundingClientRect();wrapper.style.top=(pos.top+window.scrollY+pos.height)+"px";wrapper.style.left=0;wrapper.style.right="auto";wrapper.style.visibility="hidden";document.body.appendChild(wrapper);const wrapperPos=wrapper.getBoundingClientRect();const finalPos=pos.left+window.scrollX-wrapperPos.width+24;if(finalPos>0){wrapper.style.left=finalPos+"px";}else{wrapper.style.setProperty("--popover-arrow-offset",(wrapperPos.right-pos.right+4)+"px",);}wrapper.style.visibility="";window.CURRENT_TOOLTIP_ELEMENT=wrapper;clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);wrapper.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return;}clearTooltipHoverTimeout(e);};wrapper.onpointerleave=ev=>{if(ev.pointerType!=="mouse"||!(ev.relatedTarget instanceof HTMLElement)){return;}if(!e.TOOLTIP_FORCE_VISIBLE&&!e.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(wrapper,"fade-out");}};}function setTooltipHoverTimeout(element,show){clearTooltipHoverTimeout(element);if(!show&&!window.CURRENT_TOOLTIP_ELEMENT){return;}if(show&&window.CURRENT_TOOLTIP_ELEMENT){return;}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE!==element){return;}element.TOOLTIP_HOVER_TIMEOUT=setTimeout(()=>{if(show){showTooltip(element);}else if(!element.TOOLTIP_FORCE_VISIBLE){hideTooltip(false);}},show?window.RUSTDOC_TOOLTIP_HOVER_MS:window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS);}function clearTooltipHoverTimeout(element){if(element.TOOLTIP_HOVER_TIMEOUT!==undefined){removeClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out");clearTimeout(element.TOOLTIP_HOVER_TIMEOUT);delete element.TOOLTIP_HOVER_TIMEOUT;}}function tooltipBlurHandler(event){if(window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.contains(event.relatedTarget)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(event.relatedTarget)){setTimeout(()=>hideTooltip(false),0);}}function hideTooltip(focus){if(window.CURRENT_TOOLTIP_ELEMENT){if(window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE){if(focus){window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.focus();}window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE=false;}document.body.removeChild(window.CURRENT_TOOLTIP_ELEMENT);clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);window.CURRENT_TOOLTIP_ELEMENT=undefined;}}onEachLazy(document.getElementsByClassName("tooltip"),e=>{e.onclick=()=>{e.TOOLTIP_FORCE_VISIBLE=e.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!e.TOOLTIP_FORCE_VISIBLE){hideTooltip(true);}else{showTooltip(e);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler;}return false;};e.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return;}setTooltipHoverTimeout(e,true);};e.onpointermove=ev=>{if(ev.pointerType!=="mouse"){return;}setTooltipHoverTimeout(e,true);};e.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return;}if(!e.TOOLTIP_FORCE_VISIBLE&&window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out");}};});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar();}else{hideSidebar();}});}function helpBlurHandler(event){const isInPopover=onEachLazy(document.querySelectorAll(".settings-menu, .help-menu"),menu=>{return menu.contains(document.activeElement)||menu.contains(event.relatedTarget);},);if(!isInPopover){window.hidePopoverMenus();}}function buildHelpMenu(){const book_info=document.createElement("span");const drloChannel=`https://doc.rust-lang.org/${getVar("channel")}`;book_info.className="top";book_info.innerHTML=`You can find more information in \ -the rustdoc book.`;const shortcuts=[["?","Show this help dialog"],["S / /","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+ / =","Expand all sections"],["-","Collapse all sections"],["_","Collapse all sections, including impl blocks"],].map(x=>"
"+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";const infos=[`For a full list of all search features, take a look \ - here.`,"Prefix searches with a type followed by a colon (e.g., fn:) to \ - restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ - enum, trait, type, macro, \ - and const.","Search functions by type signature (e.g., vec -> usize or \ - -> vec or String, enum:Cow -> bool)","You can look for items with an exact name by putting double quotes around \ - your request: \"string\"",`Look for functions that accept or return \ - slices and \ - arrays by writing square \ - brackets (e.g., -> [u8] or [] -> Option)`,"Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover content";}container.id="help";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);nonnull(document.getElementById("main-content")).appendChild(help_section);}else{onEachLazy(document.getElementsByClassName("help-menu"),menu=>{if(menu.offsetWidth!==0){menu.appendChild(container);container.onblur=helpBlurHandler;menu.onblur=helpBlurHandler;menu.children[0].onblur=helpBlurHandler;return true;}});}return container;}window.hideAllModals=switchFocus=>{hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus);};window.hidePopoverMenus=()=>{onEachLazy(document.querySelectorAll(".settings-menu .popover"),elem=>{elem.style.display="none";});onEachLazy(document.querySelectorAll(".help-menu .popover"),elem=>{elem.parentElement.removeChild(elem);});};function showHelp(){window.hideAllModals(false);onEachLazy(document.querySelectorAll(".help-menu a"),menu=>{if(menu.offsetWidth!==0){menu.focus();return true;}});buildHelpMenu();}if(isHelpPage){buildHelpMenu();}else{onEachLazy(document.querySelectorAll(".help-menu > a"),helpLink=>{helpLink.addEventListener("click",event=>{if(event.ctrlKey||event.altKey||event.metaKey){return;}event.preventDefault();if(document.getElementById("help")){window.hidePopoverMenus();}else{showHelp();}},);});}addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);window.searchState.setup();}());(function(){const SIDEBAR_MIN=100;const SIDEBAR_MAX=500;const RUSTDOC_MOBILE_BREAKPOINT=700;const BODY_MIN=400;const SIDEBAR_VANISH_THRESHOLD=SIDEBAR_MIN/2;let sidebarButton=document.getElementById("sidebar-button");const body=document.querySelector(".main-heading");if(!sidebarButton&&body){sidebarButton=document.createElement("div");sidebarButton.id="sidebar-button";const path=`${window.rootPath}${window.currentCrate}/all.html`;sidebarButton.innerHTML=``;body.insertBefore(sidebarButton,body.firstChild);}if(sidebarButton){sidebarButton.addEventListener("click",e=>{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false");if(window.rustdocToggleSrcSidebar){window.rustdocToggleSrcSidebar();}e.preventDefault();});}let currentPointerId=null;let desiredSidebarSize=null;let pendingSidebarResizingFrame=false;const resizer=document.querySelector(".sidebar-resizer");const sidebar=document.querySelector(".sidebar");if(!resizer||!sidebar){return;}const isSrcPage=hasClass(document.body,"src");const hideSidebar=function(){if(isSrcPage){window.rustdocCloseSourceSidebar();updateLocalStorage("src-sidebar-width",null);document.documentElement.style.removeProperty("--src-sidebar-width");sidebar.style.removeProperty("--src-sidebar-width");resizer.style.removeProperty("--src-sidebar-width");}else{addClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","true");updateLocalStorage("desktop-sidebar-width",null);document.documentElement.style.removeProperty("--desktop-sidebar-width");sidebar.style.removeProperty("--desktop-sidebar-width");resizer.style.removeProperty("--desktop-sidebar-width");}};const showSidebar=function(){if(isSrcPage){window.rustdocShowSourceSidebar();}else{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false");}};const changeSidebarSize=function(size){if(isSrcPage){updateLocalStorage("src-sidebar-width",size.toString());sidebar.style.setProperty("--src-sidebar-width",size+"px");resizer.style.setProperty("--src-sidebar-width",size+"px");}else{updateLocalStorage("desktop-sidebar-width",size.toString());sidebar.style.setProperty("--desktop-sidebar-width",size+"px");resizer.style.setProperty("--desktop-sidebar-width",size+"px");}};const isSidebarHidden=function(){return isSrcPage?!hasClass(document.documentElement,"src-sidebar-expanded"):hasClass(document.documentElement,"hide-sidebar");};const resize=function(e){if(currentPointerId===null||currentPointerId!==e.pointerId){return;}e.preventDefault();const pos=e.clientX-3;if(pos=SIDEBAR_MIN){if(isSidebarHidden()){showSidebar();}const constrainedPos=Math.min(pos,window.innerWidth-BODY_MIN,SIDEBAR_MAX);changeSidebarSize(constrainedPos);desiredSidebarSize=constrainedPos;if(pendingSidebarResizingFrame!==false){clearTimeout(pendingSidebarResizingFrame);}pendingSidebarResizingFrame=setTimeout(()=>{if(currentPointerId===null||pendingSidebarResizingFrame===false){return;}pendingSidebarResizingFrame=false;document.documentElement.style.setProperty("--resizing-sidebar-width",desiredSidebarSize+"px",);},100);}};window.addEventListener("resize",()=>{if(window.innerWidth=(window.innerWidth-BODY_MIN)){changeSidebarSize(window.innerWidth-BODY_MIN);}else if(desiredSidebarSize!==null&&desiredSidebarSize>SIDEBAR_MIN){changeSidebarSize(desiredSidebarSize);}});const stopResize=function(e){if(currentPointerId===null){return;}if(e){e.preventDefault();}desiredSidebarSize=sidebar.getBoundingClientRect().width;removeClass(resizer,"active");window.removeEventListener("pointermove",resize,false);window.removeEventListener("pointerup",stopResize,false);removeClass(document.documentElement,"sidebar-resizing");document.documentElement.style.removeProperty("--resizing-sidebar-width");if(resizer.releasePointerCapture){resizer.releasePointerCapture(currentPointerId);currentPointerId=null;}};const initResize=function(e){if(currentPointerId!==null||e.altKey||e.ctrlKey||e.metaKey||e.button!==0){return;}if(resizer.setPointerCapture){resizer.setPointerCapture(e.pointerId);if(!resizer.hasPointerCapture(e.pointerId)){resizer.releasePointerCapture(e.pointerId);return;}currentPointerId=e.pointerId;}window.hideAllModals(false);e.preventDefault();window.addEventListener("pointermove",resize,false);window.addEventListener("pointercancel",stopResize,false);window.addEventListener("pointerup",stopResize,false);addClass(resizer,"active");addClass(document.documentElement,"sidebar-resizing");const pos=e.clientX-sidebar.offsetLeft-3;document.documentElement.style.setProperty("--resizing-sidebar-width",pos+"px");desiredSidebarSize=null;};resizer.addEventListener("pointerdown",initResize,false);}());(function(){function copyContentToClipboard(content){if(content===null){return;}const el=document.createElement("textarea");el.value=content;el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);}function copyButtonAnimation(button){button.classList.add("clicked");if(button.reset_button_timeout!==undefined){clearTimeout(button.reset_button_timeout);}button.reset_button_timeout=setTimeout(()=>{button.reset_button_timeout=undefined;button.classList.remove("clicked");},1000);}const but=document.getElementById("copy-path");if(!but){return;}but.onclick=()=>{const titleElement=document.querySelector("title");const title=titleElement&&titleElement.textContent?titleElement.textContent.replace(" - Rust",""):"";const[item,module]=title.split(" in ");const path=[item];if(module!==undefined){path.unshift(module);}copyContentToClipboard(path.join("::"));copyButtonAnimation(but);};function copyCode(codeElem){if(!codeElem){return;}copyContentToClipboard(codeElem.textContent);}function getExampleWrap(event){const target=event.target;if(target instanceof HTMLElement){let elem=target;while(elem!==null&&!hasClass(elem,"example-wrap")){if(elem===document.body||elem.tagName==="A"||elem.tagName==="BUTTON"||hasClass(elem,"docblock")){return null;}elem=elem.parentElement;}return elem;}else{return null;}}function addCopyButton(event){const elem=getExampleWrap(event);if(elem===null){return;}elem.removeEventListener("mouseover",addCopyButton);const parent=document.createElement("div");parent.className="button-holder";const runButton=elem.querySelector(".test-arrow");if(runButton!==null){parent.appendChild(runButton);}elem.appendChild(parent);const copyButton=document.createElement("button");copyButton.className="copy-button";copyButton.title="Copy code to clipboard";copyButton.addEventListener("click",()=>{copyCode(elem.querySelector("pre > code"));copyButtonAnimation(copyButton);});parent.appendChild(copyButton);if(!elem.parentElement||!elem.parentElement.classList.contains("scraped-example")||!window.updateScrapedExample){return;}const scrapedWrapped=elem.parentElement;window.updateScrapedExample(scrapedWrapped,parent);}function showHideCodeExampleButtons(event){const elem=getExampleWrap(event);if(elem===null){return;}let buttons=elem.querySelector(".button-holder");if(buttons===null){addCopyButton(event);buttons=elem.querySelector(".button-holder");if(buttons===null){return;}}buttons.classList.toggle("keep-visible");}onEachLazy(document.querySelectorAll(".docblock .example-wrap"),elem=>{elem.addEventListener("mouseover",addCopyButton);elem.addEventListener("click",showHideCodeExampleButtons);});}());(function(){document.body.addEventListener("copy",event=>{let target=nonnull(event.target);let isInsideCode=false;while(target&&target!==document.body){if(target.tagName==="CODE"){isInsideCode=true;break;}target=target.parentElement;}if(!isInsideCode){return;}const selection=nonnull(document.getSelection());const text=Array.from({length:selection.rangeCount},(_,i)=>{const fragment=selection.getRangeAt(i).cloneContents();fragment.querySelectorAll("[data-nosnippet]").forEach(el=>el.remove());return fragment.textContent;}).join("");nonnull(event.clipboardData).setData("text/plain",text);event.preventDefault();});}()); \ No newline at end of file diff --git a/core/target/doc/static.files/normalize-9960930a.css b/core/target/doc/static.files/normalize-9960930a.css deleted file mode 100644 index 469959f1..00000000 --- a/core/target/doc/static.files/normalize-9960930a.css +++ /dev/null @@ -1,2 +0,0 @@ - /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ -html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type="button"],[type="reset"],[type="submit"],button{-webkit-appearance:button}[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} \ No newline at end of file diff --git a/core/target/doc/static.files/noscript-263c88ec.css b/core/target/doc/static.files/noscript-263c88ec.css deleted file mode 100644 index e41db77d..00000000 --- a/core/target/doc/static.files/noscript-263c88ec.css +++ /dev/null @@ -1 +0,0 @@ - #main-content .attributes{margin-left:0 !important;}#copy-path,#sidebar-button,.sidebar-resizer{display:none !important;}nav.sub{display:none;}.src .sidebar{display:none;}.notable-traits{display:none;}:root,:root:not([data-theme]){--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--sidebar-border-color:#ddd;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--mobile-sidebar-menu-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--code-example-button-color:#7f7f7f;--code-example-button-hover-color:#595959;--settings-menu-filter:invert(50%);--settings-menu-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--attribute-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}@media (prefers-color-scheme:dark){:root,:root:not([data-theme]){--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--sidebar-border-color:#2A2A2A;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--code-example-button-color:#7f7f7f;--code-example-button-hover-color:#a5a5a5;--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--attribute-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--settings-menu-filter:invert(50%);--settings-menu-hover-filter:invert(65%);--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}} \ No newline at end of file diff --git a/core/target/doc/static.files/rust-logo-9a9549ea.svg b/core/target/doc/static.files/rust-logo-9a9549ea.svg deleted file mode 100644 index 62424d8f..00000000 --- a/core/target/doc/static.files/rust-logo-9a9549ea.svg +++ /dev/null @@ -1,61 +0,0 @@ - - - diff --git a/core/target/doc/static.files/rustdoc-ca0dd0c4.css b/core/target/doc/static.files/rustdoc-ca0dd0c4.css deleted file mode 100644 index 7e6df69c..00000000 --- a/core/target/doc/static.files/rustdoc-ca0dd0c4.css +++ /dev/null @@ -1,86 +0,0 @@ - :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;--desktop-sidebar-width:200px;--src-sidebar-width:300px;--desktop-sidebar-z-index:100;--sidebar-elems-left-padding:24px;--clipboard-image:url('data:image/svg+xml,\ -\ -\ -');--copy-path-height:34px;--copy-path-width:33px;--checkmark-image:url('data:image/svg+xml,\ -\ -');--button-left-margin:4px;--button-border-radius:2px;--toolbar-button-border-radius:6px;--code-block-border-radius:6px;--impl-items-indent:0.3em;--docblock-indent:24px;--font-family:"Source Serif 4",NanumBarunGothic,serif;--font-family-code:"Source Code Pro",monospace;--line-number-padding:4px;--line-number-right-margin:20px;--prev-arrow-image:url('data:image/svg+xml,');--next-arrow-image:url('data:image/svg+xml,');--expand-arrow-image:url('data:image/svg+xml,');--collapse-arrow-image:url('data:image/svg+xml,');--hamburger-image:url('data:image/svg+xml,\ - ');}:root.sans-serif{--font-family:"Fira Sans",sans-serif;--font-family-code:"Fira Mono",monospace;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular-0fe48ade.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:italic;font-weight:400;src:local('Fira Sans Italic'),url("FiraSans-Italic-81dc35de.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium-e1aa3f0a.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:italic;font-weight:500;src:local('Fira Sans Medium Italic'),url("FiraSans-MediumItalic-ccf7e434.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Mono';font-style:normal;font-weight:400;src:local('Fira Mono'),url("FiraMono-Regular-87c26294.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Mono';font-style:normal;font-weight:500;src:local('Fira Mono Medium'),url("FiraMono-Medium-86f75c8c.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular-6b053e98.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It-ca3b17ed.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:500;src:local('Source Serif 4 Semibold'),url("SourceSerif4-Semibold-457a13ac.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold-6d4fd4c0.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular-8badfe75.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It-fc8b9304.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold-aa29a496.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic-13b3dcba.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{box-sizing:border-box;}body{font:1rem/1.5 var(--font-family);margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}.main-heading h1{margin:0;padding:0;grid-area:main-heading-h1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{position:relative;display:grid;grid-template-areas:"main-heading-breadcrumbs main-heading-breadcrumbs" "main-heading-h1 main-heading-toolbar" "main-heading-sub-heading main-heading-toolbar";grid-template-columns:minmax(105px,1fr) minmax(0,max-content);grid-template-rows:minmax(25px,min-content) min-content min-content;padding-bottom:6px;margin-bottom:15px;}.search-results-main-heading{grid-template-areas:"main-heading-breadcrumbs main-heading-placeholder" "main-heading-breadcrumbs main-heading-toolbar " "main-heading-h1 main-heading-toolbar ";}.search-results-main-heading nav.sub{grid-area:main-heading-h1;align-items:end;margin:4px 0 8px 0;}.rustdoc-breadcrumbs{grid-area:main-heading-breadcrumbs;line-height:1.25;padding-top:5px;position:relative;z-index:1;}.search-switcher{grid-area:main-heading-breadcrumbs;line-height:1.5;display:flex;color:var(--main-color);align-items:baseline;white-space:nowrap;padding-top:8px;min-height:34px;}.rustdoc-breadcrumbs a{padding:5px 0 7px;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h1,h2{line-height:1.25;padding-top:3px;padding-bottom:9px;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;white-space:pre-wrap;}.structfield,.sub-variant-field{margin:0.6em 0;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,rustdoc-topbar,.search-input,.search-results .result-name,.item-table dt>a,.out-of-band,.sub-heading,span.since,a.src,rustdoc-toolbar,summary.hideme,.scraped-example-list,.rustdoc-breadcrumbs,.search-switcher,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}#toggle-all-docs,a.anchor,.section-header a,#src-sidebar a,.rust a,.sidebar h2 a,.sidebar h3 a,rustdoc-topbar h2 a,h1 a,.search-results a,.search-results li,.stab,.result-name i{color:var(--main-color);}span.enum,a.enum,span.struct,a.struct,span.union,a.union,span.primitive,a.primitive,span.type,a.type,span.foreigntype,a.foreigntype{color:var(--type-link-color);}span.trait,a.trait,span.traitalias,a.traitalias{color:var(--trait-link-color);}span.associatedtype,a.associatedtype,span.constant,a.constant,span.static,a.static{color:var(--assoc-item-link-color);}span.fn,a.fn,span.method,a.method,span.tymethod,a.tymethod{color:var(--function-link-color);}span.attr,a.attr,span.derive,a.derive,span.macro,a.macro{color:var(--macro-link-color);}span.mod,a.mod{color:var(--mod-link-color);}span.keyword,a.keyword{color:var(--keyword-link-color);}span.attribute,a.attribute{color:var(--attribute-link-color);}a{color:var(--link-color);text-decoration:none;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p,.docblock>.warning{margin:0 0 .75em 0;}p:last-child,.docblock>.warning:last-child{margin:0;}button{padding:1px 6px;cursor:pointer;}button#toggle-all-docs{padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.src main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}details:not(.toggle) summary{margin-bottom:.6em;}code,pre,.code-header,.type-signature{font-family:var(--font-family-code);}.docblock code,.item-table dd code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.item-table dd pre code{padding:0;}pre{padding:14px;line-height:1.5;}pre.item-decl{overflow-x:auto;}.item-decl .type-contents-toggle{contain:initial;}.src .content pre{padding:20px;padding-left:16px;}img{max-width:100%;}.logo-container{line-height:0;display:block;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 var(--desktop-sidebar-width);width:var(--desktop-sidebar-width);overflow-y:scroll;overscroll-behavior:contain;position:sticky;height:100vh;top:0;left:0;z-index:var(--desktop-sidebar-z-index);border-right:solid 1px var(--sidebar-border-color);}.rustdoc.src .sidebar{flex-basis:50px;width:50px;overflow-x:hidden;overflow-y:hidden;}.hide-sidebar .sidebar,.hide-sidebar .sidebar-resizer{display:none;}.sidebar-resizer{touch-action:none;width:9px;cursor:ew-resize;z-index:calc(var(--desktop-sidebar-z-index) + 1);position:fixed;height:100%;left:var(--desktop-sidebar-width);display:flex;align-items:center;justify-content:flex-start;color:var(--right-side-color);}.sidebar-resizer::before{content:"";border-right:dotted 2px currentColor;width:2px;height:12px;}.sidebar-resizer::after{content:"";border-right:dotted 2px currentColor;width:2px;height:16px;}.rustdoc.src .sidebar-resizer{left:49px;}.src-sidebar-expanded .src .sidebar-resizer{left:var(--src-sidebar-width);}.sidebar-resizing{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.sidebar-resizing *{cursor:ew-resize !important;}.sidebar-resizing .sidebar{position:fixed;border-right:solid 2px var(--sidebar-resizer-active);}.sidebar-resizing>body{padding-left:var(--resizing-sidebar-width);}.sidebar-resizer:hover,.sidebar-resizer:active,.sidebar-resizer:focus,.sidebar-resizer.active{width:10px;margin:0;left:calc(var(--desktop-sidebar-width) - 1px);border-left:solid 1px var(--sidebar-resizer-hover);color:var(--sidebar-resizer-hover);}.src-sidebar-expanded .rustdoc.src .sidebar-resizer:hover,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:active,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:focus,.src-sidebar-expanded .rustdoc.src .sidebar-resizer.active{left:calc(var(--src-sidebar-width) - 1px);}@media (pointer:coarse){.sidebar-resizer{display:none !important;}.sidebar{border-right:none;}}.sidebar-resizer.active{padding:0 140px;width:calc(140px + 140px + 9px + 2px);margin-left:-140px;border-left:none;color:var(--sidebar-resizer-active);}.sidebar,rustdoc-topbar,.sidebar-menu-toggle,#src-sidebar{background-color:var(--sidebar-background-color);}.src .sidebar>*{visibility:hidden;}.src-sidebar-expanded .src .sidebar{overflow-y:auto;flex-basis:var(--src-sidebar-width);width:var(--src-sidebar-width);}.src-sidebar-expanded .src .sidebar>*{visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.logo-container>img{height:48px;width:48px;}ul.block,.block li,.block ul{padding:0;margin:0;list-style:none;}.block ul a{padding-left:1rem;}.sidebar-elems a,.sidebar>h2 a{display:block;padding:0.25rem;margin-right:0.25rem;border-left:solid var(--sidebar-elems-left-padding) transparent;margin-left:calc(-0.25rem - var(--sidebar-elems-left-padding));background-clip:border-box;}.hide-toc #rustdoc-toc,.hide-toc .in-crate{display:none;}.hide-modnav #rustdoc-modnav{display:none;}.sidebar h2{text-wrap:balance;overflow-wrap:anywhere;padding:0;margin:0.7rem 0;}.sidebar h3{text-wrap:balance;overflow-wrap:anywhere;font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>.version,.sidebar>h2{padding-left:var(--sidebar-elems-left-padding);}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar .current a,.sidebar-crate a.logo-container:hover+h2 a,.sidebar a:hover:not(.logo-container){background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.sidebar-crate{display:flex;align-items:center;justify-content:center;margin:14px 32px 1rem;row-gap:10px;column-gap:32px;flex-wrap:wrap;}.sidebar-crate h2{flex-grow:1;margin:0 -8px;align-self:start;}.sidebar-crate .logo-container{margin:0 calc(-16px - var(--sidebar-elems-left-padding));padding:0 var(--sidebar-elems-left-padding);text-align:center;}.sidebar-crate .logo-container img{margin-top:-16px;border-top:solid 16px transparent;box-sizing:content-box;position:relative;background-clip:border-box;z-index:1;}.sidebar-crate h2 a{display:block;border-left:solid var(--sidebar-elems-left-padding) transparent;background-clip:border-box;margin:0 calc(-24px + 0.25rem) 0 calc(-0.2rem - var(--sidebar-elems-left-padding));padding:calc((16px - 0.57rem ) / 2 ) 0.25rem;padding-left:0.2rem;}.sidebar-crate h2 .version{display:block;font-weight:normal;font-size:1rem;overflow-wrap:break-word;}.sidebar-crate+.version{margin-top:-1rem;margin-bottom:1rem;}rustdoc-topbar{display:none;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap>pre,.rustdoc .scraped-example .src-line-numbers,.rustdoc .scraped-example .src-line-numbers>pre{border-radius:6px;}.rustdoc .scraped-example{position:relative;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap pre{margin:0;flex-grow:1;}.scraped-example:not(.expanded) .example-wrap{max-height:calc(1.5em * 5 + 10px);}.more-scraped-examples .scraped-example:not(.expanded) .example-wrap{max-height:calc(1.5em * 10 + 10px);}.rustdoc:not(.src) .scraped-example:not(.expanded) .src-line-numbers,.rustdoc:not(.src) .scraped-example:not(.expanded) .src-line-numbers>pre,.rustdoc:not(.src) .scraped-example:not(.expanded) pre.rust{padding-bottom:0;overflow:auto hidden;}.rustdoc:not(.src) .scraped-example .src-line-numbers{padding-top:0;}.rustdoc:not(.src) .scraped-example.expanded .src-line-numbers{padding-bottom:0;}.rustdoc:not(.src) .example-wrap pre{overflow:auto;}.example-wrap code{position:relative;}.example-wrap pre code span{display:inline;}.example-wrap.digits-1{--example-wrap-digits-count:1ch;}.example-wrap.digits-2{--example-wrap-digits-count:2ch;}.example-wrap.digits-3{--example-wrap-digits-count:3ch;}.example-wrap.digits-4{--example-wrap-digits-count:4ch;}.example-wrap.digits-5{--example-wrap-digits-count:5ch;}.example-wrap.digits-6{--example-wrap-digits-count:6ch;}.example-wrap.digits-7{--example-wrap-digits-count:7ch;}.example-wrap.digits-8{--example-wrap-digits-count:8ch;}.example-wrap.digits-9{--example-wrap-digits-count:9ch;}.example-wrap .expansion{position:relative;display:inline;}.example-wrap .expansion>input{display:block;position:absolute;appearance:none;content:'↕';left:-20px;top:0;border:1px solid var(--border-color);border-radius:4px;cursor:pointer;color:var(--main-color);padding:0 2px;line-height:20px;}.example-wrap .expansion>input::after{content:"↕";}.example-wrap .expansion .expanded{display:none;color:var(--main-color);}.example-wrap .expansion>input:checked~.expanded,.example-wrap .expansion>input:checked~* .expanded{display:inherit;}.example-wrap .expansion>input:checked~.original,.example-wrap .expansion>input:checked~* .original{display:none;}.example-wrap [data-nosnippet]{width:calc(var(--example-wrap-digits-count) + var(--line-number-padding) * 2);}.example-wrap pre>code{padding-left:calc(var(--example-wrap-digits-count) + var(--line-number-padding) * 2 + var(--line-number-right-margin));}.src .example-wrap .expansion [data-nosnippet]{position:initial;margin-left:calc((var(--example-wrap-digits-count) + var(--line-number-padding) * 2 + var(--line-number-right-margin)) * -1);}.example-wrap [data-nosnippet]{color:var(--src-line-numbers-span-color);text-align:right;display:inline-block;margin-right:var(--line-number-right-margin);-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;padding:0 var(--line-number-padding);position:absolute;left:0;}.example-wrap pre>code{position:relative;display:block;}:root.word-wrap-source-code .example-wrap pre>code{word-break:break-all;white-space:pre-wrap;}:root.word-wrap-source-code .example-wrap pre>code *{word-break:break-all;}.example-wrap [data-nosnippet]:target{border-right:none;}.example-wrap .line-highlighted[data-nosnippet]{background-color:var(--src-line-number-highlighted-background-color);}.example-wrap.hide-lines [data-nosnippet]{display:none;}.search-loading{text-align:center;}.item-table dd{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock :not(pre)>code,.item-table dd code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:var(--docblock-indent);position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.sub-heading{font-size:1rem;flex-grow:0;grid-area:main-heading-sub-heading;line-height:1.25;padding-bottom:4px;}.main-heading rustdoc-toolbar,.main-heading .out-of-band{grid-area:main-heading-toolbar;}rustdoc-toolbar{display:flex;flex-direction:row;flex-wrap:nowrap;min-height:60px;}.docblock code,.item-table dd code,pre,.rustdoc.src .example-wrap,.example-wrap .src-line-numbers{background-color:var(--code-block-background-color);border-radius:var(--code-block-border-radius);text-decoration:inherit;}#main-content{position:relative;}.docblock table{margin:.5em 0;border-collapse:collapse;}.docblock table td,.docblock table th{padding:.5em;border:1px solid var(--border-color);}.docblock table tbody tr:nth-child(2n){background:var(--table-alt-row-background-color);}.docblock .stab,.item-table dd .stab,.docblock p code{display:inline-block;}.docblock li{margin-bottom:.4em;}.docblock li p:not(:last-child){margin-bottom:.3em;}div.where{white-space:pre-wrap;font-size:0.875rem;}.item-info{display:block;margin-left:var(--docblock-indent);}.impl-items>.item-info{margin-left:calc(var(--docblock-indent) + var(--impl-items-indent));}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;display:flex;align-items:start;margin-top:4px;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;}.src nav.sub{margin:0 0 -10px 0;}.section-header{display:block;position:relative;}.section-header:hover>.anchor,.impl:hover>.anchor,.trait-impl:hover>.anchor,.variant:hover>.anchor{display:initial;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.section-header>.anchor{left:-15px;padding-right:8px;}h2.section-header>.anchor{padding-right:6px;}a.doc-anchor{color:var(--main-color);display:none;position:absolute;left:-17px;padding-right:10px;padding-left:3px;}*:hover>.doc-anchor{display:block;}.top-doc>.docblock>*:first-child>.doc-anchor{display:none !important;}.main-heading a:hover,.example-wrap .rust a:hover:not([data-nosnippet]),.all-items a:hover,.docblock a:not(.scrape-help):not(.tooltip):hover:not(.doc-anchor),.item-table dd a:not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block li.current a{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{padding:0;margin:0;width:100%;}.item-table>dt{padding-right:1.25rem;}.item-table>dd{margin-inline-start:0;margin-left:0;}#crate-search-div{position:relative;min-width:0;margin-top:-1px;}#crate-search{padding:0 23px 0 4px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}#crate-search:hover,#crate-search:focus{border-color:var(--crate-search-hover-border);}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url('data:image/svg+xml, \ - ');filter:var(--crate-search-div-filter);}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:var(--crate-search-div-hover-filter);}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);max-width:100%;}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;}.search-results.active{display:block;margin:0;padding:0;}.search-results>a{display:grid;grid-template-areas:"search-result-name search-result-desc" "search-result-type-signature search-result-type-signature";grid-template-columns:.6fr .4fr;margin-left:2px;margin-right:2px;border-bottom:1px solid var(--search-result-border-color);column-gap:1em;}.search-results>a>div.desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;grid-area:search-result-desc;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.search-results .result-name{display:flex;align-items:center;justify-content:start;grid-area:search-result-name;}.search-results .result-name .alias{color:var(--search-results-alias-color);}.search-results .result-name .grey{color:var(--search-results-grey-color);}.search-results .result-name .typename{color:var(--search-results-grey-color);font-size:0.875rem;width:var(--search-typename-width);}.search-results .result-name .path{word-break:break-all;max-width:calc(100% - var(--search-typename-width));display:inline-block;}.search-results .result-name .path>*{display:inline;}.search-results .type-signature{grid-area:search-result-type-signature;white-space:pre-wrap;}.popover{position:absolute;top:100%;right:0;z-index:calc(var(--desktop-sidebar-z-index) + 1);margin-top:7px;border-radius:3px;border:1px solid var(--border-color);background-color:var(--main-background-color);color:var(--main-color);--popover-arrow-offset:11px;}.popover::before{content:'';position:absolute;right:var(--popover-arrow-offset);border:solid var(--border-color);border-width:1px 1px 0 0;background-color:var(--main-background-color);padding:4px;transform:rotate(-45deg);top:-5px;}.setting-line{margin:1.2em 0.6em;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:2px solid var(--settings-input-border-color);outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-check input{flex-shrink:0;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);border-width:1px;content:url('data:image/svg+xml,\ - \ - ');}.setting-radio input:focus,.setting-check input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-radio input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-radio input:hover,.setting-check input:hover{border-color:var(--settings-input-color) !important;}#settings.popover{--popover-arrow-offset:196px;top:calc(100% - 16px);}#help.popover{max-width:600px;--popover-arrow-offset:115px;top:calc(100% - 16px);}#help dt{float:left;clear:left;margin-right:0.5rem;}#help dd{margin-bottom:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;padding:0 0.5rem;text-wrap-style:balance;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side{display:flex;margin-bottom:20px;}.side-by-side>div{width:50%;padding:0 20px 0 17px;}.item-info .stab{display:block;padding:3px;margin-bottom:5px;}.item-table dt .stab{margin-left:0.3125em;}.stab{padding:0 2px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);width:fit-content;white-space:pre-wrap;border-radius:3px;display:inline;vertical-align:baseline;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji,.item-info .stab::before{font-size:1.25rem;}.stab .emoji{margin-right:0.3rem;}.item-info .stab::before{content:"\0";width:0;display:inline-block;color:transparent;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;float:right;}.rightside:not(a),.out-of-band,.sub-heading,rustdoc-toolbar{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attr{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.rustdoc.src .example-wrap pre.rust a:not([data-nosnippet]){background:var(--codeblock-link-background);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;left:-25px;top:5px;margin:0;line-height:1;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}.content .docblock .warning{border-left:2px solid var(--warning-border-color);padding:14px;position:relative;overflow-x:visible !important;}.content .docblock .warning::before{color:var(--warning-border-color);content:"ⓘ";position:absolute;left:-25px;top:5px;font-weight:bold;font-size:1.25rem;}.top-doc>.docblock>.warning:first-child::before{top:20px;}.example-wrap>a.test-arrow,.example-wrap .button-holder{visibility:hidden;position:absolute;top:4px;right:4px;z-index:1;}a.test-arrow{height:var(--copy-path-height);padding:6px 4px 0 11px;}a.test-arrow::before{content:url('data:image/svg+xml,');}.example-wrap .button-holder{display:flex;}@media not (pointer:coarse){.example-wrap:hover>a.test-arrow,.example-wrap:hover>.button-holder{visibility:visible;}}.example-wrap .button-holder.keep-visible{visibility:visible;}.example-wrap .button-holder>*{background:var(--main-background-color);cursor:pointer;border-radius:var(--button-border-radius);height:var(--copy-path-height);width:var(--copy-path-width);border:0;color:var(--code-example-button-color);}.example-wrap .button-holder>*:hover{color:var(--code-example-button-hover-color);}.example-wrap .button-holder>*:not(:first-child){margin-left:var(--button-left-margin);}.example-wrap .button-holder .copy-button{padding:2px 0 0 4px;}.example-wrap .button-holder .copy-button::before,.example-wrap .test-arrow::before,.example-wrap .button-holder .prev::before,.example-wrap .button-holder .next::before,.example-wrap .button-holder .expand::before{filter:var(--copy-path-img-filter);}.example-wrap .button-holder .copy-button::before{content:var(--clipboard-image);}.example-wrap .button-holder .copy-button:hover::before,.example-wrap .test-arrow:hover::before{filter:var(--copy-path-img-hover-filter);}.example-wrap .button-holder .copy-button.clicked::before{content:var(--checkmark-image);padding-right:5px;}.example-wrap .button-holder .prev,.example-wrap .button-holder .next,.example-wrap .button-holder .expand{line-height:0px;}.example-wrap .button-holder .prev::before{content:var(--prev-arrow-image);}.example-wrap .button-holder .next::before{content:var(--next-arrow-image);}.example-wrap .button-holder .expand::before{content:var(--expand-arrow-image);}.example-wrap .button-holder .expand.collapse::before{content:var(--collapse-arrow-image);}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;display:block;}.main-heading span.since::before{content:"Since ";}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}@keyframes targetfadein{from{background-color:var(--main-background-color);}10%{background-color:var(--target-border-color);}to{background-color:var(--target-background-color);}}:target:not([data-nosnippet]){background-color:var(--target-background-color);border-right:3px solid var(--target-border-color);}a.tooltip{font-family:var(--font-family);}.code-header a.tooltip{color:inherit;margin-right:15px;position:relative;}.code-header a.tooltip:hover{color:var(--link-color);}a.tooltip:hover::after{position:absolute;top:calc(100% - 10px);left:-15px;right:-15px;height:20px;content:"\00a0";}@media not (prefers-reduced-motion){:target{animation:0.65s cubic-bezier(0,0,0.1,1.0) 0.1s targetfadein;}.fade-out{opacity:0;transition:opacity 0.45s cubic-bezier(0,0,0.1,1.0);}}.popover.tooltip .content{margin:0.25em 0.5em;}.popover.tooltip .content pre,.popover.tooltip .content code{background:transparent;margin:0;padding:0;font-size:1.25rem;white-space:pre-wrap;}.popover.tooltip .content>h3:first-child{margin:0 0 5px 0;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#search-tabs{margin-top:0.25rem;display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#search-tabs button{text-align:center;font-size:1.125rem;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#search-tabs button:not(.selected){background-color:var(--search-tab-button-not-selected-background);border-top-color:var(--search-tab-button-not-selected-border-top-color);}#search-tabs button:hover,#search-tabs button.selected{background-color:var(--search-tab-button-selected-background);border-top-color:var(--search-tab-button-selected-border-top-color);}#search-tabs .count{font-size:1rem;font-variant-numeric:tabular-nums;color:var(--search-tab-title-count-color);position:relative;}#search-tabs .count.loading{color:transparent;}.search-form.loading::after{width:18px;height:18px;border-radius:18px;content:url('data:image/svg+xml,\ - \ - \ - \ - \ - \ - \ - \ - \ - \ - ');position:absolute;right:8px;top:8px;filter:var(--settings-menu-filter);}#search .error code{border-radius:3px;background-color:var(--search-error-code-background-color);}.search-corrections{font-weight:normal;}#src-sidebar{width:100%;overflow:auto;}#src-sidebar div.files>a:hover,details.dir-entry summary:hover,#src-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:var(--src-sidebar-background-hover);}#src-sidebar div.files>a.selected{background-color:var(--src-sidebar-background-selected);}.src-sidebar-title{position:sticky;top:0;display:flex;padding:8px 8px 0 48px;margin-bottom:7px;background:var(--sidebar-background-color);border-bottom:1px solid var(--border-color);}#search-button,.settings-menu,.help-menu,button#toggle-all-docs{margin-left:var(--button-left-margin);display:flex;line-height:1.25;min-width:14px;}#sidebar-button{display:none;line-height:0;}.hide-sidebar #sidebar-button,.src #sidebar-button{display:flex;margin-right:4px;position:fixed;margin-top:25px;left:6px;height:34px;width:34px;z-index:calc(var(--desktop-sidebar-z-index) + 1);}.hide-sidebar #sidebar-button{left:6px;background-color:var(--main-background-color);}.src #sidebar-button{margin-top:0;top:8px;left:8px;border-color:var(--border-color);}.hide-sidebar .src #sidebar-button{position:static;}#search-button>a,.settings-menu>a,.help-menu>a,#sidebar-button>a,button#toggle-all-docs{display:flex;align-items:center;justify-content:center;flex-direction:column;}#search-button>a,.settings-menu>a,.help-menu>a,button#toggle-all-docs{border:1px solid transparent;border-radius:var(--button-border-radius);color:var(--main-color);}#search-button>a,.settings-menu>a,.help-menu>a,button#toggle-all-docs{width:80px;border-radius:var(--toolbar-button-border-radius);}#search-button>a,.settings-menu>a,.help-menu>a{min-width:0;}#sidebar-button>a{border:solid 1px transparent;border-radius:var(--button-border-radius);background-color:var(--button-background-color);width:33px;}.src #sidebar-button>a{background-color:var(--sidebar-background-color);border-color:var(--border-color);}#search-button>a:hover,#search-button>a:focus-visible,.settings-menu>a:hover,.settings-menu>a:focus-visible,.help-menu>a:hover,#help-menu>a:focus-visible,#sidebar-button>a:hover,#sidebar-button>a:focus-visible,#copy-path:hover,#copy-path:focus-visible,button#toggle-all-docs:hover,button#toggle-all-docs:focus-visible{border-color:var(--settings-button-border-focus);text-decoration:none;}#search-button>a::before{content:url('data:image/svg+xml,\ - \ - Search\ - ');width:18px;height:18px;filter:var(--settings-menu-filter);}.settings-menu>a::before{content:url('data:image/svg+xml,\ - \ - ');width:18px;height:18px;filter:var(--settings-menu-filter);}button#toggle-all-docs::before{content:url('data:image/svg+xml,\ - ');width:18px;height:18px;filter:var(--settings-menu-filter);}.help-menu>a::before{content:url('data:image/svg+xml,\ - \ - \ - \ - \ - ');width:18px;height:18px;filter:var(--settings-menu-filter);}.help-menu>a{width:74px;}.help-menu>a>.label{padding-right:1px;}#toggle-all-docs:not(.will-expand)>.label{padding-left:1px;}#search-button>a::before,button#toggle-all-docs::before,.help-menu>a::before,.settings-menu>a::before{filter:var(--settings-menu-filter);margin:8px;}@media not (pointer:coarse){#search-button>a:hover::before,button#toggle-all-docs:hover::before,.help-menu>a:hover::before,.settings-menu>a:hover::before{filter:var(--settings-menu-hover-filter);}}button[disabled]#toggle-all-docs{opacity:0.25;border:solid 1px var(--main-background-color);background-size:cover;}button[disabled]#toggle-all-docs:hover{border:solid 1px var(--main-background-color);cursor:not-allowed;}rustdoc-toolbar span.label{font-size:1rem;flex-grow:1;padding-bottom:4px;}#sidebar-button>a::before{content:url('data:image/svg+xml,\ - \ - \ - ');width:22px;height:22px;}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:var(--copy-path-height);width:var(--copy-path-width);margin-left:10px;padding:0;padding-left:2px;border:solid 1px transparent;border-radius:var(--button-border-radius);font-size:0;}#copy-path::before{filter:var(--copy-path-img-filter);content:var(--clipboard-image);}#copy-path:hover::before{filter:var(--copy-path-img-hover-filter);}#copy-path.clicked::before{content:var(--checkmark-image);}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}.settings-menu.rotate>a img{animation:rotating 2s linear infinite;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;color:var(--kbd-color);background-color:var(--kbd-background);box-shadow:inset 0 -1px 0 var(--kbd-box-shadow-color);}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 -4px;padding:0 0 0 4px;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.toggle{contain:layout;position:relative;}details.big-toggle{contain:inline-size;}details.toggle>summary.hideme{cursor:pointer;font-size:1rem;}details.toggle>summary{list-style:none;outline:none;}details.toggle>summary::-webkit-details-marker,details.toggle>summary::marker{display:none;}details.toggle>summary.hideme>span{margin-left:9px;}details.toggle>summary::before{background:url('data:image/svg+xml,\ - ');content:"";cursor:pointer;width:16px;height:16px;display:inline-block;vertical-align:middle;opacity:.5;filter:var(--toggle-filter);}details.toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.toggle>summary.hideme::after{content:"";}details.toggle>summary:focus::before,details.toggle>summary:hover::before{opacity:1;}details.toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.non-exhaustive{margin-bottom:8px;}details.toggle>summary.hideme::before{position:relative;}details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>.methods>details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}.impl-items>*:not(.item-info),.implementors-toggle>.docblock,#main-content>.methods>:not(.item-info),.impl>.item-info,.impl>.docblock,.impl+.docblock{margin-left:var(--impl-items-indent);}details.big-toggle>summary:not(.hideme)::before{left:-34px;top:9px;}details.toggle[open] >summary.hideme{position:absolute;}details.toggle[open] >summary.hideme>span{display:none;}details.toggle[open] >summary::before{background:url('data:image/svg+xml,\ - ');}details.toggle[open] >summary::after{content:"Collapse";}details.toggle:not([open])>summary .docblock{max-height:calc(1.5em + 0.75em);overflow-y:hidden;}details.toggle:not([open])>summary .docblock>:first-child{max-width:100%;overflow:hidden;width:fit-content;white-space:nowrap;position:relative;padding-right:1em;}details.toggle:not([open])>summary .docblock>:first-child::after{content:"…";position:absolute;right:0;top:0;bottom:0;z-index:1;background-color:var(--main-background-color);font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;padding-left:0.2em;}details.toggle:not([open])>summary .docblock>div:first-child::after{padding-top:calc(1.5em + 0.75em - 1.2rem);}details.toggle>summary .docblock{margin-top:0.75em;}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}.src #sidebar-button>a::before,.sidebar-menu-toggle::before{content:var(--hamburger-image);opacity:0.75;filter:var(--mobile-sidebar-menu-filter);}.src #sidebar-button>a:hover{background:var(--main-background-color);}.sidebar-menu-toggle:hover::before,.sidebar-menu-toggle:active::before,.sidebar-menu-toggle:focus::before{opacity:1;}@media (max-width:850px){#search-tabs .count{display:block;}.side-by-side{flex-direction:column-reverse;}.side-by-side>div{width:auto;}.main-heading{grid-template-areas:"main-heading-breadcrumbs main-heading-toolbar" "main-heading-h1 main-heading-toolbar" "main-heading-sub-heading main-heading-toolbar";}.search-results-main-heading{display:grid;grid-template-areas:"main-heading-breadcrumbs main-heading-toolbar" "main-heading-breadcrumbs main-heading-toolbar" "main-heading-h1 main-heading-toolbar";}rustdoc-toolbar{margin-top:-10px;display:grid;grid-template-areas:"x settings help" "search summary summary";grid-template-rows:35px 1fr;}.search-results-main-heading rustdoc-toolbar{display:grid;grid-template-areas:"settings help" "search search";}.search-results-main-heading #toggle-all-docs{display:none;}rustdoc-toolbar .settings-menu span.label,rustdoc-toolbar .help-menu span.label{display:none;}rustdoc-toolbar .settings-menu{grid-area:settings;}rustdoc-toolbar .help-menu{grid-area:help;}rustdoc-toolbar .settings-menu{grid-area:settings;}rustdoc-toolbar #search-button{grid-area:search;}rustdoc-toolbar #toggle-all-docs{grid-area:summary;}rustdoc-toolbar .settings-menu,rustdoc-toolbar .help-menu{height:35px;}rustdoc-toolbar .settings-menu>a,rustdoc-toolbar .help-menu>a{border-radius:2px;text-align:center;width:34px;padding:5px 0;}rustdoc-toolbar .settings-menu>a:before,rustdoc-toolbar .help-menu>a:before{margin:0 4px;}#settings.popover{top:16px;--popover-arrow-offset:58px;}#help.popover{top:16px;--popover-arrow-offset:16px;}}@media (max-width:700px){:root{--impl-items-indent:0.7em;}*[id]{scroll-margin-top:45px;}#copy-path{width:0;visibility:hidden;}rustdoc-topbar span.label,html:not(.hide-sidebar) .rustdoc:not(.src) rustdoc-toolbar .settings-menu>a,html:not(.hide-sidebar) .rustdoc:not(.src) rustdoc-toolbar .help-menu>a{display:none;}rustdoc-topbar .settings-menu>a,rustdoc-topbar .help-menu>a{width:33px;line-height:0;}rustdoc-topbar .settings-menu>a:hover,rustdoc-topbar .help-menu>a:hover{border:none;background:var(--main-background-color);border-radius:0;}#settings.popover{top:32px;--popover-arrow-offset:48px;}#help.popover{top:32px;--popover-arrow-offset:12px;}.rustdoc{display:block;}html:not(.hide-sidebar) main{padding-left:15px;padding-top:0px;}.sidebar .logo-container,.sidebar .location,.sidebar-resizer{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;z-index:11;height:calc(100vh - 45px);border-right:none;width:100%;}.sidebar-elems .block li a{white-space:wrap;}.src main,.rustdoc.src .sidebar{top:0;padding:0;height:100vh;border:0;}html .src main{padding:18px 0;}.src .search-form{margin-left:40px;}.src .main-heading{margin-left:8px;}.hide-sidebar .search-form{margin-left:32px;}.hide-sidebar .src .search-form{margin-left:0;}.sidebar.shown,.src-sidebar-expanded .src .sidebar,.rustdoc:not(.src) .sidebar:focus-within{left:0;}rustdoc-topbar>h2{padding-bottom:0;margin:auto;overflow:hidden;font-size:24px;white-space:nowrap;text-overflow:ellipsis;text-align:center;}rustdoc-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}rustdoc-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;height:45px;width:100%;left:0;top:0;}.hide-sidebar rustdoc-topbar{display:none;}.sidebar-menu-toggle{width:41px;min-width:41px;border:none;line-height:0;}.hide-sidebar .sidebar-menu-toggle{display:none;}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#sidebar-button>a::before{content:url('data:image/svg+xml,\ - \ - \ - \ - \ - \ - \ - ');width:22px;height:22px;}.sidebar-menu-toggle:hover{background:var(--main-background-color);}.search-results>a,.search-results>a>div{display:block;}.search-results>a{padding:5px 0px;}.search-results>a>div.desc,.item-table dd{padding-left:2em;}.search-results .result-name{display:block;}.search-results .result-name .typename{width:initial;margin-right:0;}.search-results .result-name .typename,.search-results .result-name .path{display:inline;}.src-sidebar-expanded .src .sidebar{position:fixed;max-width:100vw;width:100vw;}.src .src-sidebar-title{padding-top:0;}details.implementors-toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>.methods>details.toggle>summary:not(.hideme)::before{left:-20px;}summary>.item-info{margin-left:10px;}.impl-items>.item-info{margin-left:calc(var(--impl-items-indent) + 10px);}.src nav.sub{margin:0 0 -25px 0;padding:var(--nav-sub-mobile-padding);}html:not(.src-sidebar-expanded) .src #sidebar-button>a{background-color:var(--main-background-color);}html:not(.src-sidebar-expanded) .src #sidebar-button>a:hover,html:not(.src-sidebar-expanded) .src #sidebar-button>a:focus-visible{background-color:var(--sidebar-background-color);}}@media (min-width:701px){.scraped-example-title{position:absolute;z-index:10;background:var(--main-background-color);bottom:8px;right:5px;padding:2px 4px;box-shadow:0 0 4px var(--main-background-color);}.item-table:not(.reexports){display:grid;grid-template-columns:33% 67%;}.item-table>dt,.item-table>dd{overflow-wrap:anywhere;}.item-table>dt{grid-column-start:1;}.item-table>dd{grid-column-start:2;}}@media print{:root{--docblock-indent:0;}nav.sidebar,nav.sub,.out-of-band,a.src,#copy-path,details.toggle[open] >summary::before,details.toggle>summary::before,details.toggle.top-doc>summary{display:none;}main{padding:10px;}}@media (max-width:464px){:root{--docblock-indent:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}}.variant,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.impl-items>.toggle>summary,.methods>section,.methods>.toggle>summary{margin-bottom:0.75em;}.variants>.docblock,.implementors-toggle>.docblock,.impl-items>.toggle[open]:not(:last-child),.methods>.toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .impl-items>.toggle:not(:last-child),#synthetic-implementations-list .impl-items>.toggle:not(:last-child),#blanket-implementations-list .impl-items>.toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;border:1px solid var(--scrape-example-help-border-color);border-radius:50px;color:var(--scrape-example-help-color);}.scraped-example-list .scrape-help:hover{border-color:var(--scrape-example-help-hover-border-color);color:var(--scrape-example-help-hover-color);}.scraped-example:not(.expanded) .example-wrap::before,.scraped-example:not(.expanded) .example-wrap::after{content:" ";width:100%;height:5px;position:absolute;z-index:1;}.scraped-example:not(.expanded) .example-wrap::before{top:0;background:linear-gradient(to bottom,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded) .example-wrap::after{bottom:0;background:linear-gradient(to top,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded){width:100%;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded){overflow-x:hidden;}.scraped-example .rust span.highlight{background:var(--scrape-example-code-line-highlight);}.scraped-example .rust span.highlight.focus{background:var(--scrape-example-code-line-highlight-focus);}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;cursor:pointer;}.more-scraped-examples{margin-left:25px;position:relative;}.toggle-line{position:absolute;top:5px;bottom:0;right:calc(100% + 10px);padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;background:var(--scrape-example-toggle-line-background);}.toggle-line:hover .toggle-line-inner{background:var(--scrape-example-toggle-line-hover-background);}.more-scraped-examples .scraped-example,.example-links{margin-top:20px;}.more-scraped-examples .scraped-example:first-child{margin-top:5px;}.example-links ul{margin-bottom:0;}:root[data-theme="light"],:root:not([data-theme]){--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--sidebar-border-color:#ddd;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--mobile-sidebar-menu-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--code-example-button-color:#7f7f7f;--code-example-button-hover-color:#595959;--settings-menu-filter:invert(50%);--settings-menu-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--attribute-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="dark"]{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--sidebar-border-color:#999;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--code-example-button-color:#7f7f7f;--code-example-button-hover-color:#a5a5a5;--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--attribute-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--settings-menu-filter:invert(50%);--settings-menu-hover-filter:invert(65%);--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="ayu"]{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--settings-input-border-color:#999;--settings-button-color:#fff;--settings-button-border-focus:#e0e0e0;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--sidebar-border-color:#5c6773;--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--code-example-button-color:#b2b2b2;--code-example-button-hover-color:#fff;--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--attribute-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--search-result-border-color:#aaa3;--search-color:#fff;--search-error-code-background-color:#4f4c4c;--search-results-alias-color:#c5c5c5;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:none;--search-tab-button-not-selected-background:transparent !important;--search-tab-button-selected-border-top-color:none;--search-tab-button-selected-background:#141920 !important;--settings-menu-filter:invert(70%);--settings-menu-hover-filter:invert(100%);--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);--target-background-color:rgba(255,236,164,0.06);--target-border-color:rgba(255,180,76,0.85);--kbd-color:#c5c5c5;--kbd-background:#314559;--kbd-box-shadow-color:#5c6773;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);--crate-search-div-hover-filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);--crate-search-hover-border:#e0e0e0;--src-sidebar-background-selected:#14191f;--src-sidebar-background-hover:#14191f;--table-alt-row-background-color:#191f26;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(15,20,25,1);--scrape-example-code-wrapper-background-end:rgba(15,20,25,0);--sidebar-resizer-hover:hsl(34,50%,33%);--sidebar-resizer-active:hsl(34,100%,66%);}:root[data-theme="ayu"] h1,:root[data-theme="ayu"] h2,:root[data-theme="ayu"] h3,:root[data-theme="ayu"] h4,:where(:root[data-theme="ayu"]) h1 a,:root[data-theme="ayu"] .sidebar h2 a,:root[data-theme="ayu"] .sidebar h3 a{color:#fff;}:root[data-theme="ayu"] .docblock code{color:#ffb454;}:root[data-theme="ayu"] .docblock a>code{color:#39AFD7 !important;}:root[data-theme="ayu"] .code-header,:root[data-theme="ayu"] .docblock pre>code,:root[data-theme="ayu"] pre,:root[data-theme="ayu"] pre>code,:root[data-theme="ayu"] .item-info code,:root[data-theme="ayu"] .rustdoc.source .example-wrap{color:#e6e1cf;}:root[data-theme="ayu"] .sidebar .current,:root[data-theme="ayu"] .sidebar .current a,:root[data-theme="ayu"] .sidebar a:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:hover,:root[data-theme="ayu"] details.dir-entry summary:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:focus,:root[data-theme="ayu"] details.dir-entry summary:focus,:root[data-theme="ayu"] #src-sidebar div.files>a.selected{color:#ffb44c;}:root[data-theme="ayu"] .sidebar-elems .location{color:#ff7733;}:root[data-theme="ayu"] a[data-nosnippet].line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}:root[data-theme="ayu"] .search-results a:hover,:root[data-theme="ayu"] .search-results a:focus{color:#fff !important;background-color:#3c3c3c;}:root[data-theme="ayu"] .search-results a{color:#0096cf;}:root[data-theme="ayu"] .search-results a div.desc{color:#c5c5c5;}:root[data-theme="ayu"] .result-name .primitive>i,:root[data-theme="ayu"] .result-name .keyword>i{color:#788797;}:root[data-theme="ayu"] #search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}:root[data-theme="ayu"] #search-tabs>button:not(.selected){border:none;background-color:transparent !important;}:root[data-theme="ayu"] #search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}:root[data-theme="ayu"] .settings-menu>a img,:root[data-theme="ayu"] #sidebar-button>a::before{filter:invert(100);} \ No newline at end of file diff --git a/core/target/doc/static.files/scrape-examples-2bbcccac.js b/core/target/doc/static.files/scrape-examples-2bbcccac.js deleted file mode 100644 index c90f297f..00000000 --- a/core/target/doc/static.files/scrape-examples-2bbcccac.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(function(){const DEFAULT_MAX_LINES=5;const HIDDEN_MAX_LINES=10;function scrollToLoc(elt,loc,isHidden){const lines=elt.querySelectorAll("[data-nosnippet]");let scrollOffset;const maxLines=isHidden?HIDDEN_MAX_LINES:DEFAULT_MAX_LINES;if(loc[1]-loc[0]>maxLines){const line=Math.max(0,loc[0]-1);scrollOffset=lines[line].offsetTop;}else{const halfHeight=elt.offsetHeight/2;const offsetTop=lines[loc[0]].offsetTop;const lastLine=lines[loc[1]];const offsetBot=lastLine.offsetTop+lastLine.offsetHeight;const offsetMid=(offsetTop+offsetBot)/2;scrollOffset=offsetMid-halfHeight;}nonnull(lines[0].parentElement).scrollTo(0,scrollOffset);nonnull(elt.querySelector(".rust")).scrollTo(0,scrollOffset);}function createScrapeButton(parent,className,content){const button=document.createElement("button");button.className=className;button.title=content;parent.insertBefore(button,parent.firstChild);return button;}window.updateScrapedExample=(example,buttonHolder)=>{let locIndex=0;const highlights=Array.prototype.slice.call(example.querySelectorAll(".highlight"));const link=nonnull(example.querySelector(".scraped-example-title a"));let expandButton=null;if(!example.classList.contains("expanded")){expandButton=createScrapeButton(buttonHolder,"expand","Show all");}const isHidden=nonnull(example.parentElement).classList.contains("more-scraped-examples");const locs=example.locs;if(locs.length>1){const next=createScrapeButton(buttonHolder,"next","Next usage");const prev=createScrapeButton(buttonHolder,"prev","Previous usage");const onChangeLoc=changeIndex=>{removeClass(highlights[locIndex],"focus");changeIndex();scrollToLoc(example,locs[locIndex][0],isHidden);addClass(highlights[locIndex],"focus");const url=locs[locIndex][1];const title=locs[locIndex][2];link.href=url;link.innerHTML=title;};prev.addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex-1+locs.length)%locs.length;});});next.addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex+1)%locs.length;});});}if(expandButton){expandButton.addEventListener("click",()=>{if(hasClass(example,"expanded")){removeClass(example,"expanded");removeClass(expandButton,"collapse");expandButton.title="Show all";scrollToLoc(example,locs[0][0],isHidden);}else{addClass(example,"expanded");addClass(expandButton,"collapse");expandButton.title="Show single example";}});}};function setupLoc(example,isHidden){const locs_str=nonnull(example.attributes.getNamedItem("data-locs")).textContent;const locs=JSON.parse(nonnull(nonnull(locs_str)));example.locs=locs;scrollToLoc(example,locs[0][0],isHidden);}const firstExamples=document.querySelectorAll(".scraped-example-list > .scraped-example");onEachLazy(firstExamples,el=>setupLoc(el,false));onEachLazy(document.querySelectorAll(".more-examples-toggle"),toggle=>{onEachLazy(toggle.querySelectorAll(".toggle-line, .hide-more"),button=>{button.addEventListener("click",()=>{toggle.open=false;});});const moreExamples=toggle.querySelectorAll(".scraped-example");toggle.querySelector("summary").addEventListener("click",()=>{setTimeout(()=>{onEachLazy(moreExamples,el=>setupLoc(el,true));});},{once:true});});})(); \ No newline at end of file diff --git a/core/target/doc/static.files/search-9e2438ea.js b/core/target/doc/static.files/search-9e2438ea.js deleted file mode 100644 index a49ae8a7..00000000 --- a/core/target/doc/static.files/search-9e2438ea.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict";const initSearch=async function(Stringdex,RoaringBitmap,hooks){if(!Array.prototype.toSpliced){Array.prototype.toSpliced=function(){const me=this.slice();Array.prototype.splice.apply(me,arguments);return me;};}async function onEachBtwnAsync(arr,func,funcBtwn){let skipped=true;for(const value of arr){if(!skipped){funcBtwn(value);}skipped=await func(value);}}const yieldToBrowser=typeof window!=="undefined"&&window.requestIdleCallback?function(){return new Promise((resolve,_reject)=>{window.requestIdleCallback(resolve);});}:function(){return new Promise((resolve,_reject)=>{setTimeout(resolve,0);});};const timeout=function(ms){return new Promise((resolve,_reject)=>{setTimeout(resolve,ms);});};if(!Promise.withResolvers){Promise.withResolvers=()=>{let resolve,reject;const promise=new Promise((res,rej)=>{resolve=res;reject=rej;});return{promise,resolve,reject};};}const itemTypes=Object.freeze({keyword:0,primitive:1,mod:2,externcrate:3,import:4,struct:5,enum:6,fn:7,type:8,static:9,trait:10,impl:11,tymethod:12,method:13,structfield:14,variant:15,macro:16,associatedtype:17,constant:18,associatedconstant:19,union:20,foreigntype:21,existential:22,attr:23,derive:24,traitalias:25,generic:26,attribute:27,});const itemTypesName=Array.from(Object.keys(itemTypes));const itemParents=new Map([[itemTypes.associatedconstant,itemTypes.constant],[itemTypes.method,itemTypes.fn],[itemTypes.tymethod,itemTypes.fn],[itemTypes.primitive,itemTypes.type],[itemTypes.associatedtype,itemTypes.type],[itemTypes.traitalias,itemTypes.trait],[itemTypes.attr,itemTypes.macro],[itemTypes.derive,itemTypes.macro],[itemTypes.externcrate,itemTypes.import],]);const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";const UNBOXING_LIMIT=5;const REGEX_IDENT=/\p{ID_Continue}+/uy;const REGEX_INVALID_TYPE_FILTER=/[^a-z]/ui;const MAX_RESULTS=200;const NO_TYPE_FILTER=-1;const editDistanceState={current:[],prev:[],prevPrev:[],calculate:function calculate(a,b,limit){if(a.lengthlimit){return limit+1;}while(b.length>0&&b[0]===a[0]){a=a.substring(1);b=b.substring(1);}while(b.length>0&&b[b.length-1]===a[a.length-1]){a=a.substring(0,a.length-1);b=b.substring(0,b.length-1);}if(b.length===0){return minDist;}const aLength=a.length;const bLength=b.length;for(let i=0;i<=bLength;++i){this.current[i]=0;this.prev[i]=i;this.prevPrev[i]=Number.MAX_VALUE;}for(let i=1;i<=aLength;++i){this.current[0]=i;const aIdx=i-1;for(let j=1;j<=bLength;++j){const bIdx=j-1;const substitutionCost=a[aIdx]===b[bIdx]?0:1;this.current[j]=Math.min(this.prev[j]+1,this.current[j-1]+1,this.prev[j-1]+substitutionCost,);if((i>1)&&(j>1)&&(a[aIdx]===b[bIdx-1])&&(a[aIdx-1]===b[bIdx])){this.current[j]=Math.min(this.current[j],this.prevPrev[j-2]+1,);}}const prevPrevTmp=this.prevPrev;this.prevPrev=this.prev;this.prev=this.current;this.current=prevPrevTmp;}const distance=this.prev[bLength];return distance<=limit?distance:(limit+1);},};function editDistance(a,b,limit){return editDistanceState.calculate(a,b,limit);}function isEndCharacter(c){return"=,>-])".indexOf(c)!==-1;}function isFnLikeTy(ty){return ty===itemTypes.fn||ty===itemTypes.method||ty===itemTypes.tymethod;}function isSeparatorCharacter(c){return c===","||c==="=";}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->";}function skipWhitespace(parserState){while(parserState.pos0){const c=parserState.userQuery[pos-1];if(c===lookingFor){return true;}else if(c!==" "){break;}pos-=1;}return false;}function isLastElemGeneric(elems,parserState){return(elems.length>0&&elems[elems.length-1].generics.length>0)||prevIs(parserState,">");}function getFilteredNextElem(query,parserState,elems,isInGenerics){const start=parserState.pos;if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){throw["Expected type filter before ",":"];}getNextElem(query,parserState,elems,isInGenerics);if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",];}if(elems.length===0){throw["Expected type filter before ",":"];}else if(query.literalSearch){throw["Cannot use quotes on type filter"];}const typeFilterElem=elems.pop();checkExtraTypeFilterCharacters(start,parserState);parserState.typeFilter=typeFilterElem.normalizedPathLast;parserState.pos+=1;parserState.totalElems-=1;query.literalSearch=false;getNextElem(query,parserState,elems,isInGenerics);}}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;let foundSeparator=false;const oldTypeFilter=parserState.typeFilter;parserState.typeFilter=null;const oldIsInBinding=parserState.isInBinding;parserState.isInBinding=null;let hofParameters=null;let extra="";if(endChar===">"){extra="<";}else if(endChar==="]"){extra="[";}else if(endChar===")"){extra="(";}else if(endChar===""){extra="->";}else{extra=endChar;}while(parserState.pos"," after ","="];}hofParameters=[...elems];elems.length=0;parserState.pos+=2;foundStopChar=true;foundSeparator=false;continue;}else if(c===" "){parserState.pos+=1;continue;}else if(isSeparatorCharacter(c)){parserState.pos+=1;foundStopChar=true;foundSeparator=true;continue;}else if(c===":"&&isPathStart(parserState)){throw["Unexpected ","::",": paths cannot start with ","::"];}else if(isEndCharacter(c)){throw["Unexpected ",c," after ",extra];}if(!foundStopChar){let extra=[];if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"];}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"];}if(endChar!==""){throw["Expected ",",",", ","=",", or ",endChar,...extra,", found ",c,];}throw["Expected ",","," or ","=",...extra,", found ",c,];}const posBefore=parserState.pos;getFilteredNextElem(query,parserState,elems,endChar!=="");if(endChar!==""&&parserState.pos>=parserState.length){throw["Unclosed ",extra];}if(posBefore===parserState.pos){parserState.pos+=1;}foundStopChar=false;}if(parserState.pos>=parserState.length&&endChar!==""){throw["Unclosed ",extra];}parserState.pos+=1;if(hofParameters){foundSeparator=false;if([...elems,...hofParameters].some(x=>x.bindingName)||parserState.isInBinding){throw["Unexpected ","="," within ","->"];}const hofElem=makePrimitiveElement("->",{generics:hofParameters,bindings:new Map([["output",[...elems]]]),typeFilter:null,});elems.length=0;elems[0]=hofElem;}parserState.typeFilter=oldTypeFilter;parserState.isInBinding=oldIsInBinding;return{foundSeparator};}function getNextElem(query,parserState,elems,isInGenerics){const generics=[];const handleRefOrPtr=(chr,name)=>{if(parserState.typeFilter!==null&&parserState.typeFilter!=="primitive"){throw["Invalid search type: primitive ",chr," and ",parserState.typeFilter," both specified",];}parserState.typeFilter=null;parserState.pos+=1;let c=parserState.userQuery[parserState.pos];while(c===" "&&parserState.pos"){generics[0].typeFilter=typeFilter;elems.push(generics[0]);}else{if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive ",name," and ",typeFilter," both specified",];}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1;}elems.push(makePrimitiveElement(name,{bindingName,generics}));}}else if(parserState.userQuery[parserState.pos]==="&"){handleRefOrPtr("&","reference");}else if(parserState.userQuery[parserState.pos]==="*"){handleRefOrPtr("*","pointer");}else{const isStringElem=parserState.userQuery[start]==="\"";if(isStringElem){start+=1;getStringElem(query,parserState,isInGenerics);end=parserState.pos-1;}else{end=getIdentEndPosition(parserState);}if(parserState.pos=end){throw["Found generics without a path"];}parserState.pos+=1;getItemsBefore(query,parserState,generics,">");}else if(parserState.pos=end){throw["Found generics without a path"];}if(parserState.isInBinding){throw["Unexpected ","("," after ","="];}parserState.pos+=1;const typeFilter=parserState.typeFilter;parserState.typeFilter=null;getItemsBefore(query,parserState,generics,")");skipWhitespace(parserState);if(isReturnArrow(parserState)){parserState.pos+=2;skipWhitespace(parserState);getFilteredNextElem(query,parserState,generics,isInGenerics);generics[generics.length-1].bindingName=makePrimitiveElement("output");}else{generics.push(makePrimitiveElement(null,{bindingName:makePrimitiveElement("output"),typeFilter:null,}));}parserState.typeFilter=typeFilter;}if(isStringElem){skipWhitespace(parserState);}if(start>=end&&generics.length===0){return;}if(parserState.userQuery[parserState.pos]==="="){if(parserState.isInBinding){throw["Cannot write ","="," twice in a binding"];}if(!isInGenerics){throw["Type parameter ","="," must be within generics list"];}const name=parserState.userQuery.slice(start,end).trim();if(name==="!"){throw["Type parameter ","="," key cannot be ","!"," never type"];}if(name.includes("!")){throw["Type parameter ","="," key cannot be ","!"," macro"];}if(name.includes("::")){throw["Type parameter ","="," key cannot contain ","::"," path"];}if(name.includes(":")){throw["Type parameter ","="," key cannot contain ",":"," type"];}parserState.isInBinding={name,generics};}else{elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics,),);}}}function checkExtraTypeFilterCharacters(start,parserState){const query=parserState.userQuery.slice(start,parserState.pos).trim();const match=query.match(REGEX_INVALID_TYPE_FILTER);if(match){throw["Unexpected ",match[0]," in type filter (before ",":",")",];}}function createQueryElement(query,parserState,name,generics,isInGenerics){const path=name.trim();if(path.length===0&&generics.length===0){throw["Unexpected ",parserState.userQuery[parserState.pos]];}if(query.literalSearch&&parserState.totalElems-parserState.genericsElems>0){throw["Cannot have more than one element if you use quotes"];}const typeFilter=parserState.typeFilter;parserState.typeFilter=null;if(name.trim()==="!"){if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive never type ","!"," and ",typeFilter," both specified",];}if(generics.length!==0){throw["Never type ","!"," does not accept generic parameters",];}const bindingName=parserState.isInBinding;parserState.isInBinding=null;return makePrimitiveElement("never",{bindingName});}const quadcolon=/::\s*::/.exec(path);if(path.startsWith("::")){throw["Paths cannot start with ","::"];}else if(quadcolon!==null){throw["Unexpected ",quadcolon[0]];}const pathSegments=path.split(/(?:::\s*)|(?:\s+(?:::\s*)?)/).map(x=>x.toLowerCase());if(pathSegments.length===0||(pathSegments.length===1&&pathSegments[0]==="")){if(generics.length>0||prevIs(parserState,">")){throw["Found generics without a path"];}else{throw["Unexpected ",parserState.userQuery[parserState.pos]];}}for(const[i,pathSegment]of pathSegments.entries()){if(pathSegment==="!"){if(i!==0){throw["Never type ","!"," is not associated item"];}pathSegments[i]="never";}}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1;}const bindingName=parserState.isInBinding;parserState.isInBinding=null;const bindings=new Map();const pathLast=pathSegments[pathSegments.length-1];return{name:name.trim(),id:null,fullPath:pathSegments,pathWithoutLast:pathSegments.slice(0,pathSegments.length-1),pathLast,normalizedPathLast:pathLast.replace(/_/g,""),generics:generics.filter(gen=>{if(gen.bindingName!==null&&gen.bindingName.name!==null){if(gen.name!==null){gen.bindingName.generics.unshift(gen);}bindings.set(gen.bindingName.name.toLowerCase().replace(/_/g,""),gen.bindingName.generics,);return false;}return true;}),bindings,typeFilter,bindingName,};}function makePrimitiveElement(name,extra){return Object.assign({name,id:null,fullPath:[name],pathWithoutLast:[],pathLast:name,normalizedPathLast:name,generics:[],bindings:new Map(),typeFilter:"primitive",bindingName:null,},extra);}function getStringElem(query,parserState,isInGenerics){if(isInGenerics){throw["Unexpected ","\""," in generics"];}else if(query.literalSearch){throw["Cannot have more than one literal search element"];}else if(parserState.totalElems-parserState.genericsElems>0){throw["Cannot use literal search when there is more than one element"];}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw["Unclosed ","\""];}else if(parserState.userQuery[end]!=="\""){throw["Unexpected ",parserState.userQuery[end]," in a string element"];}else if(start===end){throw["Cannot have empty string element"];}parserState.pos+=1;query.literalSearch=true;}function getIdentEndPosition(parserState){let afterIdent=consumeIdent(parserState);let end=parserState.pos;let macroExclamation=-1;while(parserState.pos0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]," (not a valid identifier)"];}else{throw["Unexpected ",c," (not a valid identifier)"];}parserState.pos+=1;afterIdent=consumeIdent(parserState);end=parserState.pos;}if(macroExclamation!==-1){if(parserState.typeFilter===null){parserState.typeFilter="macro";}else if(parserState.typeFilter!=="macro"){throw["Invalid search type: macro ","!"," and ",parserState.typeFilter," both specified",];}end=macroExclamation;}return end;}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1;}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::";}function consumeIdent(parserState){REGEX_IDENT.lastIndex=parserState.pos;const match=parserState.userQuery.match(REGEX_IDENT);if(match){parserState.pos+=match[0].length;return true;}return false;}function isPathSeparator(c){return c===":"||c===" ";}function removeIdxListAsc(a,idxList){if(idxList.length===0){return;}let removed=0;let i=idxList[0];let nextToRemove=idxList[0];while(i>1];this.offset+=1;this.elemCount+=1;return sign?-value:value;}next(){const c=this.string.charCodeAt(this.offset);if(c>=48&&c<64){this.offset+=1;return this.backrefQueue[c-48];}if(c===96){this.offset+=1;return this.cons(0);}const result=this.cons(this.decode());this.backrefQueue.unshift(result);if(this.backrefQueue.length>16){this.backrefQueue.pop();}return result;}}const EMPTY_STRING_ARRAY=[];const EMPTY_GENERICS_ARRAY=[];const EMPTY_BINDINGS_ARRAY=[];const EMPTY_BINDINGS_MAP=new Map();function itemTypeFromName(typename){if(typename===null){return NO_TYPE_FILTER;}const index=itemTypes[typename];if(index===undefined){throw["Unknown type filter ",typename];}return index;}class DocSearch{constructor(rootPath,database){this.rootPath=rootPath;this.database=database;this.utf8decoder=new TextDecoder();this.TYPES_POOL=new Map();}getTypeNameIds(){if(this.typeNameIds){return this.typeNameIds;}const nn=this.database.getData("normalizedName");if(!nn){return{typeNameIdOfOutput:-1,typeNameIdOfFnPtr:-1,typeNameIdOfFn:-1,typeNameIdOfFnMut:-1,typeNameIdOfFnOnce:-1,typeNameIdOfArray:-1,typeNameIdOfSlice:-1,typeNameIdOfArrayOrSlice:-1,typeNameIdOfTuple:-1,typeNameIdOfUnit:-1,typeNameIdOfTupleOrUnit:-1,typeNameIdOfReference:-1,typeNameIdOfPointer:-1,typeNameIdOfHof:-1,typeNameIdOfNever:-1,};}return this.getTypeNameIdsAsync(nn);}async getTypeNameIdsAsync(nn){const[output,fn,fnMut,fnOnce,hof,array,slice,arrayOrSlice,tuple,unit,tupleOrUnit,reference,pointer,never,]=await Promise.all([nn.search("output"),nn.search("fn"),nn.search("fnmut"),nn.search("fnonce"),nn.search("->"),nn.search("array"),nn.search("slice"),nn.search("[]"),nn.search("tuple"),nn.search("unit"),nn.search("()"),nn.search("reference"),nn.search("pointer"),nn.search("never"),]);const first=async(trie,ty,modulePath)=>{if(trie){for(const id of trie.matches().entries()){const pathData=await this.getPathData(id);if(pathData&&pathData.ty===ty&&pathData.modulePath===modulePath){return id;}}}return-1;};const typeNameIdOfOutput=await first(output,itemTypes.associatedtype,"");const typeNameIdOfFnPtr=await first(fn,itemTypes.primitive,"");const typeNameIdOfFn=await first(fn,itemTypes.trait,"core::ops");const typeNameIdOfFnMut=await first(fnMut,itemTypes.trait,"core::ops");const typeNameIdOfFnOnce=await first(fnOnce,itemTypes.trait,"core::ops");const typeNameIdOfArray=await first(array,itemTypes.primitive,"");const typeNameIdOfSlice=await first(slice,itemTypes.primitive,"");const typeNameIdOfArrayOrSlice=await first(arrayOrSlice,itemTypes.primitive,"");const typeNameIdOfTuple=await first(tuple,itemTypes.primitive,"");const typeNameIdOfUnit=await first(unit,itemTypes.primitive,"");const typeNameIdOfTupleOrUnit=await first(tupleOrUnit,itemTypes.primitive,"");const typeNameIdOfReference=await first(reference,itemTypes.primitive,"");const typeNameIdOfPointer=await first(pointer,itemTypes.primitive,"");const typeNameIdOfHof=await first(hof,itemTypes.primitive,"");const typeNameIdOfNever=await first(never,itemTypes.primitive,"");this.typeNameIds={typeNameIdOfOutput,typeNameIdOfFnPtr,typeNameIdOfFn,typeNameIdOfFnMut,typeNameIdOfFnOnce,typeNameIdOfArray,typeNameIdOfSlice,typeNameIdOfArrayOrSlice,typeNameIdOfTuple,typeNameIdOfUnit,typeNameIdOfTupleOrUnit,typeNameIdOfReference,typeNameIdOfPointer,typeNameIdOfHof,typeNameIdOfNever,};return this.typeNameIds;}static parseQuery(userQuery){function newParsedQuery(userQuery){return{userQuery,elems:[],returned:[],foundElems:0,totalElems:0,literalSearch:false,hasReturnArrow:false,error:null,correction:null,proposeCorrectionFrom:null,proposeCorrectionTo:null,typeFingerprint:new Uint32Array(4),};}function parseInput(query,parserState){let foundStopChar=true;while(parserState.pos"){if(isReturnArrow(parserState)){query.hasReturnArrow=true;break;}throw["Unexpected ",c," (did you mean ","->","?)"];}else if(parserState.pos>0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]];}throw["Unexpected ",c];}else if(c===" "){skipWhitespace(parserState);continue;}if(!foundStopChar){let extra=EMPTY_STRING_ARRAY;if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"];}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"];}if(parserState.typeFilter!==null){throw["Expected ",","," or ","->",...extra,", found ",c,];}throw["Expected ",",",", ",":"," or ","->",...extra,", found ",c,];}const before=query.elems.length;getFilteredNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1;}foundStopChar=false;}if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",];}while(parserState.pos{const ty=itemTypeFromName(elem.typeFilter);if(ty===itemTypes.generic&&elem.generics.length!==0){throw["Generic type parameter ",elem.name," does not accept generic parameters",];}for(const generic of elem.generics){checkTypeFilter(generic);}for(const constraints of elem.bindings.values()){for(const constraint of constraints){checkTypeFilter(constraint);}}};for(const elem of query.elems){checkTypeFilter(elem);}for(const elem of query.returned){checkTypeFilter(elem);}}catch(err){query=newParsedQuery(userQuery);if(Array.isArray(err)&&err.every(elem=>typeof elem==="string")){query.error=err;}else{throw err;}return query;}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1;}query.foundElems=query.elems.length+query.returned.length;query.totalElems=parserState.totalElems;return query;}async getName(id){const ni=this.database.getData("name");if(!ni){return null;}const name=await ni.at(id);return name===undefined||name===null?null:this.utf8decoder.decode(name);}async getDesc(id){const di=this.database.getData("desc");if(!di){return null;}const desc=await di.at(id);return desc===undefined||desc===null?null:this.utf8decoder.decode(desc);}async getAliasTarget(id){const ai=this.database.getData("alias");if(!ai){return null;}const bytes=await ai.at(id);if(bytes===undefined||bytes===null||bytes.length===0){return null;}else{const encoded=this.utf8decoder.decode(bytes);const decoded=JSON.parse(encoded);return decoded;}}async getEntryData(id){const ei=this.database.getData("entry");if(!ei){return null;}const encoded=this.utf8decoder.decode(await ei.at(id));if(encoded===""||encoded===undefined||encoded===null){return null;}const raw=JSON.parse(encoded);return{krate:raw[0],ty:raw[1],modulePath:raw[2]===0?null:raw[2]-1,exactModulePath:raw[3]===0?null:raw[3]-1,parent:raw[4]===0?null:raw[4]-1,traitParent:raw[5]===0?null:raw[5]-1,deprecated:raw[6]===1?true:false,associatedItemDisambiguator:raw.length===7?null:raw[7],};}async getPathData(id){const pi=this.database.getData("path");if(!pi){return null;}const encoded=this.utf8decoder.decode(await pi.at(id));if(encoded===""||encoded===undefined||encoded===null){return null;}const raw=JSON.parse(encoded);return{ty:raw[0],modulePath:raw[1],exactModulePath:raw[2]===0||raw[2]===undefined?raw[1]:raw[2],};}async getFunctionData(id){const fi=this.database.getData("function");if(!fi){return null;}const encoded=this.utf8decoder.decode(await fi.at(id));if(encoded===""||encoded===undefined||encoded===null){return null;}const raw=JSON.parse(encoded);const parser=new VlqHexDecoder(raw[0],async functionSearchType=>{if(typeof functionSearchType==="number"){return null;}const INPUTS_DATA=0;const OUTPUT_DATA=1;let inputs_;let output_;if(typeof functionSearchType[INPUTS_DATA]==="number"){inputs_=Promise.all([this.buildItemSearchType(functionSearchType[INPUTS_DATA]),]);}else{inputs_=this.buildItemSearchTypeAll(functionSearchType[INPUTS_DATA]);}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){output_=Promise.all([this.buildItemSearchType(functionSearchType[OUTPUT_DATA]),]);}else{output_=this.buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA]);}}else{output_=Promise.resolve(EMPTY_GENERICS_ARRAY);}const where_clause_=[];const l=functionSearchType.length;for(let i=2;i{const[name,path]=entry!==null&&entry[field]!==null?await Promise.all([this.getName(entry[field]),this.getPathData(entry[field])]):[null,null];if(name!==null&&path!==null){return{name,path};}return null;};const[moduleName,modulePathData,exactModuleName,exactModulePathData,parent,traitParent,crateOrNull,]=await Promise.all([entry&&entry.modulePath!==null?this.getName(entry.modulePath):null,entry&&entry.modulePath!==null?this.getPathData(entry.modulePath):null,entry&&entry.exactModulePath!==null?this.getName(entry.exactModulePath):null,entry&&entry.exactModulePath!==null?this.getPathData(entry.exactModulePath):null,buildParentLike("parent"),buildParentLike("traitParent"),entry?this.getName(entry.krate):"",]);const crate=crateOrNull===null?"":crateOrNull;const name=name_===null?"":name_;const normalizedName=(name.indexOf("_")===-1?name:name.replace(/_/g,"")).toLowerCase();const modulePath=modulePathData===null||moduleName===null?"":(modulePathData.modulePath===""?moduleName:`${modulePathData.modulePath}::${moduleName}`);return{id,crate,ty:entry?entry.ty:nonnull(path).ty,name,normalizedName,modulePath,exactModulePath:exactModulePathData===null||exactModuleName===null?modulePath:(exactModulePathData.exactModulePath===""?exactModuleName:`${exactModulePathData.exactModulePath}::${exactModuleName}`),entry,path,functionData,deprecated:entry?entry.deprecated:false,parent,traitParent,};}async buildItemSearchTypeAll(types){return types&&types.length>0?await Promise.all(types.map(type=>this.buildItemSearchType(type))):EMPTY_GENERICS_ARRAY;}async buildItemSearchType(type){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;const BINDINGS_DATA=2;let id,generics;let bindings;if(typeof type==="number"){id=type;generics=EMPTY_GENERICS_ARRAY;bindings=EMPTY_BINDINGS_MAP;}else{id=type[PATH_INDEX_DATA];generics=await this.buildItemSearchTypeAll(type[GENERICS_DATA]);if(type[BINDINGS_DATA]&&type[BINDINGS_DATA].length>0){bindings=new Map((await Promise.all(type[BINDINGS_DATA].map(async binding=>{const[assocType,constraints]=binding;const[k,v]=await Promise.all([this.buildItemSearchType(assocType).then(t=>t.id),this.buildItemSearchTypeAll(constraints),]);return k===null?EMPTY_BINDINGS_ARRAY:[[k,v]];},))).flat());}else{bindings=EMPTY_BINDINGS_MAP;}}let result;if(id<0){result={id,name:"",ty:itemTypes.generic,path:null,exactPath:null,generics,bindings,unboxFlag:true,};}else if(id===0){result={id:null,name:"",ty:itemTypes.generic,path:null,exactPath:null,generics,bindings,unboxFlag:true,};}else{const[name,path,type]=await Promise.all([this.getName(id-1),this.getPathData(id-1),this.getTypeData(id-1),]);if(path===undefined||path===null||type===undefined||type===null){return{id:null,name:"",ty:itemTypes.generic,path:null,exactPath:null,generics,bindings,unboxFlag:true,};}result={id:id-1,name,ty:path.ty,path:path.modulePath,exactPath:path.exactModulePath===null?path.modulePath:path.exactModulePath,generics,bindings,unboxFlag:type.searchUnbox,};}const cr=this.TYPES_POOL.get(result.id);if(cr){if(cr.generics.length===result.generics.length&&cr.generics!==result.generics&&cr.generics.every((x,i)=>result.generics[i]===x)){result.generics=cr.generics;}if(cr.bindings.size===result.bindings.size&&cr.bindings!==result.bindings){let ok=true;for(const[k,v]of cr.bindings.entries()){const v2=result.bindings.get(k);if(!v2){ok=false;break;}if(v!==v2&&v.length===v2.length&&v.every((x,i)=>v2[i]===x)){result.bindings.set(k,v);}else if(v!==v2){ok=false;break;}}if(ok){result.bindings=cr.bindings;}}if(cr.ty===result.ty&&cr.path===result.path&&cr.bindings===result.bindings&&cr.generics===result.generics&&cr.ty===result.ty&&cr.name===result.name&&cr.unboxFlag===result.unboxFlag){return cr;}}this.TYPES_POOL.set(result.id,result);return result;}async execQuery(parsedQuery,filterCrates,currentCrate){const queryLen=parsedQuery.elems.reduce((acc,next)=>acc+next.pathLast.length,0)+parsedQuery.returned.reduce((acc,next)=>acc+next.pathLast.length,0);const maxEditDistance=Math.floor(queryLen/3);const buildHrefAndPath=item=>{let displayPath;let href;let traitPath=null;const type=itemTypesName[item.ty];const name=item.name;let path=item.modulePath;let exactPath=item.exactModulePath;if(type==="mod"){displayPath=path+"::";href=this.rootPath+path.replace(/::/g,"/")+"/"+name+"/index.html";}else if(type==="import"){displayPath=item.modulePath+"::";href=this.rootPath+item.modulePath.replace(/::/g,"/")+"/index.html#reexport."+name;}else if(type==="primitive"||type==="keyword"||type==="attribute"){displayPath="";exactPath="";href=this.rootPath+path.replace(/::/g,"/")+"/"+type+"."+name+".html";}else if(type==="externcrate"){displayPath="";href=this.rootPath+name+"/index.html";}else if(item.parent){const myparent=item.parent;let anchor=type+"."+name;const parentType=itemTypesName[myparent.path.ty];let pageType=parentType;let pageName=myparent.name;exactPath=`${myparent.path.exactModulePath}::${myparent.name}`;if(parentType==="primitive"){displayPath=myparent.name+"::";exactPath=myparent.name;}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.modulePath.lastIndexOf("::");const enumName=item.modulePath.substr(enumNameIdx+2);path=item.modulePath.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName;}else{displayPath=path+"::"+myparent.name+"::";}if(item.entry&&item.entry.associatedItemDisambiguator!==null){anchor=item.entry.associatedItemDisambiguator+"/"+anchor;}href=this.rootPath+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html#"+anchor;}else{displayPath=item.modulePath+"::";href=this.rootPath+item.modulePath.replace(/::/g,"/")+"/"+type+"."+name+".html";}if(item.traitParent){const tparent=item.traitParent;traitPath=`${tparent.path.exactModulePath}::${tparent.name}::${name}`;}return[displayPath,href,`${exactPath}::${name}`,traitPath];};function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6);}return tmp;}const formatDisplayTypeSignature=async(obj,typeInfo,elems,returned)=>{const typeNameIds=await this.getTypeNameIds();const objType=obj.type;if(!objType){return{type:[],mappedNames:new Map(),whereClause:new Map()};}let fnInputs=null;let fnOutput=null;let mgens=null;if(typeInfo!=="elems"&&typeInfo!=="returned"){fnInputs=unifyFunctionTypes(objType.inputs,elems,objType.where_clause,null,mgensScratch=>{fnOutput=unifyFunctionTypes(objType.output,returned,objType.where_clause,mgensScratch,mgensOut=>{mgens=mgensOut;return true;},0,typeNameIds,);return!!fnOutput;},0,typeNameIds,);}else{const highlighted=unifyFunctionTypes(typeInfo==="elems"?objType.inputs:objType.output,typeInfo==="elems"?elems:returned,objType.where_clause,null,mgensOut=>{mgens=mgensOut;return true;},0,typeNameIds,);if(typeInfo==="elems"){fnInputs=highlighted;}else{fnOutput=highlighted;}}if(!fnInputs){fnInputs=objType.inputs;}if(!fnOutput){fnOutput=objType.output;}const mappedNames=new Map();const whereClause=new Map();const fnParamNames=obj.paramNames||[];const queryParamNames=[];const remapQuery=queryElem=>{if(queryElem.id!==null&&queryElem.id<0){queryParamNames[-1-queryElem.id]=queryElem.name;}if(queryElem.generics.length>0){queryElem.generics.forEach(remapQuery);}if(queryElem.bindings.size>0){[...queryElem.bindings.values()].flat().forEach(remapQuery);}};elems.forEach(remapQuery);returned.forEach(remapQuery);const pushText=(fnType,result)=>{if(!!(result.length%2)===!!fnType.highlighted){result.push("");}else if(result.length===0&&!!fnType.highlighted){result.push("");result.push("");}result[result.length-1]+=fnType.name;};const writeHof=async(fnType,result)=>{const hofOutput=fnType.bindings.get(typeNameIds.typeNameIdOfOutput)||[];const hofInputs=fnType.generics;pushText(fnType,result);pushText({name:" (",highlighted:false},result);let needsComma=false;for(const fnType of hofInputs){if(needsComma){pushText({name:", ",highlighted:false},result);}needsComma=true;await writeFn(fnType,result);}pushText({name:hofOutput.length===0?")":") -> ",highlighted:false,},result);if(hofOutput.length>1){pushText({name:"(",highlighted:false},result);}needsComma=false;for(const fnType of hofOutput){if(needsComma){pushText({name:", ",highlighted:false},result);}needsComma=true;await writeFn(fnType,result);}if(hofOutput.length>1){pushText({name:")",highlighted:false},result);}};const writeSpecialPrimitive=async(fnType,result)=>{if(fnType.id===typeNameIds.typeNameIdOfArray||fnType.id===typeNameIds.typeNameIdOfSlice||fnType.id===typeNameIds.typeNameIdOfTuple||fnType.id===typeNameIds.typeNameIdOfUnit){const[ob,sb]=fnType.id===typeNameIds.typeNameIdOfArray||fnType.id===typeNameIds.typeNameIdOfSlice?["[","]"]:["(",")"];pushText({name:ob,highlighted:fnType.highlighted},result);await onEachBtwnAsync(fnType.generics,nested=>writeFn(nested,result),()=>pushText({name:", ",highlighted:false},result),);pushText({name:sb,highlighted:fnType.highlighted},result);return true;}else if(fnType.id===typeNameIds.typeNameIdOfReference){pushText({name:"&",highlighted:fnType.highlighted},result);let prevHighlighted=false;await onEachBtwnAsync(fnType.generics,async value=>{prevHighlighted=!!value.highlighted;await writeFn(value,result);},value=>pushText({name:" ",highlighted:prevHighlighted&&value.highlighted,},result),);return true;}else if(fnType.id===typeNameIds.typeNameIdOfPointer){pushText({name:"*",highlighted:fnType.highlighted},result);if(fnType.generics.length<2){pushText({name:"const ",highlighted:fnType.highlighted},result);}let prevHighlighted=false;await onEachBtwnAsync(fnType.generics,async value=>{prevHighlighted=!!value.highlighted;await writeFn(value,result);},value=>pushText({name:" ",highlighted:prevHighlighted&&value.highlighted,},result),);return true;}else if(fnType.id===typeNameIds.typeNameIdOfFn||fnType.id===typeNameIds.typeNameIdOfFnMut||fnType.id===typeNameIds.typeNameIdOfFnOnce||fnType.id===typeNameIds.typeNameIdOfFnPtr){await writeHof(fnType,result);return true;}else if(fnType.id===typeNameIds.typeNameIdOfNever){pushText({name:"!",highlighted:fnType.highlighted},result);return true;}return false;};const writeFn=async(fnType,result)=>{if(fnType.id!==null&&fnType.id<0){if(fnParamNames[-1-fnType.id]===""){const generics=fnType.generics.length>0?fnType.generics:objType.where_clause[-1-fnType.id];for(const nested of generics){await writeFn(nested,result);}return;}else if(mgens){for(const[queryId,fnId]of mgens){if(fnId===fnType.id){mappedNames.set(queryParamNames[-1-queryId],fnParamNames[-1-fnType.id],);}}}pushText({name:fnParamNames[-1-fnType.id],highlighted:!!fnType.highlighted,},result);const where=[];await onEachBtwnAsync(fnType.generics,nested=>writeFn(nested,where),()=>pushText({name:" + ",highlighted:false},where),);if(where.length>0){whereClause.set(fnParamNames[-1-fnType.id],where);}}else{if(fnType.ty===itemTypes.primitive){if(await writeSpecialPrimitive(fnType,result)){return;}}else if(fnType.ty===itemTypes.trait&&(fnType.id===typeNameIds.typeNameIdOfFn||fnType.id===typeNameIds.typeNameIdOfFnMut||fnType.id===typeNameIds.typeNameIdOfFnOnce||fnType.id===typeNameIds.typeNameIdOfFnPtr)){await writeHof(fnType,result);return;}else if(fnType.name===""&&fnType.bindings.size===0&&fnType.generics.length!==0){pushText({name:"impl ",highlighted:false},result);if(fnType.generics.length>1){pushText({name:"(",highlighted:false},result);}await onEachBtwnAsync(fnType.generics,value=>writeFn(value,result),()=>pushText({name:", ",highlighted:false},result),);if(fnType.generics.length>1){pushText({name:")",highlighted:false},result);}return;}pushText(fnType,result);let hasBindings=false;if(fnType.bindings.size>0){await onEachBtwnAsync(await Promise.all([...fnType.bindings.entries()].map(async([key,values])=>[await this.getName(key),values],)),async([name,values])=>{if(values.length===1&&values[0].id<0&&`${fnType.name}::${name}`===fnParamNames[-1-values[0].id]){for(const value of values){await writeFn(value,[]);}return true;}if(!hasBindings){hasBindings=true;pushText({name:"<",highlighted:false},result);}pushText({name,highlighted:false},result);pushText({name:values.length!==1?"=(":"=",highlighted:false,},result);await onEachBtwnAsync(values||[],value=>writeFn(value,result),()=>pushText({name:" + ",highlighted:false},result),);if(values.length!==1){pushText({name:")",highlighted:false},result);}},()=>pushText({name:", ",highlighted:false},result),);}if(fnType.generics.length>0){pushText({name:hasBindings?", ":"<",highlighted:false},result);}await onEachBtwnAsync(fnType.generics,value=>writeFn(value,result),()=>pushText({name:", ",highlighted:false},result),);if(hasBindings||fnType.generics.length>0){pushText({name:">",highlighted:false},result);}}};const type=[];await onEachBtwnAsync(fnInputs,fnType=>writeFn(fnType,type),()=>pushText({name:", ",highlighted:false},type),);pushText({name:" -> ",highlighted:false},type);await onEachBtwnAsync(fnOutput,fnType=>writeFn(fnType,type),()=>pushText({name:", ",highlighted:false},type),);return{type,mappedNames,whereClause};};const transformResults=(results,typeInfo,duplicates)=>{const out=[];const traitImplIdxMap=new Map();for(const result of results){const item=result.item;if(item.id!==-1){const res=buildHrefAndPath(item);const obj=Object.assign({parent:item.parent?{path:item.parent.path.modulePath,exactPath:item.parent.path.exactModulePath||item.parent.path.modulePath,name:item.parent.name,ty:item.parent.path.ty,}:undefined,type:item.functionData&&item.functionData.functionSignature?item.functionData.functionSignature:undefined,paramNames:item.functionData&&item.functionData.paramNames?item.functionData.paramNames:undefined,dist:result.dist,path_dist:result.path_dist,index:result.index,desc:this.getDesc(result.id),item,displayPath:pathSplitter(res[0]),fullPath:"",traitPath:null,href:"",displayTypeSignature:null,},result);let ty=obj.item.ty;if(ty===itemTypes.tymethod){ty=itemTypes.method;}obj.fullPath=res[2]+"|"+ty;if(res[3]){obj.traitPath=res[3]+"|"+obj.item.ty;}if(duplicates.has(obj.fullPath)){continue;}if(obj.traitPath&&duplicates.has(obj.traitPath)){continue;}if(obj.item.ty===itemTypes.import&&duplicates.has(res[2])){continue;}if(duplicates.has(res[2]+"|"+itemTypes.import)){continue;}duplicates.add(obj.fullPath);duplicates.add(res[2]);if(typeInfo!==null){obj.displayTypeSignature=formatDisplayTypeSignature(obj,typeInfo,result.elems,result.returned,);}obj.href=res[1];if(obj.traitPath){let list=traitImplIdxMap.get(obj.traitPath);if(list===undefined){list=[];}list.push(out.length);traitImplIdxMap.set(obj.traitPath,list);}else{const toRemoveList=traitImplIdxMap.get(obj.fullPath);if(toRemoveList){removeIdxListAsc(out,toRemoveList);}traitImplIdxMap.delete(obj.fullPath);}out.push(obj);if(out.length>=MAX_RESULTS){break;}}}return out;};const sortAndTransformResults=async function*(results,typeInfo,preferredCrate,duplicates){const userQuery=parsedQuery.userQuery;const normalizedUserQuery=parsedQuery.userQuery.toLowerCase();const isMixedCase=normalizedUserQuery!==userQuery;const result_list=[];for(const result of results.values()){if(!result){continue;}const item=result.item;if(filterCrates!==null&&item.crate!==filterCrates){continue;}if(item){result_list.push(result);}else{continue;}}result_list.sort((aaa,bbb)=>{const aai=aaa.item;const bbi=bbb.item;let a;let b;if(typeInfo===null){if(isMixedCase){a=Number(aai.name!==userQuery);b=Number(bbi.name!==userQuery);if(a!==b){return a-b;}}a=Number(aai.normalizedName!==normalizedUserQuery);b=Number(bbi.normalizedName!==normalizedUserQuery);if(a!==b){return a-b;}a=Number(aaa.index<0);b=Number(bbb.index<0);if(a!==b){return a-b;}}a=Number(aaa.path_dist);b=Number(bbb.path_dist);if(a!==b){return a-b;}a=Number(aaa.index);b=Number(bbb.index);if(a!==b){return a-b;}a=Number(aaa.dist);b=Number(bbb.dist);if(a!==b){return a-b;}a=Number(aaa.is_alias);b=Number(bbb.is_alias);if(a!==b){return a-b;}a=Number(aai.deprecated);b=Number(bbi.deprecated);if(a!==b){return a-b;}a=Number(aai.crate!==preferredCrate);b=Number(bbi.crate!==preferredCrate);if(a!==b){return a-b;}a=Number(aai.normalizedName.length);b=Number(bbi.normalizedName.length);if(a!==b){return a-b;}let aw=aai.normalizedName;let bw=bbi.normalizedName;if(aw!==bw){return(aw>bw?+1:-1);}const di=this.database.getData("desc");if(di){a=Number(di.isEmpty(aaa.id));b=Number(di.isEmpty(bbb.id));if(a!==b){return a-b;}}a=Number(aai.ty);b=Number(bbi.ty);if(a!==b){return a-b;}const ap=aai.modulePath;const bp=bbi.modulePath;aw=ap===undefined?"":ap;bw=bp===undefined?"":bp;if(aw!==bw){return(aw>bw?+1:-1);}return 0;});const transformed_result_list=transformResults(result_list,typeInfo,duplicates);yield*transformed_result_list;return transformed_result_list.length;}.bind(this);function unifyFunctionTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb,unboxingDepth,typeNameIds,){if(unboxingDepth>=UNBOXING_LIMIT){return null;}const mgens=mgensIn===null?null:new Map(mgensIn);if(queryElems.length===0){return solutionCb(mgens)?fnTypesIn:null;}if(!fnTypesIn||fnTypesIn.length===0){return null;}const ql=queryElems.length;const fl=fnTypesIn.length;if(ql===1&&queryElems[0].generics.length===0&&queryElems[0].bindings.size===0){const queryElem=queryElems[0];for(const[i,fnType]of fnTypesIn.entries()){if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens,typeNameIds,)){continue;}if(fnType.id!==null&&fnType.id<0&&queryElem.id!==null&&queryElem.id<0){if(mgens&&mgens.has(queryElem.id)&&mgens.get(queryElem.id)!==fnType.id){continue;}const mgensScratch=new Map(mgens);mgensScratch.set(queryElem.id,fnType.id);if(!solutionCb||solutionCb(mgensScratch)){const highlighted=[...fnTypesIn];highlighted[i]=Object.assign({highlighted:true,},fnType,{generics:whereClause[-1-fnType.id],});return highlighted;}}else if(solutionCb(mgens?new Map(mgens):null)){const highlighted=[...fnTypesIn];highlighted[i]=Object.assign({highlighted:true,},fnType,{generics:unifyGenericTypes(fnType.generics,queryElem.generics,whereClause,mgens?new Map(mgens):null,solutionCb,unboxingDepth,typeNameIds,)||fnType.generics,});return highlighted;}}for(const[i,fnType]of fnTypesIn.entries()){if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,typeNameIds,)){continue;}if(fnType.id!==null&&fnType.id<0){const highlightedGenerics=unifyFunctionTypes(whereClause[(-fnType.id)-1],queryElems,whereClause,mgens,solutionCb,unboxingDepth+1,typeNameIds,);if(highlightedGenerics){const highlighted=[...fnTypesIn];highlighted[i]=Object.assign({highlighted:true,},fnType,{generics:highlightedGenerics,});return highlighted;}}else{const highlightedGenerics=unifyFunctionTypes([...Array.from(fnType.bindings.values()).flat(),...fnType.generics],queryElems,whereClause,mgens?new Map(mgens):null,solutionCb,unboxingDepth+1,typeNameIds,);if(highlightedGenerics){const highlighted=[...fnTypesIn];highlighted[i]=Object.assign({},fnType,{generics:highlightedGenerics,bindings:new Map([...fnType.bindings.entries()].map(([k,v])=>{return[k,highlightedGenerics.splice(0,v.length)];})),});return highlighted;}}}return null;}const fnTypes=fnTypesIn.slice();const flast=fl-1;const qlast=ql-1;const queryElem=queryElems[qlast];let queryElemsTmp=null;for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens,typeNameIds,)){continue;}let mgensScratch;if(fnType.id!==null&&queryElem.id!==null&&fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(queryElem.id)&&mgensScratch.get(queryElem.id)!==fnType.id){continue;}mgensScratch.set(queryElem.id,fnType.id);}else{mgensScratch=mgens;}fnTypes[i]=fnTypes[flast];fnTypes.length=flast;if(!queryElemsTmp){queryElemsTmp=queryElems.slice(0,qlast);}let unifiedGenerics=[];let unifiedGenericsMgens=null;const passesUnification=unifyFunctionTypes(fnTypes,queryElemsTmp,whereClause,mgensScratch,mgensScratch=>{if(fnType.generics.length===0&&queryElem.generics.length===0&&fnType.bindings.size===0&&queryElem.bindings.size===0){return solutionCb(mgensScratch);}const solution=unifyFunctionTypeCheckBindings(fnType,queryElem,whereClause,mgensScratch,unboxingDepth,typeNameIds,);if(!solution){return false;}const simplifiedGenerics=solution.simplifiedGenerics;for(const simplifiedMgens of solution.mgens){unifiedGenerics=unifyGenericTypes(simplifiedGenerics,queryElem.generics,whereClause,simplifiedMgens,solutionCb,unboxingDepth,typeNameIds,);if(unifiedGenerics!==null){unifiedGenericsMgens=simplifiedMgens;return true;}}return false;},unboxingDepth,typeNameIds,);if(passesUnification){passesUnification.length=fl;passesUnification[flast]=passesUnification[i];passesUnification[i]=Object.assign({},fnType,{highlighted:true,generics:unifiedGenerics,bindings:new Map([...fnType.bindings.entries()].map(([k,v])=>{return[k,queryElem.bindings.has(k)?unifyFunctionTypes(v,queryElem.bindings.get(k),whereClause,unifiedGenericsMgens,solutionCb,unboxingDepth,typeNameIds,):unifiedGenerics.splice(0,v.length)];})),});return passesUnification;}fnTypes[flast]=fnTypes[i];fnTypes[i]=fnType;fnTypes.length=fl;}for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,typeNameIds,)){continue;}const generics=fnType.id!==null&&fnType.id<0?whereClause[(-fnType.id)-1]:fnType.generics;const bindings=fnType.bindings?Array.from(fnType.bindings.values()).flat():[];const passesUnification=unifyFunctionTypes(fnTypes.toSpliced(i,1,...bindings,...generics),queryElems,whereClause,mgens,solutionCb,unboxingDepth+1,typeNameIds,);if(passesUnification){const highlightedGenerics=passesUnification.slice(i,i+generics.length+bindings.length,);const highlightedFnType=Object.assign({},fnType,{generics:highlightedGenerics,bindings:new Map([...fnType.bindings.entries()].map(([k,v])=>{return[k,highlightedGenerics.splice(0,v.length)];})),});return passesUnification.toSpliced(i,generics.length+bindings.length,highlightedFnType,);}}return null;}function unifyGenericTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb,unboxingDepth,typeNameIds,){if(unboxingDepth>=UNBOXING_LIMIT){return null;}const mgens=mgensIn===null?null:new Map(mgensIn);if(queryElems.length===0){return solutionCb(mgens)?fnTypesIn:null;}if(!fnTypesIn||fnTypesIn.length===0){return null;}const fnType=fnTypesIn[0];const queryElem=queryElems[0];if(unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens,typeNameIds,)){if(fnType.id!==null&&fnType.id<0&&queryElem.id!==null&&queryElem.id<0){if(!mgens||!mgens.has(queryElem.id)||mgens.get(queryElem.id)===fnType.id){const mgensScratch=new Map(mgens);mgensScratch.set(queryElem.id,fnType.id);const fnTypesRemaining=unifyGenericTypes(fnTypesIn.slice(1),queryElems.slice(1),whereClause,mgensScratch,solutionCb,unboxingDepth,typeNameIds,);if(fnTypesRemaining){const highlighted=[fnType,...fnTypesRemaining];highlighted[0]=Object.assign({highlighted:true,},fnType,{generics:whereClause[-1-fnType.id],});return highlighted;}}}else{let unifiedGenerics;const fnTypesRemaining=unifyGenericTypes(fnTypesIn.slice(1),queryElems.slice(1),whereClause,mgens,mgensScratch=>{const solution=unifyFunctionTypeCheckBindings(fnType,queryElem,whereClause,mgensScratch,unboxingDepth,typeNameIds,);if(!solution){return false;}const simplifiedGenerics=solution.simplifiedGenerics;for(const simplifiedMgens of solution.mgens){unifiedGenerics=unifyGenericTypes(simplifiedGenerics,queryElem.generics,whereClause,simplifiedMgens,solutionCb,unboxingDepth,typeNameIds,);if(unifiedGenerics!==null){return true;}}},unboxingDepth,typeNameIds,);if(fnTypesRemaining){const highlighted=[fnType,...fnTypesRemaining];highlighted[0]=Object.assign({highlighted:true,},fnType,{generics:unifiedGenerics||fnType.generics,});return highlighted;}}}if(unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,typeNameIds,)){let highlightedRemaining;if(fnType.id!==null&&fnType.id<0){const highlightedGenerics=unifyFunctionTypes(whereClause[(-fnType.id)-1],[queryElem],whereClause,mgens,mgensScratch=>{const hl=unifyGenericTypes(fnTypesIn.slice(1),queryElems.slice(1),whereClause,mgensScratch,solutionCb,unboxingDepth,typeNameIds,);if(hl){highlightedRemaining=hl;}return hl;},unboxingDepth+1,typeNameIds,);if(highlightedGenerics){return[Object.assign({highlighted:true,},fnType,{generics:highlightedGenerics,}),...highlightedRemaining];}}else{const highlightedGenerics=unifyGenericTypes([...Array.from(fnType.bindings.values()).flat(),...fnType.generics,],[queryElem],whereClause,mgens,mgensScratch=>{const hl=unifyGenericTypes(fnTypesIn.slice(1),queryElems.slice(1),whereClause,mgensScratch,solutionCb,unboxingDepth,typeNameIds,);if(hl){highlightedRemaining=hl;}return hl;},unboxingDepth+1,typeNameIds,);if(highlightedGenerics){return[Object.assign({},fnType,{generics:highlightedGenerics,bindings:new Map([...fnType.bindings.entries()].map(([k,v])=>{return[k,highlightedGenerics.splice(0,v.length)];})),}),...highlightedRemaining];}}}return null;}const unifyFunctionTypeIsMatchCandidate=(fnType,queryElem,mgensIn,typeNameIds)=>{if(!typePassesFilter(queryElem.typeFilter,fnType.ty)){return false;}if(fnType.id!==null&&fnType.id<0&&queryElem.id!==null&&queryElem.id<0){if(mgensIn&&mgensIn.has(queryElem.id)&&mgensIn.get(queryElem.id)!==fnType.id){return false;}return true;}else{if(queryElem.id===typeNameIds.typeNameIdOfArrayOrSlice&&(fnType.id===typeNameIds.typeNameIdOfSlice||fnType.id===typeNameIds.typeNameIdOfArray)){}else if(queryElem.id===typeNameIds.typeNameIdOfTupleOrUnit&&(fnType.id===typeNameIds.typeNameIdOfTuple||fnType.id===typeNameIds.typeNameIdOfUnit)){}else if(queryElem.id===typeNameIds.typeNameIdOfHof&&(fnType.id===typeNameIds.typeNameIdOfFn||fnType.id===typeNameIds.typeNameIdOfFnMut||fnType.id===typeNameIds.typeNameIdOfFnOnce||fnType.id===typeNameIds.typeNameIdOfFnPtr)){}else if(fnType.id!==queryElem.id||queryElem.id===null){return false;}if((fnType.generics.length+fnType.bindings.size)===0&&queryElem.generics.length!==0){return false;}if(fnType.bindings.size0){const fnTypePath=fnType.path!==undefined&&fnType.path!==null?fnType.path.split("::"):[];if(queryElemPathLength>fnTypePath.length){return false;}let i=0;for(const path of fnTypePath){if(path===queryElem.pathWithoutLast[i]){i+=1;if(i>=queryElemPathLength){break;}}}if(i0){let mgensSolutionSet=[mgensIn];for(const[name,constraints]of queryElem.bindings.entries()){if(mgensSolutionSet.length===0){return false;}if(!fnType.bindings.has(name)){return false;}const fnTypeBindings=fnType.bindings.get(name);mgensSolutionSet=mgensSolutionSet.flatMap(mgens=>{const newSolutions=[];unifyFunctionTypes(fnTypeBindings,constraints,whereClause,mgens,newMgens=>{newSolutions.push(newMgens);return false;},unboxingDepth,typeNameIds,);return newSolutions;});}if(mgensSolutionSet.length===0){return false;}const binds=Array.from(fnType.bindings.entries()).flatMap(entry=>{const[name,constraints]=entry;if(queryElem.bindings.has(name)){return[];}else{return constraints;}});if(simplifiedGenerics.length>0){simplifiedGenerics=[...binds,...simplifiedGenerics];}else{simplifiedGenerics=binds;}return{simplifiedGenerics,mgens:mgensSolutionSet};}return{simplifiedGenerics,mgens:[mgensIn]};}function unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth,typeNameIds,){if(unboxingDepth>=UNBOXING_LIMIT){return false;}if(fnType.id!==null&&fnType.id<0){if(!whereClause){return false;}return checkIfInList(whereClause[(-fnType.id)-1],queryElem,whereClause,mgens,unboxingDepth,typeNameIds,);}else if(fnType.unboxFlag&&(fnType.generics.length>0||fnType.bindings.size>0)){const simplifiedGenerics=[...fnType.generics,...Array.from(fnType.bindings.values()).flat(),];return checkIfInList(simplifiedGenerics,queryElem,whereClause,mgens,unboxingDepth,typeNameIds,);}return false;}function containsTypeFromQuery(elems,list,where_clause,typeNameIds){if(!list)return false;for(const ty of elems){if(ty.id!==null&&ty.id<0){continue;}if(checkIfInList(list,ty,where_clause,null,0,typeNameIds)){return true;}}return false;}function checkIfInList(list,elem,whereClause,mgens,unboxingDepth,typeNameIds){for(const entry of list){if(checkType(entry,elem,whereClause,mgens,unboxingDepth,typeNameIds)){return true;}}return false;}const checkType=(row,elem,whereClause,mgens,unboxingDepth,typeNameIds)=>{if(unboxingDepth>=UNBOXING_LIMIT){return false;}if(row.id!==null&&elem.id!==null&&row.id>0&&elem.id>0&&elem.pathWithoutLast.length===0&&row.generics.length===0&&elem.generics.length===0&&row.bindings.size===0&&elem.bindings.size===0&&elem.id!==typeNameIds.typeNameIdOfArrayOrSlice&&elem.id!==typeNameIds.typeNameIdOfHof&&elem.id!==typeNameIds.typeNameIdOfTupleOrUnit){return row.id===elem.id&&typePassesFilter(elem.typeFilter,row.ty);}else{return unifyFunctionTypes([row],[elem],whereClause,mgens,()=>true,unboxingDepth,typeNameIds,);}};const checkTypeMgensForConflict=mgens=>{if(!mgens){return true;}const fnTypes=new Set();for(const[_qid,fid]of mgens){if(fnTypes.has(fid)){return false;}fnTypes.add(fid);}return true;};function checkPath(contains,path){if(contains.length===0){return 0;}const maxPathEditDistance=parsedQuery.literalSearch?0:Math.floor(contains.reduce((acc,next)=>acc+next.length,0)/3,);let ret_dist=maxPathEditDistance+1;const length=path.length;const clength=contains.length;pathiter:for(let i=length-clength;i>=0;i-=1){let dist_total=0;for(let x=0;xmaxPathEditDistance){continue pathiter;}dist_total+=dist;}}ret_dist=Math.min(ret_dist,Math.round(dist_total/clength));}return ret_dist>maxPathEditDistance?null:ret_dist;}function checkRowPath(contains,row){if(contains.length===0){return 0;}const path=row.modulePath.split("::");if(row.parent&&row.parent.name){path.push(row.parent.name.toLowerCase());}return checkPath(contains,path);}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;return filter===itemParents.get(type);}const innerRunNameQuery=async function*(currentCrate){const index=this.database.getData("normalizedName");if(!index){return;}const idDuplicates=new Set();const pathDuplicates=new Set();let count=0;const prefixResults=[];const normalizedUserQuery=parsedQuery.userQuery.replace(/[_"]/g,"").toLowerCase();const handleAlias=async(name,alias,dist,index)=>{const item=nonnull(await this.getRow(alias,false));const path_dist=name.includes(" ")||parsedQuery.elems.length===0?0:checkRowPath(parsedQuery.elems[0].pathWithoutLast,item);if(path_dist===null){return null;}return{id:alias,dist,path_dist,index,alias:name,is_alias:true,elems:[],returned:[],item,};};const flush=async function*(data){const satr=sortAndTransformResults(await Promise.all(data),null,currentCrate,pathDuplicates,);data.length=0;for await(const processed of satr){yield processed;count+=1;if((count&0x7F)===0){await yieldToBrowser();}if(count>=MAX_RESULTS){return true;}}return false;};const aliasResults=await index.search(normalizedUserQuery);if(aliasResults){for(const id of aliasResults.matches().entries()){const[name,alias]=await Promise.all([this.getName(id),this.getAliasTarget(id),]);if(name!==null&&alias!==null&&!idDuplicates.has(id)&&name.replace(/[_"]/g,"").toLowerCase()===normalizedUserQuery){prefixResults.push(handleAlias(name,alias,0,0));idDuplicates.add(id);}}}if(parsedQuery.error!==null||parsedQuery.elems.length===0){yield*flush(prefixResults);return;}const elem=parsedQuery.elems[0];const typeFilter=itemTypeFromName(elem.typeFilter);const handleNameSearch=async id=>{const row=await this.getRow(id,false);if(!row||!row.entry){return null;}if(!typePassesFilter(typeFilter,row.ty)||(filterCrates!==null&&row.crate!==filterCrates)){return null;}let pathDist=0;if(elem.fullPath.length>1){pathDist=checkRowPath(elem.pathWithoutLast,row);if(pathDist===null){return null;}}if(parsedQuery.literalSearch){return row.name.toLowerCase()===elem.pathLast?{id,dist:0,path_dist:0,index:0,elems:[],returned:[],is_alias:false,item:row,}:null;}else{return{id,dist:editDistance(row.normalizedName,elem.normalizedPathLast,maxEditDistance,),path_dist:pathDist,index:row.normalizedName.indexOf(elem.normalizedPathLast),elems:[],returned:[],is_alias:false,item:row,};}};if(elem.normalizedPathLast===""){const l=index.length;for(let id=0;id{let i=0;const l=idx.length;while(i{if(!elem){return empty_postings_list;}const typeFilter=itemTypeFromName(elem.typeFilter);const[searchResults,upla,uplb]=await Promise.all([index.search(elem.normalizedPathLast),unpackPostingsListAll(elem.generics,polarity),unpackPostingsListBindings(elem.bindings,polarity),]);const typePromises=[];if(typeFilter!==itemTypes.generic&&searchResults){for(const id of searchResults.matches().entries()){typePromises.push(Promise.all([this.getName(id),this.getTypeData(id),this.getPathData(id),]).then(([name,typeData,pathData])=>[id,name,typeData,pathData]));}}const types=(await Promise.all(typePromises)).filter(([_id,name,ty,path])=>name!==null&&name.toLowerCase()===elem.pathLast&&ty&&!ty[polarity].every(bitmap=>{return bitmap.isEmpty();})&&path&&path.ty!==itemTypes.associatedtype&&(elem.pathWithoutLast.length===0||checkPath(elem.pathWithoutLast,path.modulePath.split("::"),)===0),);if(types.length===0){const areGenericsAllowed=typeFilter===itemTypes.generic||(typeFilter===-1&&(parsedQuery.totalElems>1||parsedQuery.hasReturnArrow)&&elem.pathWithoutLast.length===0&&elem.generics.length===0&&elem.bindings.size===0);if(typeFilter!==itemTypes.generic&&(elem.name.length>=3||!areGenericsAllowed)){let chosenName=null;let chosenType=[];let chosenPath=[];let chosenId=[];let chosenDist=Number.MAX_SAFE_INTEGER;const levResults=index.searchLev(elem.normalizedPathLast);for await(const searchResults of levResults){for(const id of searchResults.matches().entries()){const[name,ty,path]=await Promise.all([this.getName(id),this.getTypeData(id),this.getPathData(id),]);if(name!==null&&ty!==null&&path!==null&&!ty[polarity].every(bitmap=>{return bitmap.isEmpty();})&&path.ty!==itemTypes.associatedtype){let dist=editDistance(name,elem.pathLast,maxEditDistance,);if(elem.pathWithoutLast.length!==0){const pathDist=checkPath(elem.pathWithoutLast,path.modulePath.split("::"),);dist+=pathDist===null?Number.MAX_SAFE_INTEGER:pathDist;}if(name===chosenName){chosenId.push(id);chosenType.push(ty);chosenPath.push(path);}else if(dist{const p1=!pathData1?"":pathData1.modulePath;const p2=!pathData2?"":pathData2.modulePath;const n1=name1===null?"":name1;const n2=name2===null?"":name2;if(p1.length!==p2.length){return p1.length>p2.length?+1:-1;}if(n1.length!==n2.length){return n1.length>n2.length?+1:-1;}if(n1!==n2){return n1>n2?+1:-1;}if(p1!==p2){return p1>p2?+1:-1;}return 0;});const results=[];for(const[id,_name,typeData]of types){if(!typeData||typeData[polarity].every(bitmap=>{return bitmap.isEmpty();})){continue;}for(const{invertedIndex:genericsIdx,queryElem:generics}of upla){for(const{invertedIndex:bindingsIdx,queryElem:bindings}of uplb){results.push({invertedIndex:intersectInvertedIndexes(typeData[polarity],genericsIdx,bindingsIdx,),queryElem:{name:elem.name,id,typeFilter,generics,bindings,fullPath:elem.fullPath,pathLast:elem.pathLast,normalizedPathLast:elem.normalizedPathLast,pathWithoutLast:elem.pathWithoutLast,},});if((results.length&0x7F)===0){await yieldToBrowser();}}}}return results;};const unpackPostingsListAll=async(elems,polarity)=>{if(!elems||elems.length===0){return nested_everything_postings_list;}const[firstPostingsList,remainingAll]=await Promise.all([unpackPostingsList(elems[0],polarity),unpackPostingsListAll(elems.slice(1),polarity),]);const results=[];for(const{invertedIndex:firstIdx,queryElem:firstElem,}of firstPostingsList){for(const{invertedIndex:remainingIdx,queryElem:remainingElems,}of remainingAll){results.push({invertedIndex:intersectInvertedIndexes(firstIdx,remainingIdx),queryElem:[firstElem,...remainingElems],});if((results.length&0x7F)===0){await yieldToBrowser();}}}return results;};const unpackPostingsListBindings=async(elems,polarity)=>{if(!elems){return[{invertedIndex:everything_inverted_index,queryElem:new Map(),}];}const firstKey=elems.keys().next().value;if(firstKey===undefined){return[{invertedIndex:everything_inverted_index,queryElem:new Map(),}];}const firstList=elems.get(firstKey);if(firstList===undefined){return[{invertedIndex:everything_inverted_index,queryElem:new Map(),}];}elems.delete(firstKey);const[firstKeyIds,firstPostingsList,remainingAll]=await Promise.all([index.search(firstKey),unpackPostingsListAll(firstList,polarity),unpackPostingsListBindings(elems,polarity),]);if(!firstKeyIds){elems.set(firstKey,firstList);return[{invertedIndex:empty_inverted_index,queryElem:new Map(),}];}const results=[];for(const keyId of firstKeyIds.matches().entries()){for(const{invertedIndex:firstIdx,queryElem:firstElem,}of firstPostingsList){for(const{invertedIndex:remainingIdx,queryElem:remainingElems,}of remainingAll){const elems=new Map(remainingElems);elems.set(keyId,firstElem);results.push({invertedIndex:intersectInvertedIndexes(firstIdx,remainingIdx),queryElem:elems,});if((results.length&0x7F)===0){await yieldToBrowser();}}}}elems.set(firstKey,firstList);if(results.length===0){return[{invertedIndex:empty_inverted_index,queryElem:new Map(),}];}return results;};const[allInputs,allOutput,typeNameIds]=await Promise.all([unpackPostingsListAll(inputs,"invertedFunctionInputsIndex"),unpackPostingsListAll(output,"invertedFunctionOutputIndex"),this.getTypeNameIds(),]);let checkCounter=0;const queryPlan=[];for(const{invertedIndex:inputsIdx,queryElem:inputs}of allInputs){for(const{invertedIndex:outputIdx,queryElem:output}of allOutput){const invertedIndex=intersectInvertedIndexes(inputsIdx,outputIdx);for(const[size,bitmap]of invertedIndex.entries()){checkCounter+=1;if((checkCounter&0x7F)===0){await yieldToBrowser();}if(!queryPlan[size]){queryPlan[size]=[];}queryPlan[size].push({bitmap,inputs,output,});}}}const resultPromises=[];const dedup=new Set();let resultCounter=0;const isReturnTypeQuery=inputs.length===0;const pushToBottom=[];plan:for(const queryStep of queryPlan){for(const{bitmap,inputs,output}of queryStep){for(const id of bitmap.entries()){checkCounter+=1;if((checkCounter&0x7F)===0){await yieldToBrowser();}resultPromises.push(this.getFunctionData(id).then(async fnData=>{if(!fnData||!fnData.functionSignature){return null;}checkCounter+=1;if((checkCounter&0x7F)===0){await yieldToBrowser();}const functionSignature=fnData.functionSignature;if(!unifyFunctionTypes(functionSignature.inputs,inputs,functionSignature.where_clause,null,mgens=>{return!!unifyFunctionTypes(functionSignature.output,output,functionSignature.where_clause,mgens,checkTypeMgensForConflict,0,typeNameIds,);},0,typeNameIds,)){return null;}const item=await this.getRow(id,true);if(!item){return null;}const result={id,dist:fnData.elemCount,path_dist:0,index:-1,elems:inputs,returned:output,is_alias:false,item,};const entry=item.entry;if((entry&&!isFnLikeTy(entry.ty))||(isReturnTypeQuery&&functionSignature&&containsTypeFromQuery(output,functionSignature.inputs,functionSignature.where_clause,typeNameIds,))){pushToBottom.push(result);return null;}return result;}));}}for await(const result of sortAndTransformResults(await Promise.all(resultPromises),typeInfo,currentCrate,dedup,)){if(resultCounter>=MAX_RESULTS){break plan;}yield result;resultCounter+=1;}resultPromises.length=0;}if(resultCounter>=MAX_RESULTS){return;}for await(const result of sortAndTransformResults(await Promise.all(pushToBottom),typeInfo,currentCrate,dedup,)){if(resultCounter>=MAX_RESULTS){break;}yield result;resultCounter+=1;}}.bind(this);if(parsedQuery.foundElems===1&&!parsedQuery.hasReturnArrow){const{promise:donePromise,resolve:doneResolve,reject:doneReject,}=Promise.withResolvers();const doneTimeout=timeout(250);return{"in_args":(async function*(){await Promise.race([donePromise,doneTimeout]);yield*innerRunTypeQuery(parsedQuery.elems,[],"elems",currentCrate);})(),"returned":(async function*(){await Promise.race([donePromise,doneTimeout]);yield*innerRunTypeQuery([],parsedQuery.elems,"returned",currentCrate);})(),"others":(async function*(){try{yield*innerRunNameQuery(currentCrate);doneResolve(null);}catch(e){doneReject(e);throw e;}})(),"query":parsedQuery,};}else if(parsedQuery.error!==null){return{"in_args":(async function*(){})(),"returned":(async function*(){})(),"others":innerRunNameQuery(currentCrate),"query":parsedQuery,};}else{const typeInfo=parsedQuery.elems.length===0?"returned":(parsedQuery.returned.length===0?"elems":"sig");return{"in_args":(async function*(){})(),"returned":(async function*(){})(),"others":parsedQuery.foundElems===0?(async function*(){})():innerRunTypeQuery(parsedQuery.elems,parsedQuery.returned,typeInfo,currentCrate,),"query":parsedQuery,};}}}let docSearch;const longItemTypes=["keyword","primitive type","module","extern crate","re-export","struct","enum","function","type alias","static","trait","","trait method","method","struct field","enum variant","macro","assoc type","constant","assoc const","union","foreign type","existential type","attribute macro","derive macro","trait alias","","attribute",];let currentResults;function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("search-tabs").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true;onEachLazy(document.querySelectorAll(".search-form",),form=>{if(hasClass(elem.firstElementChild,"loading")){addClass(form,"loading");}else{removeClass(form,"loading");}});}else{removeClass(elem,"selected");}iter+=1;});const isTypeSearch=(nb>0||iter===1);iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true;}else{removeClass(elem,"active");}iter+=1;});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb;const correctionsElem=document.getElementsByClassName("search-corrections");if(isTypeSearch){removeClass(correctionsElem[0],"hidden");}else{addClass(correctionsElem[0],"hidden");}}else if(nb!==0){printTab(0);}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates);}return getNakedUrl()+extra+window.location.hash;}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"){return elem.value;}return null;}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;window.searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult();}function focusSearchResult(){const target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#search-tabs button").item(searchState.currentTab);searchState.focusedByTab[searchState.currentTab]=null;if(target&&target instanceof HTMLElement){target.focus();}}async function addTab(results,query,display,finishedCallback,isTypeSearch){const extraClass=display?" active":"";let output=document.createElement("ul");output.className="search-results "+extraClass;let count=0;const descList=[];const addNextResultToOutput=async obj=>{count+=1;const name=obj.item.name;const type=itemTypesName[obj.item.ty];const longType=longItemTypes[obj.item.ty];const typeName=longType.length!==0?`${longType}`:"?";const link=document.createElement("a");link.className="result-"+type;link.href=obj.href;const resultName=document.createElement("span");resultName.className="result-name";resultName.insertAdjacentHTML("beforeend",`${typeName}`);link.appendChild(resultName);let alias=" ";if(obj.alias!==undefined){alias=`
\ -${obj.alias} - see \ -
`;}resultName.insertAdjacentHTML("beforeend",`
${alias}\ -${obj.displayPath}${name}\ -
`);const description=document.createElement("div");description.className="desc";obj.desc.then(desc=>{if(desc!==null){description.insertAdjacentHTML("beforeend",desc);}});descList.push(obj.desc);if(obj.displayTypeSignature){const{type,mappedNames,whereClause}=await obj.displayTypeSignature;const displayType=document.createElement("div");type.forEach((value,index)=>{if(index%2!==0){const highlight=document.createElement("strong");highlight.appendChild(document.createTextNode(value));displayType.appendChild(highlight);}else{displayType.appendChild(document.createTextNode(value));}});if(mappedNames.size>0||whereClause.size>0){let addWhereLineFn=()=>{const line=document.createElement("div");line.className="where";line.appendChild(document.createTextNode("where"));displayType.appendChild(line);addWhereLineFn=()=>{};};for(const[qname,name]of mappedNames){if(name===qname){continue;}addWhereLineFn();const line=document.createElement("div");line.className="where";line.appendChild(document.createTextNode(` ${qname} matches `));const lineStrong=document.createElement("strong");lineStrong.appendChild(document.createTextNode(name));line.appendChild(lineStrong);displayType.appendChild(line);}for(const[name,innerType]of whereClause){if(innerType.length<=1){continue;}addWhereLineFn();const line=document.createElement("div");line.className="where";line.appendChild(document.createTextNode(` ${name}: `));innerType.forEach((value,index)=>{if(index%2!==0){const highlight=document.createElement("strong");highlight.appendChild(document.createTextNode(value));line.appendChild(highlight);}else{line.appendChild(document.createTextNode(value));}});displayType.appendChild(line);}}displayType.className="type-signature";link.appendChild(displayType);}link.appendChild(description);output.appendChild(link);results.next().then(async nextResult=>{if(nextResult.value){addNextResultToOutput(nextResult.value);}else{await Promise.all(descList);yieldToBrowser().then(()=>{finishedCallback(count,output);});}});};const firstResult=await results.next();let correctionOutput="";if(query.correction!==null&&isTypeSearch){const orig=query.returned.length>0?query.returned[0].name:query.elems[0].name;correctionOutput="

"+`Type "${orig}" not found. `+"Showing results for closest type name "+`"${query.correction}" instead.

`;}if(query.proposeCorrectionFrom!==null&&isTypeSearch){const orig=query.proposeCorrectionFrom;const targ=query.proposeCorrectionTo;let message=`Type "${orig}" not found and used as generic parameter.`;if(targ!==null){message+=` Consider searching for "${targ}" instead.`;}correctionOutput=`

${message}

`;}if(firstResult.value){if(correctionOutput!==""){const h3=document.createElement("h3");h3.innerHTML=correctionOutput;output.appendChild(h3);}await addNextResultToOutput(firstResult.value);}else{output=document.createElement("div");if(correctionOutput!==""){const h3=document.createElement("h3");h3.innerHTML=correctionOutput;output.appendChild(h3);}output.className="search-failed"+extraClass;const dlroChannel=`https://doc.rust-lang.org/${getVar("channel")}`;if(query.userQuery!==""){output.innerHTML+="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:";}output.innerHTML+="Example searches:";yieldToBrowser().then(()=>finishedCallback(0,output));}return output;}function makeTab(tabNb,text,results,query,isTypeSearch,goToFirst){const isCurrentTab=window.searchState.currentTab===tabNb;const tabButton=document.createElement("button");tabButton.appendChild(document.createTextNode(text));tabButton.className=isCurrentTab?"selected":"";const tabCount=document.createElement("span");tabCount.className="count loading";tabCount.innerHTML="\u{2007}(\u{2007})\u{2007}\u{2007}";tabButton.appendChild(tabCount);return[tabButton,addTab(results,query,isCurrentTab,(count,output)=>{const search=window.searchState.outputElement();const error=query.error;if(count===0&&error!==null&&search){error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value.replaceAll(" ", " ")}`;}else{error[index]=value;}});const errorReport=document.createElement("h3");errorReport.className="error";errorReport.innerHTML=`Query parser error: "${error.join("")}".`;search.insertBefore(errorReport,search.firstElementChild);}else if(goToFirst||(count===1&&getSettingValue("go-to-only-result")==="true")){window.onunload=()=>{};window.searchState.removeQueryParameters();const a=output.querySelector("a");if(a){a.click();return;}}const fmtNbElems=count<10?`\u{2007}(${count})\u{2007}\u{2007}`:count<100?`\u{2007}(${count})\u{2007}`:`\u{2007}(${count})`;tabCount.innerHTML=fmtNbElems;tabCount.className="count";printTab(window.searchState.currentTab);},isTypeSearch),];}async function showResults(docSearch,results,goToFirst,filterCrates){const search=window.searchState.outputElement();if(!search){return;}let crates="";const crateNames=await docSearch.getCrateNameList();if(crateNames.length>1){crates=" in 
"+"
";}nonnull(document.querySelector(".search-switcher")).innerHTML=`Search results${crates}`;const tabs=[];searchState.currentTab=0;if(results.query.error!==null){tabs.push(makeTab(0,"In Names",results.others,results.query,false,goToFirst));}else if(results.query.foundElems<=1&&results.query.returned.length===0&&!results.query.hasReturnArrow){tabs.push(makeTab(0,"In Names",results.others,results.query,false,goToFirst));tabs.push(makeTab(1,"In Parameters",results.in_args,results.query,true,false));tabs.push(makeTab(2,"In Return Types",results.returned,results.query,true,false));}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";tabs.push(makeTab(0,signatureTabTitle,results.others,results.query,true,goToFirst));}const tabsElem=document.createElement("div");tabsElem.id="search-tabs";const resultsElem=document.createElement("div");resultsElem.id="results";search.innerHTML="";for(const[tabNb,[tab,output]]of tabs.entries()){tabsElem.appendChild(tab);const isCurrentTab=window.searchState.currentTab===tabNb;const placeholder=document.createElement("div");placeholder.className=isCurrentTab?"search-results active":"search-results";placeholder.innerHTML="Loading...";output.then(output=>{if(placeholder.parentElement){placeholder.parentElement.replaceChild(output,placeholder);}});resultsElem.appendChild(placeholder);}if(window.searchState.rustdocToolbar){nonnull(nonnull(window.searchState.containerElement()).querySelector(".main-heading"),).appendChild(window.searchState.rustdocToolbar);}const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate);}search.appendChild(tabsElem);search.appendChild(resultsElem);window.searchState.showResults();window.searchState.focusedByTab=[null,null,null];let i=0;for(const elem of tabsElem.childNodes){const j=i;elem.onclick=()=>printTab(j);window.searchState.focusedByTab[i]=null;i+=1;}printTab(0);}function updateSearchHistory(url){const btn=document.querySelector("#search-button a");if(btn instanceof HTMLAnchorElement){btn.href=url;}if(!browserSupportsHistoryApi()){return;}const params=searchState.getQueryStringParams();if(!history.state&¶ms.search===undefined){history.pushState(null,"",url);}else{history.replaceState(null,"",url);}}async function search(forced){const query=DocSearch.parseQuery(nonnull(window.searchState.inputElement()).value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch();}return;}currentResults=query.userQuery;searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"];}if(filterCrates!==null&&(await docSearch.getCrateNameList()).indexOf(filterCrates)===-1){filterCrates=null;}searchState.title="\""+query.userQuery+"\" Search - Rust";updateSearchHistory(buildUrl(query.userQuery,filterCrates));await showResults(docSearch,await docSearch.execQuery(query,filterCrates,window.currentCrate),params.go_to_first,filterCrates);}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search();}function putBackSearch(){const search_input=window.searchState.inputElement();if(!search_input){return;}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()));}document.title=searchState.title;}}function registerSearchEvents(){const params=searchState.getQueryStringParams();const inputElement=nonnull(window.searchState.inputElement());if(inputElement.value===""){inputElement.value=params.search||"";}const searchAfter500ms=()=>{searchState.clearInputTimeout();window.searchState.timeout=setTimeout(search,500);};inputElement.onkeyup=searchAfter500ms;inputElement.oninput=searchAfter500ms;if(inputElement.form){inputElement.form.onsubmit=onSearchSubmit;}inputElement.onchange=e=>{if(e.target!==document.activeElement){return;}searchState.clearInputTimeout();setTimeout(search,0);};inputElement.onpaste=inputElement.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(!(e instanceof KeyboardEvent)){return;}if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return;}if(e.which===38){const active=document.activeElement;if(active){const previous=active.previousElementSibling;if(previous){previous.focus();}else{searchState.focus();}}e.preventDefault();}else if(e.which===40){const active=document.activeElement;if(active){const next=active.nextElementSibling;if(next){next.focus();}const rect=active.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault();}});inputElement.addEventListener("focus",()=>{putBackSearch();});}function updateCrate(ev){if(ev.target.value==="all crates"){const query=nonnull(window.searchState.inputElement()).value.trim();updateSearchHistory(buildUrl(query,null));}currentResults=null;search(true);}const makeUint8ArrayFromBase64=Uint8Array.fromBase64?Uint8Array.fromBase64:(string=>{const bytes_as_string=atob(string);const l=bytes_as_string.length;const bytes=new Uint8Array(l);for(let i=0;i{for(const key in callbacks){if(Object.hasOwn(callbacks,key)){window[key]=callbacks[key];}}databaseCallbacks=callbacks;if(window.searchIndex){window.rr_(window.searchIndex);}},loadTreeByHash:hashHex=>{const script=document.createElement("script");script.src=`${ROOT_PATH}search.index/${hashHex}.js`;script.onerror=e=>{if(databaseCallbacks){databaseCallbacks.err_rn_(hashHex,e);}};document.documentElement.appendChild(script);},loadDataByNameAndHash:(name,hashHex)=>{const script=document.createElement("script");script.src=`${ROOT_PATH}search.index/${name}/${hashHex}.js`;script.onerror=e=>{if(databaseCallbacks){databaseCallbacks.err_rd_(hashHex,e);}};document.documentElement.appendChild(script);},});}else if(typeof exports!=="undefined"){exports.initSearch=initSearch;} \ No newline at end of file diff --git a/core/target/doc/static.files/settings-c38705f0.js b/core/target/doc/static.files/settings-c38705f0.js deleted file mode 100644 index 7e4939e5..00000000 --- a/core/target/doc/static.files/settings-c38705f0.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){if(settingName==="theme"){const useSystem=value==="system preference"?"true":"false";updateLocalStorage("use-system-theme",useSystem);}updateLocalStorage(settingName,""+value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":updateTheme();updateLightAndDark();break;case"line-numbers":if(value===true){const f=window.rustdoc_add_line_numbers_to_examples;if(f!==undefined){f();}}else{const f=window.rustdoc_remove_line_numbers_from_examples;if(f!==undefined){f();}}break;case"hide-sidebar":if(value===true){addClass(document.documentElement,"hide-sidebar");}else{removeClass(document.documentElement,"hide-sidebar");}break;case"hide-toc":if(value===true){addClass(document.documentElement,"hide-toc");}else{removeClass(document.documentElement,"hide-toc");}break;case"hide-modnav":if(value===true){addClass(document.documentElement,"hide-modnav");}else{removeClass(document.documentElement,"hide-modnav");}break;case"sans-serif-fonts":if(value===true){addClass(document.documentElement,"sans-serif");}else{removeClass(document.documentElement,"sans-serif");}break;case"word-wrap-source-code":if(value===true){addClass(document.documentElement,"word-wrap-source-code");}else{removeClass(document.documentElement,"word-wrap-source-code");}break;}}function showLightAndDark(){removeClass(document.getElementById("preferred-light-theme"),"hidden");removeClass(document.getElementById("preferred-dark-theme"),"hidden");}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme"),"hidden");addClass(document.getElementById("preferred-dark-theme"),"hidden");}function updateLightAndDark(){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||(useSystem===null&&getSettingValue("theme")===null)){showLightAndDark();}else{hideLightAndDark();}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.querySelectorAll("input[type=\"checkbox\"]"),toggle=>{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true";}toggle.onchange=()=>{changeSetting(toggle.id,toggle.checked);};});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference";}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value;}elem.addEventListener("change",()=>{changeSetting(elem.name,elem.value);});},);}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\ -
-
${setting_name}
-
`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ - `;});output+=`\ -
-
`;}else{const checked=setting["default"]===true?" checked":"";output+=`\ -
\ - \ -
`;}}return output;}function buildSettingsPage(){const theme_list=getVar("themes");const theme_names=(theme_list===null?"":theme_list).split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Hide persistent navigation bar","js_name":"hide-sidebar","default":false,},{"name":"Hide table of contents","js_name":"hide-toc","default":false,},{"name":"Hide module navigation","js_name":"hide-modnav","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},{"name":"Use sans serif fonts","js_name":"sans-serif-fonts","default":false,},{"name":"Word wrap source code","js_name":"word-wrap-source-code","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
${buildSettingsPageSections(settings)}
`;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover";}el.innerHTML=innerHTML;if(isSettingsPage){const mainElem=document.getElementById(MAIN_ID);if(mainElem!==null){mainElem.appendChild(el);}}else{el.setAttribute("tabindex","-1");onEachLazy(document.querySelectorAll(".settings-menu"),menu=>{if(menu.offsetWidth!==0){menu.appendChild(el);return true;}});}return el;}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display="";onEachLazy(document.querySelectorAll(".settings-menu"),menu=>{if(menu.offsetWidth!==0){if(!menu.contains(settingsMenu)&&settingsMenu.parentElement){settingsMenu.parentElement.removeChild(settingsMenu);menu.appendChild(settingsMenu);}return true;}});onEachLazy(settingsMenu.querySelectorAll("input[type='checkbox']"),el=>{const val=getSettingValue(el.id);const checked=val==="true";if(checked!==el.checked&&val!==null){el.checked=checked;}});}function settingsBlurHandler(event){const isInPopover=onEachLazy(document.querySelectorAll(".settings-menu, .help-menu"),menu=>{return menu.contains(document.activeElement)||menu.contains(event.relatedTarget);},);if(!isInPopover){window.hidePopoverMenus();}}if(!isSettingsPage){const settingsMenu=nonnull(document.getElementById("settings"));onEachLazy(document.querySelectorAll(".settings-menu"),settingsButton=>{settingsButton.querySelector("a").onclick=event=>{if(!(event.target instanceof Element)||settingsMenu.contains(event.target)){return;}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals(false);if(shouldDisplaySettings){displaySettings();}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;});onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler;});settingsMenu.onblur=settingsBlurHandler;}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings();}onEachLazy(document.querySelectorAll(".settings-menu"),settingsButton=>{removeClass(settingsButton,"rotate");});},0);})(); \ No newline at end of file diff --git a/core/target/doc/static.files/src-script-813739b1.js b/core/target/doc/static.files/src-script-813739b1.js deleted file mode 100644 index bf546257..00000000 --- a/core/target/doc/static.files/src-script-813739b1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(function(){const rootPath=getVar("root-path");const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidth{removeClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","false");};window.rustdocShowSourceSidebar=()=>{addClass(document.documentElement,"src-sidebar-expanded");updateLocalStorage("source-sidebar-show","true");};window.rustdocToggleSrcSidebar=()=>{if(document.documentElement.classList.contains("src-sidebar-expanded")){window.rustdocCloseSourceSidebar();}else{window.rustdocShowSourceSidebar();}};function createSrcSidebar(srcIndexStr){const container=nonnull(document.querySelector("nav.sidebar"));const sidebar=document.createElement("div");sidebar.id="src-sidebar";const srcIndex=new Map(JSON.parse(srcIndexStr));let hasFoundFile=false;for(const[key,source]of srcIndex){source[NAME_OFFSET]=key;hasFoundFile=createDirEntry(source,sidebar,"",hasFoundFile);}container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus();}}function highlightSrcLines(){const match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/);if(!match){return;}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10);}if(to{removeClass(e,"line-highlighted");});for(let i=from;i<=to;++i){elem=document.getElementById(""+i);if(!elem){break;}addClass(elem,"line-highlighted");}}const handleSrcHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,"","#"+name);highlightSrcLines();}else{location.replace("#"+name);}window.scrollTo(x,y);};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return;}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp;}set_fragment(prev_line_id+"-"+cur_line_id);}else{prev_line_id=cur_line_id;set_fragment(""+cur_line_id);}};}());window.addEventListener("hashchange",highlightSrcLines);onEachLazy(document.querySelectorAll("a[data-nosnippet]"),el=>{el.addEventListener("click",handleSrcHighlight);});highlightSrcLines();window.createSrcSidebar=createSrcSidebar;})(); \ No newline at end of file diff --git a/core/target/doc/static.files/storage-e2aeef58.js b/core/target/doc/static.files/storage-e2aeef58.js deleted file mode 100644 index fb76ad5e..00000000 --- a/core/target/doc/static.files/storage-e2aeef58.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict";const builtinThemes=["light","dark","ayu"];const darkThemes=["dark","ayu"];window.currentTheme=(function(){const currentTheme=document.getElementById("themeStyle");return currentTheme instanceof HTMLLinkElement?currentTheme:null;})();const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null;})();function nonnull(x,msg){if(x===null){throw(msg||"unexpected null value!");}else{return x;}}function nonundef(x,msg){if(x===undefined){throw(msg||"unexpected null value!");}else{return x;}}function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def;}}return current;}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return!!elem&&!!elem.classList&&elem.classList.contains(className);}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className);}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className);}}function onEach(arr,func){for(const elem of arr){if(func(elem)){return true;}}return false;}function onEachLazy(lazyArray,func){return onEach(Array.prototype.slice.call(lazyArray),func);}function updateLocalStorage(name,value){try{if(value===null){window.localStorage.removeItem("rustdoc-"+name);}else{window.localStorage.setItem("rustdoc-"+name,value);}}catch{}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name);}catch{return null;}}function getVar(name){const el=document.querySelector("head > meta[name='rustdoc-vars']");return el?el.getAttribute("data-"+name):null;}function switchTheme(newThemeName,saveTheme){const themeNames=(getVar("themes")||"").split(",").filter(t=>t);themeNames.push(...builtinThemes);if(newThemeName===null||themeNames.indexOf(newThemeName)===-1){return;}if(saveTheme){updateLocalStorage("theme",newThemeName);}document.documentElement.setAttribute("data-theme",newThemeName);if(builtinThemes.indexOf(newThemeName)!==-1){if(window.currentTheme&&window.currentTheme.parentNode){window.currentTheme.parentNode.removeChild(window.currentTheme);window.currentTheme=null;}}else{const newHref=getVar("root-path")+encodeURIComponent(newThemeName)+getVar("resource-suffix")+".css";if(!window.currentTheme){if(document.readyState==="loading"){document.write(``);window.currentTheme=(function(){const currentTheme=document.getElementById("themeStyle");return currentTheme instanceof HTMLLinkElement?currentTheme:null;})();}else{window.currentTheme=document.createElement("link");window.currentTheme.rel="stylesheet";window.currentTheme.id="themeStyle";window.currentTheme.href=newHref;document.documentElement.appendChild(window.currentTheme);}}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref;}}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true);}else{switchTheme(getSettingValue("theme"),false);}}mql.addEventListener("change",updateTheme);return updateTheme;})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&localStoredTheme!==null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme);}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"src-sidebar-expanded");}if(getSettingValue("hide-sidebar")==="true"){addClass(document.documentElement,"hide-sidebar");}if(getSettingValue("hide-toc")==="true"){addClass(document.documentElement,"hide-toc");}if(getSettingValue("hide-modnav")==="true"){addClass(document.documentElement,"hide-modnav");}if(getSettingValue("sans-serif-fonts")==="true"){addClass(document.documentElement,"sans-serif");}if(getSettingValue("word-wrap-source-code")==="true"){addClass(document.documentElement,"word-wrap-source-code");}function updateSidebarWidth(){const desktopSidebarWidth=getSettingValue("desktop-sidebar-width");if(desktopSidebarWidth&&desktopSidebarWidth!=="null"){document.documentElement.style.setProperty("--desktop-sidebar-width",desktopSidebarWidth+"px",);}const srcSidebarWidth=getSettingValue("src-sidebar-width");if(srcSidebarWidth&&srcSidebarWidth!=="null"){document.documentElement.style.setProperty("--src-sidebar-width",srcSidebarWidth+"px",);}}updateSidebarWidth();window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0);setTimeout(updateSidebarWidth,0);}});class RustdocToolbarElement extends HTMLElement{constructor(){super();}connectedCallback(){if(this.firstElementChild){return;}const rootPath=getVar("root-path");const currentUrl=window.location.href.split("?")[0].split("#")[0];this.innerHTML=` -
- Search -
-
- Settings -
-
- Help -
- `;}}window.customElements.define("rustdoc-toolbar",RustdocToolbarElement);class RustdocTopBarElement extends HTMLElement{constructor(){super();}connectedCallback(){const rootPath=getVar("root-path");const tmplt=document.createElement("template");tmplt.innerHTML=` - - - - - `;const shadow=this.attachShadow({mode:"open"});shadow.appendChild(tmplt.content.cloneNode(true));this.innerHTML+=` - -
- Settings -
-
- Help -
- `;}}window.customElements.define("rustdoc-topbar",RustdocTopBarElement); \ No newline at end of file diff --git a/core/target/doc/static.files/stringdex-a3946164.js b/core/target/doc/static.files/stringdex-a3946164.js deleted file mode 100644 index dbf1e083..00000000 --- a/core/target/doc/static.files/stringdex-a3946164.js +++ /dev/null @@ -1,2 +0,0 @@ -const EMPTY_UINT8=new Uint8Array();class RoaringBitmap{constructor(u8array,startingOffset){const start=startingOffset?startingOffset:0;let i=start;this.keysAndCardinalities=EMPTY_UINT8;this.containers=[];this.consumed_len_bytes=0;if(u8array===null||u8array.length===i||u8array[i]===0){return this;}else if(u8array[i]>0xf0){const lspecial=u8array[i]&0x0f;this.keysAndCardinalities=new Uint8Array(lspecial*4);let pspecial=i+1;let key=u8array[pspecial+2]|(u8array[pspecial+3]<<8);let value=u8array[pspecial]|(u8array[pspecial+1]<<8);let entry=(key<<16)|value;let container;container=new RoaringBitmapArray(1,new Uint8Array(4));container.array[0]=value&0xFF;container.array[1]=(value>>8)&0xFF;this.containers.push(container);this.keysAndCardinalities[0]=key;this.keysAndCardinalities[1]=key>>8;pspecial+=4;for(let ispecial=1;ispecial>16;container=this.addToArrayAt(key);const cardinalityOld=container.cardinality;container.array[cardinalityOld*2]=value&0xFF;container.array[(cardinalityOld*2)+1]=(value>>8)&0xFF;container.cardinality=cardinalityOld+1;pspecial+=2;}this.consumed_len_bytes=pspecial-i;return this;}else if(u8array[i]<0x3a){const lspecial=u8array[i];this.keysAndCardinalities=new Uint8Array(lspecial*4);let pspecial=i+1;for(let ispecial=0;ispecial>8)&0xFF;container.cardinality=cardinalityOld+1;pspecial+=4;}this.consumed_len_bytes=pspecial-i;return this;}const has_runs=u8array[i]===0x3b;if(u8array[i]!==0x3a&&u8array[i]!==0x3b){throw new Error("not a roaring bitmap: "+u8array[i]);}const size=has_runs?((u8array[i+2]|(u8array[i+3]<<8))+1):((u8array[i+4]|(u8array[i+5]<<8)|(u8array[i+6]<<16)|(u8array[i+7]<<24)));i+=has_runs?4:8;let is_run;if(has_runs){const is_run_len=(size+7)>>3;is_run=new Uint8Array(u8array.buffer,i+u8array.byteOffset,is_run_len);i+=is_run_len;}else{is_run=EMPTY_UINT8;}this.keysAndCardinalities=u8array.subarray(i,i+(size*4));i+=size*4;let offsets=null;if(!has_runs||size>=4){offsets=[];for(let j=0;j>3]&(1<<(j&0x7))){const runcount=(u8array[i]|(u8array[i+1]<<8));i+=2;this.containers.push(new RoaringBitmapRun(runcount,new Uint8Array(u8array.buffer,i+u8array.byteOffset,runcount*4),));i+=runcount*4;}else if(cardinality>=4096){this.containers.push(new RoaringBitmapBits(new Uint8Array(u8array.buffer,i+u8array.byteOffset,8192,)));i+=8192;}else{const end=cardinality*2;this.containers.push(new RoaringBitmapArray(cardinality,new Uint8Array(u8array.buffer,i+u8array.byteOffset,end),));i+=end;}}this.consumed_len_bytes=i-start;}static makeSingleton(number){const result=new RoaringBitmap(null,0);result.keysAndCardinalities=Uint8Array.of((number>>16),(number>>24),0,0,);result.containers.push(new RoaringBitmapArray(1,Uint8Array.of(number,number>>8),));return result;}static everything(){if(EVERYTHING_BITMAP.isEmpty()){let i=0;const l=1<<16;const everything_range=new RoaringBitmapRun(1,Uint8Array.of(0,0,0xff,0xff));EVERYTHING_BITMAP.keysAndCardinalities=new Uint8Array(l*4);while(i>8;EVERYTHING_BITMAP.keysAndCardinalities[(i*4)+2]=0xff;EVERYTHING_BITMAP.keysAndCardinalities[(i*4)+3]=0xff;i+=1;}}return EVERYTHING_BITMAP;}static empty(){return EMPTY_BITMAP;}isEmpty(){return this.containers.length===0;}addToArrayAt(key){let mid=this.getContainerId(key);let container;if(mid===-1){container=new RoaringBitmapArray(0,new Uint8Array(2));mid=this.containers.length;this.containers.push(container);if(mid*4>this.keysAndCardinalities.length){const keysAndContainers=new Uint8Array(mid*8);keysAndContainers.set(this.keysAndCardinalities);this.keysAndCardinalities=keysAndContainers;}this.keysAndCardinalities[(mid*4)+0]=key;this.keysAndCardinalities[(mid*4)+1]=key>>8;}else{container=this.containers[mid];const cardinalityOld=this.keysAndCardinalities[(mid*4)+2]|(this.keysAndCardinalities[(mid*4)+3]<<8);const cardinality=cardinalityOld+1;this.keysAndCardinalities[(mid*4)+2]=cardinality;this.keysAndCardinalities[(mid*4)+3]=cardinality>>8;}const cardinalityOld=this.keysAndCardinalities[(mid*4)+2]|(this.keysAndCardinalities[(mid*4)+3]<<8);if(!(container instanceof RoaringBitmapArray)||container.array.byteLength<((cardinalityOld+1)*2)){const newBuf=new Uint8Array((cardinalityOld+1)*4);let idx=0;for(const cvalue of container.values()){newBuf[idx]=cvalue&0xFF;newBuf[idx+1]=(cvalue>>8)&0xFF;idx+=2;}if(container instanceof RoaringBitmapArray){container.cardinality=cardinalityOld;container.array=newBuf;return container;}const newcontainer=new RoaringBitmapArray(cardinalityOld,newBuf);this.containers[mid]=newcontainer;return newcontainer;}else{return container;}}union(that){if(this.isEmpty()){return that;}if(that.isEmpty()){return this;}if(this===RoaringBitmap.everything()||that===RoaringBitmap.everything()){return RoaringBitmap.everything();}let i=0;const il=this.containers.length;let j=0;const jl=that.containers.length;const result=new RoaringBitmap(null,0);result.keysAndCardinalities=new Uint8Array((il+jl)*4);while(i=jl||(i=il||(jthatContainer.array.length?thisContainer.array.length:thatContainer.array.length,);let k=0;const kl=resultArray.length;while(k>8)&0xFF;k+=2;}result.containers.push(new RoaringBitmapArray(resultValues.length,resultArray,));card=resultValues.length;}result.keysAndCardinalities[k+0]=this.keysAndCardinalities[ik+0];result.keysAndCardinalities[k+1]=this.keysAndCardinalities[ik+1];card-=1;result.keysAndCardinalities[k+2]=card;result.keysAndCardinalities[k+3]=card>>8;i+=1;j+=1;}}return result;}intersection(that){if(this.isEmpty()||that.isEmpty()){return EMPTY_BITMAP;}if(this===RoaringBitmap.everything()){return that;}if(that===RoaringBitmap.everything()){return this;}let i=0;const il=this.containers.length;let j=0;const jl=that.containers.length;const result=new RoaringBitmap(null,0);result.keysAndCardinalities=new Uint8Array((il>jl?il:jl)*4);while(i=jl||(i=il||(jthatContainer.array.length?thisContainer.array.length:thatContainer.array.length,);let k=0;const kl=resultArray.length;while(k>8)&0xFF;k+=2;}result.containers.push(new RoaringBitmapArray(resultValues.length,resultArray,));}}if(card!==0){result.keysAndCardinalities[k+0]=this.keysAndCardinalities[ik+0];result.keysAndCardinalities[k+1]=this.keysAndCardinalities[ik+1];card-=1;result.keysAndCardinalities[k+2]=card;result.keysAndCardinalities[k+3]=card>>8;}i+=1;j+=1;}}return result;}contains(keyvalue){const key=keyvalue>>16;const value=keyvalue&0xFFFF;const mid=this.getContainerId(key);return mid===-1?false:this.containers[mid].contains(value);}remove(keyvalue){const key=keyvalue>>16;const value=keyvalue&0xFFFF;const mid=this.getContainerId(key);if(mid===-1){return this;}const container=this.containers[mid];if(!container.contains(value)){return this;}const newCardinality=(this.keysAndCardinalities[(mid*4)+2]|(this.keysAndCardinalities[(mid*4)+3]<<8));const l=this.containers.length;const m=l-(newCardinality===0?1:0);const result=new RoaringBitmap(null,0);result.keysAndCardinalities=new Uint8Array(m*4);let j=0;for(let i=0;i>8;const card=newCardinality-1;result.keysAndCardinalities[(j*4)+2]=card;result.keysAndCardinalities[(j*4)+3]=card>>8;const newContainer=new RoaringBitmapArray(newCardinality,new Uint8Array(newCardinality*2),);let newContainerSlot=0;for(const containerValue of container.values()){if(containerValue!==value){newContainer.array[newContainerSlot]=value&0xFF;newContainerSlot+=1;newContainer.array[newContainerSlot]=value>>8;newContainerSlot+=1;}}result.containers.push(newContainer);j+=1;}}else{result.keysAndCardinalities[(j*4)+0]=this.keysAndCardinalities[(i*4)+0];result.keysAndCardinalities[(j*4)+1]=this.keysAndCardinalities[(i*4)+1];result.keysAndCardinalities[(j*4)+2]=this.keysAndCardinalities[(i*4)+2];result.keysAndCardinalities[(j*4)+3]=this.keysAndCardinalities[(i*4)+3];result.containers.push(this.containers[i]);j+=1;}}return result;}getContainerId(key){let left=0;let right=this.containers.length-1;while(left<=right){const mid=Math.floor((left+right)/2);const x=this.keysAndCardinalities[(mid*4)]|(this.keysAndCardinalities[(mid*4)+1]<<8);if(xkey){right=mid-1;}else{return mid;}}return-1;}*entries(){const l=this.containers.length;for(let i=0;i>1;const i=mid*4;const start=this.array[i]|(this.array[i+1]<<8);const lenm1=this.array[i+2]|(this.array[i+3]<<8);if((start+lenm1)value){right=mid-1;}else{return true;}}return false;}*values(){let i=0;while(i>1;const i=mid*2;const x=this.array[i]|(this.array[i+1]<<8);if(xvalue){right=mid-1;}else{return true;}}return false;}*values(){let i=0;const l=this.cardinality*2;while(i>3]&(1<<(value&7)));}*values(){let i=0;const l=this.array.length<<3;while(i=this.values.length*9){const keys=this.keys;const values=this.values;const l=values.length;this.capacityClass+=1;const capacity=1<otherDistance){const otherKey=keys.slice(j,j+6);values[slot]=value;value=otherValue;keys[j+0]=key[start+0];keys[j+1]=key[start+1];keys[j+2]=key[start+2];keys[j+3]=key[start+3];keys[j+4]=key[start+4];keys[j+5]=key[start+5];key=otherKey;start=0;distance=otherDistance;}distance+=1;slot=(slot+1)&mask;}}}get(key){if(key.length!==6){throw"invalid key";}return this.getWithOffsetKey(key,0);}getWithOffsetKey(key,start){const mask=~(0xffffffff<otherDistance){break;}}slot=(slot+1)&mask;}return undefined;}}function bitCount(n){n=(~~n)-((n>>1)&0x55555555);n=(n&0x33333333)+((n>>2)&0x33333333);return((n+(n>>4)&0xF0F0F0F)*0x1010101)>>24;}class Uint8ArraySearchPattern{constructor(needle){this.needle=needle;this.skipTable=[];const m=needle.length;for(let i=0;i<256;i+=1){this.skipTable.push(m);}for(let i=0;i=m){for(let i=m-1;i>=0;i-=1){if(haystack[skip+i]!==needle[i]){skip+=skipTable[haystack[skip+m-1]];continue search;}}return true;}return false;}}function loadDatabase(hooks){const callbacks={rr_:function(data){const dataObj=JSON.parse(data);for(const colName of Object.keys(dataObj)){if(Object.hasOwn(dataObj[colName],"N")){const counts=[];const countsstring=dataObj[colName]["N"];let i=0;const l=countsstring.length;while(i>4)&0x0f));const id3=id2+(((nodeid[4]&0x0f)<<8)|nodeid[5]);leaves=RoaringBitmap.makeSingleton(id1).union(RoaringBitmap.makeSingleton(id2)).union(RoaringBitmap.makeSingleton(id3));}else{leaves=RoaringBitmap.makeSingleton((nodeid[2]<<24)|(nodeid[3]<<16)|(nodeid[4]<<8)|nodeid[5],);}if(isWhole){const data=(nodeid[0]&0x20)!==0?Uint8Array.of(((nodeid[0]&0x0f)<<4)|(nodeid[1]>>4)):EMPTY_UINT8;newPromise=Promise.resolve(new PrefixSearchTree(EMPTY_SEARCH_TREE_BRANCHES,EMPTY_SEARCH_TREE_BRANCHES,data,leaves,EMPTY_BITMAP,));}else{const data=(nodeid[0]&0xf0)===0x80?0:(((nodeid[0]&0x0f)<<4)|(nodeid[1]>>4));newPromise=Promise.resolve(new SuffixSearchTree(EMPTY_SEARCH_TREE_BRANCHES,data,leaves,));}}else{const hashHex=makeHexFromUint8Array(nodeid);newPromise=new Promise((resolve,reject)=>{const cb=registry.searchTreeLoadPromiseCallbacks.get(nodeid);if(cb){registry.searchTreeLoadPromiseCallbacks.set(nodeid,(err,data)=>{cb(err,data);if(data){resolve(data);}else{reject(err);}});}else{registry.searchTreeLoadPromiseCallbacks.set(nodeid,(err,data)=>{if(data){resolve(data);}else{reject(err);}});hooks.loadTreeByHash(hashHex);}});}registry.searchTreePromises.set(nodeid,newPromise);return newPromise;},dataLoadByNameAndHash:function(name,hash){const existingBucket=registry.dataColumnsBuckets.get(hash);if(existingBucket){return existingBucket;}const hashHex=makeHexFromUint8Array(hash);const newBucket=new Promise((resolve,reject)=>{const cb=registry.dataColumnLoadPromiseCallbacks.get(hash);if(cb){registry.dataColumnLoadPromiseCallbacks.set(hash,(err,data)=>{cb(err,data);if(data){resolve(data);}else{reject(err);}});}else{registry.dataColumnLoadPromiseCallbacks.set(hash,(err,data)=>{if(data){resolve(data);}else{reject(err);}});hooks.loadDataByNameAndHash(name,hashHex);}});registry.dataColumnsBuckets.set(hash,newBucket);return newBucket;},};class SearchTreeBranches{constructor(length,nodeids){this.nodeids=nodeids;this.subtrees=[];for(let i=0;i=this.keys[i]){throw new Error("HERE");}i+=1;}}*entries(){let i=0;const l=this.keys.length;while(i>1;if(this.keys[mid]k){right=mid-1;}else{return mid;}}return-1;}getKey(i){return this.keys[i];}getKeys(){return this.keys;}}const EMPTY_SEARCH_TREE_BRANCHES=new SearchTreeBranchesArray(EMPTY_UINT8,EMPTY_UINT8,);const SHORT_ALPHABITMAP_CHARS=[];for(let i=0x61;i<=0x7A;++i){if(i===0x76||i===0x71){continue;}SHORT_ALPHABITMAP_CHARS.push(i);}const LONG_ALPHABITMAP_CHARS=[0x31,0x32,0x33,0x34,0x35,0x36];for(let i=0x61;i<=0x7A;++i){LONG_ALPHABITMAP_CHARS.push(i);}function makeSearchTreeBranchesAlphaBitmapClass(alphabitmap_chars,width){const bitwidth=width*8;const cls=class SearchTreeBranchesAlphaBitmap extends SearchTreeBranches{constructor(bitmap,nodeids){super(nodeids.length/6,nodeids);if(nodeids.length/6!==bitCount(bitmap)){throw new Error(`mismatch ${bitmap} ${nodeids}`);}this.bitmap=bitmap;this.nodeids=nodeids;}*entries(){let i=0;let j=0;while(i=this.subtrees.length?-1:result;}getKey(branch_index){return this.getKeys()[branch_index];}getKeys(){const length=bitCount(this.bitmap);const result=new Uint8Array(length);let result_index=0;for(let alpha_index=0;alpha_index=6?new Lev2TParametricDescription(w):new Lev1TParametricDescription(w);const stack=[[Promise.resolve(this.trie(dataColumn,searchPattern)),0]];const n=levParams.n;while(stack.length!==0){const[triePromise,levState]=stack.pop();const trie=await triePromise;for(const byte of trie.keysExcludeSuffixOnly()){const levPos=levParams.getPosition(levState);const vector=levParams.getVector(name,byte,levPos,Math.min(w,levPos+(2*n)+1),);const newLevState=levParams.transition(levState,levPos,vector,);if(newLevState>=0){const child=trie.child(byte);if(child){stack.push([child,newLevState]);if(levParams.isAccept(newLevState)){yield child;}}}}}}getCurrentLeaves(){return this.leaves_whole.union(this.leaves_suffix);}}class PrefixTrie{constructor(tree,offset,dataColumn,searchPattern){this.tree=tree;this.offset=offset;this.dataColumn=dataColumn;this.searchPattern=searchPattern;}matches(){if(this.offset===this.tree.data.length){return this.tree.leaves_whole;}else{return EMPTY_BITMAP;}}async*substringMatches(){let layer=[Promise.resolve(this.tree)];while(layer.length){const current_layer=layer;layer=[];for await(const tree of current_layer){let rejected=null;let leaves=tree.getCurrentLeaves();for(const leaf of leaves.entries()){const haystack=await this.dataColumn.at(leaf);if(haystack===undefined||!this.searchPattern.matches(haystack)){if(!rejected){rejected=[];}rejected.push(leaf);}}if(rejected){if(leaves.cardinality()!==rejected.length){for(const rej of rejected){leaves=leaves.remove(rej);}yield leaves;}}else{yield leaves;}}const subnodes=new HashTable();for await(const nodeEncoded of current_layer){const node=nodeEncoded instanceof InlineNeighborsTree?nodeEncoded.decode():nodeEncoded;const branches=node.branches;const l=branches.subtrees.length;for(let i=0;i0&&backlog[backlogSlot].length>1].length){const parentSlot=(backlogSlot-1)>>1;const parent=backlog[parentSlot];backlog[parentSlot]=backlog[backlogSlot];backlog[backlogSlot]=parent;backlogSlot=parentSlot;}}while(backlog.length!==0){const backlogEntry=backlog[0];if(minLength!==null&&backlogEntry.length>minLength){break;}if(!backlogEntry.bitmap.isEmpty()){yield backlogEntry.bitmap;}backlog[0]=backlog[backlog.length-1];backlog.length-=1;let backlogSlot=0;const backlogLength=backlog.length;while(backlogSlot{return node.trie(this.dataColumn,this.searchPattern);})]);i+=1;}return nodes;}else{const codePoint=data[this.offset];const trie=new PrefixTrie(this.tree,this.offset+1,this.dataColumn,this.searchPattern,);return[[codePoint,Promise.resolve(trie)]];}}keysExcludeSuffixOnly(){const data=this.tree.data;if(this.offset===data.length){return this.tree.might_have_prefix_branches.getKeys();}else{return Uint8Array.of(data[this.offset]);}}childrenExcludeSuffixOnly(){const data=this.tree.data;if(this.offset===data.length){const nodes=[];let i=0;for(const[k,v]of this.tree.might_have_prefix_branches.entries()){let node;if(v){node=v;}else{const newnode=this.tree.might_have_prefix_branches.getNodeID(i);if(!newnode){throw new Error(`malformed tree; no node for key ${k}`);}node=registry.searchTreeLoadByNodeID(newnode);this.tree.might_have_prefix_branches.subtrees[i]=node;this.tree.branches.subtrees[this.tree.branches.getIndex(k)]=node;}nodes.push([k,node.then(node=>{return node.trie(this.dataColumn,this.searchPattern);})]);i+=1;}return nodes;}else{const codePoint=data[this.offset];const trie=new PrefixTrie(this.tree,this.offset+1,this.dataColumn,this.searchPattern,);return[[codePoint,Promise.resolve(trie)]];}}child(byte){if(this.offset===this.tree.data.length){const i=this.tree.branches.getIndex(byte);if(i!==-1){let branch=this.tree.branches.subtrees[i];if(branch===null){const newnode=this.tree.branches.getNodeID(i);if(!newnode){throw new Error(`malformed tree; no node for key ${byte}`);}branch=registry.searchTreeLoadByNodeID(newnode);this.tree.branches.subtrees[i]=branch;const mhpI=this.tree.might_have_prefix_branches.getIndex(byte);if(mhpI!==-1){this.tree.might_have_prefix_branches.subtrees[mhpI]=branch;}}return branch.then(branch=>branch.trie(this.dataColumn,this.searchPattern));}}else if(this.tree.data[this.offset]===byte){return Promise.resolve(new PrefixTrie(this.tree,this.offset+1,this.dataColumn,this.searchPattern,));}return null;}}class SuffixSearchTree{constructor(branches,dataLen,leaves_suffix,){this.branches=branches;this.dataLen=dataLen;this.leaves_suffix=leaves_suffix;}trie(dataColumn,searchPattern){return new SuffixTrie(this,0,dataColumn,searchPattern);}async search(name,dataColumn){if(typeof name==="string"){const utf8encoder=new TextEncoder();name=utf8encoder.encode(name);}const searchPattern=new Uint8ArraySearchPattern(name);let trie=this.trie(dataColumn,searchPattern);for(const datum of name){const newTrie=trie.child(datum);if(newTrie){trie=await newTrie;}else{return null;}}return trie;}async*searchLev(_name,_dataColumn){}getCurrentLeaves(){return this.leaves_suffix;}}class SuffixTrie{constructor(tree,offset,dataColumn,searchPattern){this.tree=tree;this.offset=offset;this.dataColumn=dataColumn;this.searchPattern=searchPattern;}matches(){return EMPTY_BITMAP;}async*substringMatches(){let layer=[Promise.resolve(this.tree)];while(layer.length){const current_layer=layer;layer=[];for await(const tree of current_layer){let rejected=null;let leaves=tree.getCurrentLeaves();for(const leaf of leaves.entries()){const haystack=await this.dataColumn.at(leaf);if(haystack===undefined||!this.searchPattern.matches(haystack)){if(!rejected){rejected=[];}rejected.push(leaf);}}if(rejected){if(leaves.cardinality()!==rejected.length){for(const rej of rejected){leaves=leaves.remove(rej);}yield leaves;}}else{yield leaves;}}const subnodes=new HashTable();for await(const nodeEncoded of current_layer){const node=nodeEncoded instanceof InlineNeighborsTree?nodeEncoded.decode():nodeEncoded;const branches=node.branches;const l=branches.subtrees.length;for(let i=0;ibranch.trie(this.dataColumn,this.searchPattern));}}else{return Promise.resolve(new SuffixTrie(this.tree,this.offset+1,this.dataColumn,this.searchPattern,));}return null;}}class InlineNeighborsTree{constructor(encoded,start,){this.encoded=encoded;this.start=start;}decode(){let i=this.start;const encoded=this.encoded;const has_branches=(encoded[i]&0x04)!==0;const is_suffixes_only=(encoded[i]&0x01)!==0;let leaves_count=((encoded[i]>>4)&0x0f)+1;i+=1;let branch_count=0;if(has_branches){branch_count=encoded[i]+1;i+=1;}const dlen=encoded[i]&0x3f;if((encoded[i]&0x80)!==0){leaves_count=0;}i+=1;let data=EMPTY_UINT8;if(!is_suffixes_only&&dlen!==0){data=encoded.subarray(i,i+dlen);i+=dlen;}const leaf_value_upper=encoded[i]|(encoded[i+1]<<8);i+=2;const branch_nodes=[];for(let j=0;j>4)&0x0f)+1;i+=1;let branch_data=EMPTY_UINT8;if(!is_suffixes_only&&branch_dlen!==0){branch_data=encoded.subarray(i,i+branch_dlen);i+=branch_dlen;}const branch_leaves=new RoaringBitmap(null);branch_leaves.keysAndCardinalities=Uint8Array.of(leaf_value_upper&0xff,(leaf_value_upper>>8)&0xff,(branch_leaves_count-1)&0xff,((branch_leaves_count-1)>>8)&0xff,);branch_leaves.containers=[new RoaringBitmapArray(branch_leaves_count,encoded.subarray(i,i+(branch_leaves_count*2)),),];i+=branch_leaves_count*2;branch_nodes.push(Promise.resolve(is_suffixes_only?new SuffixSearchTree(EMPTY_SEARCH_TREE_BRANCHES,branch_dlen,branch_leaves,):new PrefixSearchTree(EMPTY_SEARCH_TREE_BRANCHES,EMPTY_SEARCH_TREE_BRANCHES,branch_data,branch_leaves,EMPTY_BITMAP,),));}const branches=branch_count===0?EMPTY_SEARCH_TREE_BRANCHES:new SearchTreeBranchesArray(encoded.subarray(i,i+branch_count),EMPTY_UINT8,);i+=branch_count;branches.subtrees=branch_nodes;let leaves=EMPTY_BITMAP;if(leaves_count!==0){leaves=new RoaringBitmap(null);leaves.keysAndCardinalities=Uint8Array.of(leaf_value_upper&0xff,(leaf_value_upper>>8)&0xff,(leaves_count-1)&0xff,((leaves_count-1)>>8)&0xff,);leaves.containers=[new RoaringBitmapArray(leaves_count,encoded.subarray(i,i+(leaves_count*2)),),];i+=leaves_count*2;}return is_suffixes_only?new SuffixSearchTree(branches,dlen,leaves,):new PrefixSearchTree(branches,branches,data,leaves,EMPTY_BITMAP,);}trie(dataColumn,searchPattern){const tree=this.decode();return tree instanceof SuffixSearchTree?new SuffixTrie(tree,0,dataColumn,searchPattern):new PrefixTrie(tree,0,dataColumn,searchPattern);}search(name,dataColumn){return this.decode().search(name,dataColumn);}searchLev(name,dataColumn){return this.decode().searchLev(name,dataColumn);}getCurrentLeaves(){return this.decode().getCurrentLeaves();}}class DataColumn{constructor(counts,hashes,emptyset,name,searchTree){this.searchTree=searchTree;this.hashes=hashes;this.emptyset=emptyset;this.name=name;this.buckets=[];this.bucket_keys=[];const l=counts.length;let k=0;let totalLength=0;for(let i=0;i=this.bucket_keys.length){return undefined;}else{const start=this.bucket_keys[idx];const bucket=this.buckets[idx];const data=this.buckets[idx].data;if(data===null){return this.atAsyncFetch(id,start,bucket);}else{return data[id-start];}}}}async atAsyncFetch(id,start,bucket){const{hash,end}=bucket;const dataSansEmptysetOrig=await registry.dataLoadByNameAndHash(this.name,hash,);let data=bucket.data;if(data!==null){return data[id-start];}const dataSansEmptyset=[...dataSansEmptysetOrig];let dataWithEmptyset=null;let pos=start;let insertCount=0;while(pos=48&&c<=63){dataSansEmptyset.push(backrefs[c-48]);i+=1;}else{let n=0;while(c<96){n=(n<<4)|(c&0xF);i+=1;c=data[i];}n=(n<<4)|(c&0xF);i+=1;const item=data.subarray(i,i+n);dataSansEmptyset.push(item);i+=n;backrefs.unshift(item);if(backrefs.length>16){backrefs.pop();}}}cb(null,dataSansEmptyset);}}function makeSearchTreeFromBase64(inputBase64){const input=makeUint8ArrayFromBase64(inputBase64);let i=0;const l=input.length;const stash=new HashTable();const hash=Uint8Array.of(0,0,0,0,0,0,0,0);const truncatedHash=new Uint8Array(hash.buffer,2,6);const hash_history=[];const data_history=[];let canonical=EMPTY_UINT8;let tree=new PrefixSearchTree(EMPTY_SEARCH_TREE_BRANCHES,EMPTY_SEARCH_TREE_BRANCHES,EMPTY_UINT8,EMPTY_BITMAP,EMPTY_BITMAP,);function makeBranchesFromBinaryData(input,i,compression_tag,){const is_pure_suffixes_only_node=(compression_tag&0x01)!==0x00;const is_stack_compressed=(compression_tag&0x02)!==0;const is_long_compressed=(compression_tag&0x04)!==0;const all_children_are_compressed=(compression_tag&0xF0)===0xF0&&!is_long_compressed;const any_children_are_compressed=(compression_tag&0xF0)!==0x00||is_long_compressed;const start_point=i;let cplen;let cslen;let alphabitmap=null;if(is_pure_suffixes_only_node){cplen=0;cslen=input[i];i+=1;if(cslen>=0xc0){alphabitmap=SearchTreeBranchesLongAlphaBitmap;cslen=cslen&0x3F;}else if(cslen>=0x80){alphabitmap=SearchTreeBranchesShortAlphaBitmap;cslen=cslen&0x7F;}}else{cplen=input[i];i+=1;cslen=input[i];i+=1;if(cplen===0xff&&cslen===0xff){cplen=0x100;cslen=0;}else if(cplen>=0xc0&&cslen>=0xc0){alphabitmap=SearchTreeBranchesLongAlphaBitmap;cplen=cplen&0x3F;cslen=cslen&0x3F;}else if(cplen>=0x80&&cslen>=0x80){alphabitmap=SearchTreeBranchesShortAlphaBitmap;cplen=cplen&0x7F;cslen=cslen&0x7F;}}let j=0;let cpnodes;if(any_children_are_compressed){cpnodes=cplen===0?EMPTY_UINT8:new Uint8Array(cplen*6);while(j=cplen||(csicsbranches[csi])){branchset[j]=csbranches[csi];const joff=j*6;const csioff=csi*6;hashes[joff+0]=csnodes[csioff+0];hashes[joff+1]=csnodes[csioff+1];hashes[joff+2]=csnodes[csioff+2];hashes[joff+3]=csnodes[csioff+3];hashes[joff+4]=csnodes[csioff+4];hashes[joff+5]=csnodes[csioff+5];csi+=1;}else{branchset[j]=cpbranches[cpi];const joff=j*6;const cpioff=cpi*6;hashes[joff+0]=cpnodes[cpioff+0];hashes[joff+1]=cpnodes[cpioff+1];hashes[joff+2]=cpnodes[cpioff+2];hashes[joff+3]=cpnodes[cpioff+3];hashes[joff+4]=cpnodes[cpioff+4];hashes[joff+5]=cpnodes[cpioff+5];cpi+=1;}j+=1;}branches=new SearchTreeBranchesArray(branchset,hashes);}i+=cslen;}return{consumed_len_bytes:i-start_point,cpbranches,csbranches,cpnodes,csnodes,branches,might_have_prefix_branches,};}while(i>4)&0x0f)+1;const branch_count=is_long_compressed?((compression_tag>>8)&0xff)+1:0;if(is_data_compressed){data=data_history[data_history.length-dlen-1];dlen=data.length;}else if(is_pure_suffixes_only_node){data=EMPTY_UINT8;}else{data=dlen===0?EMPTY_UINT8:new Uint8Array(input.buffer,i+input.byteOffset,dlen);i+=dlen;}const branches_start=i;i+=2;for(let j=0;j>4)&0x0f)+1;i+=1;if(!is_pure_suffixes_only_node){i+=branch_dlen;}i+=branch_leaves_count*2;}i+=branch_count;i+=leaves_count*2;if(is_data_compressed){const clen=(1+(is_long_compressed?1:0)+1+dlen+(i-branches_start));const canonical=new Uint8Array(clen);let ci=0;canonical[ci]=input[start]^ 0x08;ci+=1;if(is_long_compressed){canonical[ci]=input[start+ci];ci+=1;}canonical[ci]=dlen|no_leaves_flag|0x40;ci+=1;for(let j=0;j1){if(is_pure_suffixes_only_node){data=EMPTY_UINT8;}else if(is_data_compressed){data=data_history[data_history.length-dlen-1];dlen=data.length;}else{data=dlen===0?EMPTY_UINT8:new Uint8Array(input.buffer,i+input.byteOffset,dlen);i+=dlen;}const coffset=i;const{cpbranches,csbranches,cpnodes,csnodes,consumed_len_bytes:branches_consumed_len_bytes,branches,might_have_prefix_branches,}=makeBranchesFromBinaryData(input,i,compression_tag);i+=branches_consumed_len_bytes;let whole;let suffix;if(is_pure_suffixes_only_node){if(no_leaves_flag){whole=EMPTY_BITMAP;suffix=EMPTY_BITMAP;}else{suffix=input[i]===0?EMPTY_BITMAP1:new RoaringBitmap(input,i);i+=suffix.consumed_len_bytes;}tree=new SuffixSearchTree(branches,dlen,suffix,);const clen=((is_data_compressed?2:3)+csnodes.length+csbranches.length+suffix.consumed_len_bytes);if(canonical.length{registry.searchTreeRootCallback=(error,data)=>{if(data){resolve(data);}else{reject(error);}};hooks.loadRoot(callbacks);});}if(typeof window!=="undefined"){window.Stringdex={loadDatabase,};window.RoaringBitmap=RoaringBitmap;if(window.StringdexOnload){window.StringdexOnload.forEach(cb=>cb(window.Stringdex));}}else{module.exports.Stringdex={loadDatabase,};module.exports.RoaringBitmap=RoaringBitmap;}const makeUint8ArrayFromBase64=Uint8Array.fromBase64?Uint8Array.fromBase64:(string=>{const bytes_as_string=atob(string);const l=bytes_as_string.length;const bytes=new Uint8Array(l);for(let i=0;i{const alpha={"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,"a":10,"b":11,"A":10,"B":11,"c":12,"d":13,"C":12,"D":13,"e":14,"f":15,"E":14,"F":15,};const l=string.length>>1;const bytes=new Uint8Array(l);for(let i=0;iarray.toHex()):(array=>{const alpha=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f",];const l=array.length;const v=[];for(let i=0;i>4]);v.push(alpha[array[i]&0xf]);}return v.join("");});function siphashOfBytes(input,k0lo,k0hi,k1lo,k1hi,output){let v0lo=k0lo ^ 0x70736575;let v0hi=k0hi ^ 0x736f6d65;let v1lo=k1lo ^ 0x6e646f6d;let v1hi=k1hi ^ 0x646f7261;let v2lo=k0lo ^ 0x6e657261;let v2hi=k0hi ^ 0x6c796765;let v3lo=k1lo ^ 0x79746573;let v3hi=k1hi ^ 0x74656462;const inputLength=input.length;let inputI=0;const left=inputLength&0x7;let milo=0;let mihi=0;while(inputI>>8;output[5]=(v0lo ^ v1lo ^ v2lo ^ v3lo)>>>16;output[4]=(v0lo ^ v1lo ^ v2lo ^ v3lo)>>>24;output[3]=(v0hi ^ v1hi ^ v2hi ^ v3hi)&0xff;output[2]=(v0hi ^ v1hi ^ v2hi ^ v3hi)>>>8;output[1]=(v0hi ^ v1hi ^ v2hi ^ v3hi)>>>16;output[0]=(v0hi ^ v1hi ^ v2hi ^ v3hi)>>>24;function u8ToU64le(offset,length){const n0=offset>>0)+(v1lo>>>0)>0xffffffff)?1:0))|0;v0lo=(v0lo+v1lo)|0;let v1lo_=v1lo;let v1hi_=v1hi;v1lo=(v1lo_<<13)|(v1hi_>>>19);v1hi=(v1hi_<<13)|(v1lo_>>>19);v1lo ^=v0lo;v1hi ^=v0hi;const v0lo_=v0lo;const v0hi_=v0hi;v0lo=v0hi_;v0hi=v0lo_;v2hi=(v2hi+v3hi+(((v2lo>>>0)+(v3lo>>>0)>0xffffffff)?1:0))|0;v2lo=(v2lo+v3lo)|0;let v3lo_=v3lo;let v3hi_=v3hi;v3lo=(v3lo_<<16)|(v3hi_>>>16);v3hi=(v3hi_<<16)|(v3lo_>>>16);v3lo ^=v2lo;v3hi ^=v2hi;v0hi=(v0hi+v3hi+(((v0lo>>>0)+(v3lo>>>0)>0xffffffff)?1:0))|0;v0lo=(v0lo+v3lo)|0;v3lo_=v3lo;v3hi_=v3hi;v3lo=(v3lo_<<21)|(v3hi_>>>11);v3hi=(v3hi_<<21)|(v3lo_>>>11);v3lo ^=v0lo;v3hi ^=v0hi;v2hi=(v2hi+v1hi+(((v2lo>>>0)+(v1lo>>>0)>0xffffffff)?1:0))|0;v2lo=(v2lo+v1lo)|0;v1lo_=v1lo;v1hi_=v1hi;v1lo=(v1lo_<<17)|(v1hi_>>>15);v1hi=(v1hi_<<17)|(v1lo_>>>15);v1lo ^=v2lo;v1hi ^=v2hi;const v2lo_=v2lo;const v2hi_=v2hi;v2lo=v2hi_;v2hi=v2lo_;}}class ParametricDescription{constructor(w,n,minErrors){this.w=w;this.n=n;this.minErrors=minErrors;}isAccept(absState){const state=Math.floor(absState/(this.w+1));const offset=absState%(this.w+1);return this.w-offset+this.minErrors[state]<=this.n;}getPosition(absState){return absState%(this.w+1);}getVector(name,charCode,pos,end){let vector=0;for(let i=pos;i>5;const bitStart=bitLoc&31;if(bitStart+bitsPerValue<=32){return((data[dataLoc]>>bitStart)&this.MASKS[bitsPerValue-1]);}else{const part=32-bitStart;return ~~(((data[dataLoc]>>bitStart)&this.MASKS[part-1])+((data[1+dataLoc]&this.MASKS[bitsPerValue-part-1])<Clone> Clone for BodyDataStream<B>"],["impl<B: Clone> Clone for BodyStream<B>"],["impl<B: Clone> Clone for Limited<B>"],["impl<B: Clone, F: Clone> Clone for MapErr<B, F>"],["impl<B: Clone, F: Clone> Clone for MapFrame<B, F>"],["impl<D> Clone for Empty<D>"],["impl<D: Clone> Clone for Full<D>"],["impl<L: Clone, R: Clone> Clone for Either<L, R>"],["impl<S: Clone> Clone for StreamBody<S>"]]],["hyper_util",[["impl Clone for GaiResolver"],["impl Clone for Name"],["impl Clone for CaptureConnection"],["impl Clone for HttpInfo"],["impl Clone for Builder"],["impl Clone for Intercept"],["impl Clone for TokioExecutor"],["impl Clone for TokioTimer"],["impl<C: Clone> Clone for SocksV4<C>"],["impl<C: Clone> Clone for SocksV5<C>"],["impl<C: Clone> Clone for Tunnel<C>"],["impl<C: Clone, B> Clone for Client<C, B>"],["impl<E: Clone> Clone for Builder<E>"],["impl<M, Target> Clone for Singleton<M, Target>
where\n M: Service<Target> + Clone,
"],["impl<R: Clone> Clone for HttpConnector<R>"],["impl<S: Clone> Clone for TowerToHyperService<S>"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[4126,6225]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/core/cmp/trait.Eq.js b/core/target/doc/trait.impl/core/cmp/trait.Eq.js deleted file mode 100644 index f094613b..00000000 --- a/core/target/doc/trait.impl/core/cmp/trait.Eq.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["hyper_util",[["impl Eq for Name"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[306]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/core/cmp/trait.PartialEq.js b/core/target/doc/trait.impl/core/cmp/trait.PartialEq.js deleted file mode 100644 index 090c8521..00000000 --- a/core/target/doc/trait.impl/core/cmp/trait.PartialEq.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["hyper_util",[["impl PartialEq for Name"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[327]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/core/convert/trait.From.js b/core/target/doc/trait.impl/core/convert/trait.From.js deleted file mode 100644 index 7db2e27f..00000000 --- a/core/target/doc/trait.impl/core/convert/trait.From.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["http_body_util",[["impl<D> From<&'static str> for Full<D>
where\n D: Buf + From<&'static str>,
"],["impl<D> From<&'static [u8]> for Full<D>
where\n D: Buf + From<&'static [u8]>,
"],["impl<D> From<String> for Full<D>
where\n D: Buf + From<String>,
"],["impl<D> From<Vec<u8>> for Full<D>
where\n D: Buf + From<Vec<u8>>,
"],["impl<D> From<Bytes> for Full<D>
where\n D: Buf + From<Bytes>,
"],["impl<D, B> From<Cow<'static, B>> for Full<D>
where\n D: Buf + From<&'static B> + From<B::Owned>,\n B: ToOwned + ?Sized,
"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[4916]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/core/default/trait.Default.js b/core/target/doc/trait.impl/core/default/trait.Default.js deleted file mode 100644 index 5682b042..00000000 --- a/core/target/doc/trait.impl/core/default/trait.Default.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["http_body_util",[["impl<B> Default for Collected<B>"],["impl<D> Default for Empty<D>"],["impl<D> Default for Full<D>
where\n D: Buf,
"],["impl<D, E> Default for BoxBody<D, E>
where\n D: Buf + 'static,
"],["impl<D, E> Default for UnsyncBoxBody<D, E>
where\n D: Buf + 'static,
"]]],["hyper_util",[["impl Default for Builder"],["impl Default for TokioExecutor"],["impl Default for TokioTimer"],["impl Default for GracefulShutdown"],["impl<E: Default> Default for Builder<E>"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[1706,1720]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/core/error/trait.Error.js b/core/target/doc/trait.impl/core/error/trait.Error.js deleted file mode 100644 index a2f447c5..00000000 --- a/core/target/doc/trait.impl/core/error/trait.Error.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["http_body_util",[["impl Error for LengthLimitError"]]],["hyper_util",[["impl Error for InvalidNameError"],["impl Error for Error"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[311,636]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/core/fmt/trait.Debug.js b/core/target/doc/trait.impl/core/fmt/trait.Debug.js deleted file mode 100644 index cc8efa87..00000000 --- a/core/target/doc/trait.impl/core/fmt/trait.Debug.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["http_body_util",[["impl Debug for LengthLimitError"],["impl<'a, T: Debug + ?Sized> Debug for Frame<'a, T>"],["impl<B, F> Debug for MapErr<B, F>
where\n B: Debug,
"],["impl<B, F> Debug for MapFrame<B, F>
where\n B: Debug,
"],["impl<B: Debug> Debug for BodyDataStream<B>"],["impl<B: Debug> Debug for BodyStream<B>"],["impl<B: Debug> Debug for Collected<B>"],["impl<B: Debug> Debug for Limited<B>"],["impl<D> Debug for Empty<D>"],["impl<D, E> Debug for BoxBody<D, E>"],["impl<D, E> Debug for UnsyncBoxBody<D, E>"],["impl<D: Debug> Debug for Full<D>"],["impl<L: Debug, R: Debug> Debug for Either<L, R>"],["impl<S: Debug> Debug for StreamBody<S>"]]],["hyper_util",[["impl Debug for GaiAddrs"],["impl Debug for GaiFuture"],["impl Debug for GaiResolver"],["impl Debug for InvalidNameError"],["impl Debug for Name"],["impl Debug for CaptureConnection"],["impl Debug for Connected"],["impl Debug for HttpInfo"],["impl Debug for Builder"],["impl Debug for Error"],["impl Debug for ResponseFuture"],["impl Debug for Intercept"],["impl Debug for Matcher"],["impl Debug for TokioExecutor"],["impl Debug for TokioTimer"],["impl Debug for GracefulShutdown"],["impl Debug for Watcher"],["impl<C, B> Debug for Client<C, B>"],["impl<C: Debug> Debug for SocksV4<C>"],["impl<C: Debug> Debug for SocksV5<C>"],["impl<C: Debug> Debug for Tunnel<C>"],["impl<E: Debug> Debug for Builder<E>"],["impl<I: Debug> Debug for WithHyperIo<I>"],["impl<I: Debug> Debug for WithTokioIo<I>"],["impl<M, Dst: Debug> Debug for Singleton<M, Dst>
where\n M: Service<Dst> + Debug,\n M::Response: Debug,
"],["impl<R: Debug> Debug for HttpConnector<R>"],["impl<S: Debug> Debug for TowerToHyperService<S>"],["impl<T: Debug> Debug for TokioIo<T>"],["impl<T: Debug> Debug for Parts<T>"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[5777,10745]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/core/fmt/trait.Display.js b/core/target/doc/trait.impl/core/fmt/trait.Display.js deleted file mode 100644 index c4d55e2a..00000000 --- a/core/target/doc/trait.impl/core/fmt/trait.Display.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["http_body_util",[["impl Display for LengthLimitError"]]],["hyper_util",[["impl Display for InvalidNameError"],["impl Display for Name"],["impl Display for Error"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[313,945]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/core/future/future/trait.Future.js b/core/target/doc/trait.impl/core/future/future/trait.Future.js deleted file mode 100644 index 4fa35efd..00000000 --- a/core/target/doc/trait.impl/core/future/future/trait.Future.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["http_body_util",[["impl<T: Body + Unpin + ?Sized> Future for Frame<'_, T>"],["impl<T: Body + ?Sized> Future for Collect<T>"]]],["hyper_util",[["impl Future for GaiFuture"],["impl Future for ResponseFuture"],["impl<I, S, E, B> Future for Connection<'_, I, S, E>
where\n S: Service<Request<Incoming>, Response = Response<B>>,\n S::Future: 'static,\n S::Error: Into<Box<dyn StdError + Send + Sync>>,\n B: Body + 'static,\n B::Error: Into<Box<dyn StdError + Send + Sync>>,\n I: Read + Write + Unpin + 'static,\n E: HttpServerConnExec<S::Future, B>,
"],["impl<I, S, E, B> Future for UpgradeableConnection<'_, I, S, E>
where\n S: Service<Request<Incoming>, Response = Response<B>>,\n S::Future: 'static,\n S::Error: Into<Box<dyn StdError + Send + Sync>>,\n B: Body + 'static,\n B::Error: Into<Box<dyn StdError + Send + Sync>>,\n I: Read + Write + Unpin + Send + 'static,\n E: HttpServerConnExec<S::Future, B>,
"],["impl<S, R> Future for TowerToHyperServiceFuture<S, R>
where\n S: Service<R>,
"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[1100,5901]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/core/hash/trait.Hash.js b/core/target/doc/trait.impl/core/hash/trait.Hash.js deleted file mode 100644 index 0303af94..00000000 --- a/core/target/doc/trait.impl/core/hash/trait.Hash.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["hyper_util",[["impl Hash for Name"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[314]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/core/iter/traits/iterator/trait.Iterator.js b/core/target/doc/trait.impl/core/iter/traits/iterator/trait.Iterator.js deleted file mode 100644 index a72ef5b1..00000000 --- a/core/target/doc/trait.impl/core/iter/traits/iterator/trait.Iterator.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["hyper_util",[["impl Iterator for GaiAddrs"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[372]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/core/marker/trait.Copy.js b/core/target/doc/trait.impl/core/marker/trait.Copy.js deleted file mode 100644 index c7a036ee..00000000 --- a/core/target/doc/trait.impl/core/marker/trait.Copy.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["http_body_util",[["impl<B: Copy> Copy for BodyDataStream<B>"],["impl<B: Copy> Copy for BodyStream<B>"],["impl<B: Copy> Copy for Limited<B>"],["impl<B: Copy, F: Copy> Copy for MapErr<B, F>"],["impl<B: Copy, F: Copy> Copy for MapFrame<B, F>"],["impl<D> Copy for Empty<D>"],["impl<D: Copy> Copy for Full<D>"],["impl<L: Copy, R: Copy> Copy for Either<L, R>"],["impl<S: Copy> Copy for StreamBody<S>"]]],["hyper_util",[["impl<S: Copy> Copy for TowerToHyperService<S>"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[4106,477]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/core/marker/trait.Freeze.js b/core/target/doc/trait.impl/core/marker/trait.Freeze.js deleted file mode 100644 index 22e66778..00000000 --- a/core/target/doc/trait.impl/core/marker/trait.Freeze.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["http_body_util",[["impl Freeze for LengthLimitError",1,["http_body_util::limited::LengthLimitError"]],["impl<'a, T> Freeze for Frame<'a, T>
where\n T: ?Sized,
",1,["http_body_util::combinators::frame::Frame"]],["impl<B> Freeze for BodyDataStream<B>
where\n B: Freeze,
",1,["http_body_util::stream::BodyDataStream"]],["impl<B> Freeze for BodyStream<B>
where\n B: Freeze,
",1,["http_body_util::stream::BodyStream"]],["impl<B> Freeze for Collected<B>",1,["http_body_util::collected::Collected"]],["impl<B> Freeze for Limited<B>
where\n B: Freeze,
",1,["http_body_util::limited::Limited"]],["impl<B, F> Freeze for MapErr<B, F>
where\n B: Freeze,\n F: Freeze,
",1,["http_body_util::combinators::map_err::MapErr"]],["impl<B, F> Freeze for MapFrame<B, F>
where\n B: Freeze,\n F: Freeze,
",1,["http_body_util::combinators::map_frame::MapFrame"]],["impl<D> Freeze for Empty<D>",1,["http_body_util::empty::Empty"]],["impl<D> Freeze for Full<D>
where\n D: Freeze,
",1,["http_body_util::full::Full"]],["impl<D, E> Freeze for BoxBody<D, E>",1,["http_body_util::combinators::box_body::BoxBody"]],["impl<D, E> Freeze for UnsyncBoxBody<D, E>",1,["http_body_util::combinators::box_body::UnsyncBoxBody"]],["impl<L, R> Freeze for Either<L, R>
where\n L: Freeze,\n R: Freeze,
",1,["http_body_util::either::Either"]],["impl<S> Freeze for StreamBody<S>
where\n S: Freeze,
",1,["http_body_util::stream::StreamBody"]],["impl<T> Freeze for Collect<T>
where\n T: Freeze + ?Sized,
",1,["http_body_util::combinators::collect::Collect"]],["impl<T, F> Freeze for WithTrailers<T, F>
where\n T: Freeze,\n F: Freeze,
",1,["http_body_util::combinators::with_trailers::WithTrailers"]]]],["hyper_util",[["impl !Freeze for Intercept",1,["hyper_util::client::proxy::matcher::Intercept"]],["impl !Freeze for Matcher",1,["hyper_util::client::proxy::matcher::Matcher"]],["impl Freeze for GaiAddrs",1,["hyper_util::client::legacy::connect::dns::GaiAddrs"]],["impl Freeze for GaiFuture",1,["hyper_util::client::legacy::connect::dns::GaiFuture"]],["impl Freeze for GaiResolver",1,["hyper_util::client::legacy::connect::dns::GaiResolver"]],["impl Freeze for InvalidNameError",1,["hyper_util::client::legacy::connect::dns::InvalidNameError"]],["impl Freeze for Name",1,["hyper_util::client::legacy::connect::dns::Name"]],["impl Freeze for CaptureConnection",1,["hyper_util::client::legacy::connect::capture::CaptureConnection"]],["impl Freeze for Connected",1,["hyper_util::client::legacy::connect::Connected"]],["impl Freeze for HttpInfo",1,["hyper_util::client::legacy::connect::http::HttpInfo"]],["impl Freeze for Builder",1,["hyper_util::client::legacy::client::Builder"]],["impl Freeze for Error",1,["hyper_util::client::legacy::client::Error"]],["impl Freeze for ResponseFuture",1,["hyper_util::client::legacy::client::ResponseFuture"]],["impl Freeze for Builder",1,["hyper_util::client::proxy::matcher::Builder"]],["impl Freeze for TokioExecutor",1,["hyper_util::rt::tokio::TokioExecutor"]],["impl Freeze for TokioTimer",1,["hyper_util::rt::tokio::TokioTimer"]],["impl Freeze for GracefulShutdown",1,["hyper_util::server::graceful::GracefulShutdown"]],["impl Freeze for Watcher",1,["hyper_util::server::graceful::Watcher"]],["impl<'a, E> Freeze for Http1Builder<'a, E>",1,["hyper_util::server::conn::auto::Http1Builder"]],["impl<'a, E> Freeze for Http2Builder<'a, E>",1,["hyper_util::server::conn::auto::Http2Builder"]],["impl<'a, I, S, E> !Freeze for Connection<'a, I, S, E>",1,["hyper_util::server::conn::auto::Connection"]],["impl<'a, I, S, E> !Freeze for UpgradeableConnection<'a, I, S, E>",1,["hyper_util::server::conn::auto::UpgradeableConnection"]],["impl<C> !Freeze for SocksV4<C>",1,["hyper_util::client::legacy::connect::proxy::socks::v4::SocksV4"]],["impl<C> !Freeze for SocksV5<C>",1,["hyper_util::client::legacy::connect::proxy::socks::v5::SocksV5"]],["impl<C> !Freeze for Tunnel<C>",1,["hyper_util::client::legacy::connect::proxy::tunnel::Tunnel"]],["impl<C, B> Freeze for Client<C, B>
where\n C: Freeze,
",1,["hyper_util::client::legacy::client::Client"]],["impl<E> Freeze for Builder<E>
where\n E: Freeze,
",1,["hyper_util::server::conn::auto::Builder"]],["impl<I> Freeze for WithHyperIo<I>
where\n I: Freeze,
",1,["hyper_util::rt::tokio::with_hyper_io::WithHyperIo"]],["impl<I> Freeze for WithTokioIo<I>
where\n I: Freeze,
",1,["hyper_util::rt::tokio::with_tokio_io::WithTokioIo"]],["impl<M, Dst> Freeze for Singleton<M, Dst>
where\n M: Freeze,
",1,["hyper_util::client::pool::singleton::Singleton"]],["impl<R> Freeze for HttpConnector<R>
where\n R: Freeze,
",1,["hyper_util::client::legacy::connect::http::HttpConnector"]],["impl<S> Freeze for TowerToHyperService<S>
where\n S: Freeze,
",1,["hyper_util::service::glue::TowerToHyperService"]],["impl<S, R> Freeze for TowerToHyperServiceFuture<S, R>
where\n S: Freeze,\n <S as Service<R>>::Future: Freeze,\n R: Freeze,
",1,["hyper_util::service::glue::TowerToHyperServiceFuture"]],["impl<T> !Freeze for Parts<T>",1,["hyper_util::server::conn::auto::upgrade::Parts"]],["impl<T> Freeze for TokioIo<T>
where\n T: Freeze,
",1,["hyper_util::rt::tokio::TokioIo"]],["impl<T, Req> Freeze for Map<T, Req>
where\n T: Freeze,
",1,["hyper_util::client::pool::map::Map"]]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[8340,15680]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/core/marker/trait.Send.js b/core/target/doc/trait.impl/core/marker/trait.Send.js deleted file mode 100644 index 34ebb7e8..00000000 --- a/core/target/doc/trait.impl/core/marker/trait.Send.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["http_body_util",[["impl Send for LengthLimitError",1,["http_body_util::limited::LengthLimitError"]],["impl<'a, T> Send for Frame<'a, T>
where\n T: Send + ?Sized,
",1,["http_body_util::combinators::frame::Frame"]],["impl<B> Send for BodyDataStream<B>
where\n B: Send,
",1,["http_body_util::stream::BodyDataStream"]],["impl<B> Send for BodyStream<B>
where\n B: Send,
",1,["http_body_util::stream::BodyStream"]],["impl<B> Send for Collected<B>
where\n B: Send,
",1,["http_body_util::collected::Collected"]],["impl<B> Send for Limited<B>
where\n B: Send,
",1,["http_body_util::limited::Limited"]],["impl<B, F> Send for MapErr<B, F>
where\n B: Send,\n F: Send,
",1,["http_body_util::combinators::map_err::MapErr"]],["impl<B, F> Send for MapFrame<B, F>
where\n B: Send,\n F: Send,
",1,["http_body_util::combinators::map_frame::MapFrame"]],["impl<D> Send for Empty<D>",1,["http_body_util::empty::Empty"]],["impl<D> Send for Full<D>
where\n D: Send,
",1,["http_body_util::full::Full"]],["impl<D, E> Send for BoxBody<D, E>",1,["http_body_util::combinators::box_body::BoxBody"]],["impl<D, E> Send for UnsyncBoxBody<D, E>",1,["http_body_util::combinators::box_body::UnsyncBoxBody"]],["impl<L, R> Send for Either<L, R>
where\n L: Send,\n R: Send,
",1,["http_body_util::either::Either"]],["impl<S> Send for StreamBody<S>
where\n S: Send,
",1,["http_body_util::stream::StreamBody"]],["impl<T> Send for Collect<T>
where\n T: Send + ?Sized,\n <T as Body>::Data: Send,
",1,["http_body_util::combinators::collect::Collect"]],["impl<T, F> Send for WithTrailers<T, F>
where\n T: Send,\n F: Send,
",1,["http_body_util::combinators::with_trailers::WithTrailers"]]]],["hyper_util",[["impl Send for GaiAddrs",1,["hyper_util::client::legacy::connect::dns::GaiAddrs"]],["impl Send for GaiFuture",1,["hyper_util::client::legacy::connect::dns::GaiFuture"]],["impl Send for GaiResolver",1,["hyper_util::client::legacy::connect::dns::GaiResolver"]],["impl Send for InvalidNameError",1,["hyper_util::client::legacy::connect::dns::InvalidNameError"]],["impl Send for Name",1,["hyper_util::client::legacy::connect::dns::Name"]],["impl Send for CaptureConnection",1,["hyper_util::client::legacy::connect::capture::CaptureConnection"]],["impl Send for Connected",1,["hyper_util::client::legacy::connect::Connected"]],["impl Send for HttpInfo",1,["hyper_util::client::legacy::connect::http::HttpInfo"]],["impl Send for Builder",1,["hyper_util::client::legacy::client::Builder"]],["impl Send for Error",1,["hyper_util::client::legacy::client::Error"]],["impl Send for ResponseFuture",1,["hyper_util::client::legacy::client::ResponseFuture"]],["impl Send for Builder",1,["hyper_util::client::proxy::matcher::Builder"]],["impl Send for Intercept",1,["hyper_util::client::proxy::matcher::Intercept"]],["impl Send for Matcher",1,["hyper_util::client::proxy::matcher::Matcher"]],["impl Send for TokioExecutor",1,["hyper_util::rt::tokio::TokioExecutor"]],["impl Send for TokioTimer",1,["hyper_util::rt::tokio::TokioTimer"]],["impl Send for GracefulShutdown",1,["hyper_util::server::graceful::GracefulShutdown"]],["impl Send for Watcher",1,["hyper_util::server::graceful::Watcher"]],["impl<'a, E> Send for Http1Builder<'a, E>
where\n E: Send,
",1,["hyper_util::server::conn::auto::Http1Builder"]],["impl<'a, E> Send for Http2Builder<'a, E>
where\n E: Send,
",1,["hyper_util::server::conn::auto::Http2Builder"]],["impl<'a, I, S, E> Send for Connection<'a, I, S, E>
where\n S: Send,\n I: Send,\n E: Send + Sync,\n <S as HttpService<Incoming>>::ResBody: Send,\n <S as HttpService<Incoming>>::Future: Send,\n <<S as HttpService<Incoming>>::ResBody as Body>::Data: Send,
",1,["hyper_util::server::conn::auto::Connection"]],["impl<'a, I, S, E> Send for UpgradeableConnection<'a, I, S, E>
where\n S: Send,\n I: Send,\n E: Send + Sync,\n <S as HttpService<Incoming>>::ResBody: Send,\n <S as HttpService<Incoming>>::Future: Send,\n <<S as HttpService<Incoming>>::ResBody as Body>::Data: Send,
",1,["hyper_util::server::conn::auto::UpgradeableConnection"]],["impl<C> Send for SocksV4<C>
where\n C: Send,
",1,["hyper_util::client::legacy::connect::proxy::socks::v4::SocksV4"]],["impl<C> Send for SocksV5<C>
where\n C: Send,
",1,["hyper_util::client::legacy::connect::proxy::socks::v5::SocksV5"]],["impl<C> Send for Tunnel<C>
where\n C: Send,
",1,["hyper_util::client::legacy::connect::proxy::tunnel::Tunnel"]],["impl<C, B> Send for Client<C, B>
where\n C: Send,\n B: Send,
",1,["hyper_util::client::legacy::client::Client"]],["impl<E> Send for Builder<E>
where\n E: Send,
",1,["hyper_util::server::conn::auto::Builder"]],["impl<I> Send for WithHyperIo<I>
where\n I: Send,
",1,["hyper_util::rt::tokio::with_hyper_io::WithHyperIo"]],["impl<I> Send for WithTokioIo<I>
where\n I: Send,
",1,["hyper_util::rt::tokio::with_tokio_io::WithTokioIo"]],["impl<M, Dst> Send for Singleton<M, Dst>
where\n M: Send,\n <M as Service<Dst>>::Response: Send,
",1,["hyper_util::client::pool::singleton::Singleton"]],["impl<R> Send for HttpConnector<R>
where\n R: Send,
",1,["hyper_util::client::legacy::connect::http::HttpConnector"]],["impl<S> Send for TowerToHyperService<S>
where\n S: Send,
",1,["hyper_util::service::glue::TowerToHyperService"]],["impl<S, R> Send for TowerToHyperServiceFuture<S, R>
where\n S: Send,\n <S as Service<R>>::Future: Send,\n R: Send,
",1,["hyper_util::service::glue::TowerToHyperServiceFuture"]],["impl<T> Send for TokioIo<T>
where\n T: Send,
",1,["hyper_util::rt::tokio::TokioIo"]],["impl<T> Send for Parts<T>
where\n T: Send,
",1,["hyper_util::server::conn::auto::upgrade::Parts"]],["impl<T, Req> Send for Map<T, Req>
where\n T: Send,\n <T as Target<Req>>::Key: Send,\n <T as Target<Req>>::Service: Send,
",1,["hyper_util::client::pool::map::Map"]]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[8633,19476]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/core/marker/trait.StructuralPartialEq.js b/core/target/doc/trait.impl/core/marker/trait.StructuralPartialEq.js deleted file mode 100644 index f646a209..00000000 --- a/core/target/doc/trait.impl/core/marker/trait.StructuralPartialEq.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["hyper_util",[["impl StructuralPartialEq for Name"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[363]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/core/marker/trait.Sync.js b/core/target/doc/trait.impl/core/marker/trait.Sync.js deleted file mode 100644 index b9fb7387..00000000 --- a/core/target/doc/trait.impl/core/marker/trait.Sync.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["http_body_util",[["impl Sync for LengthLimitError",1,["http_body_util::limited::LengthLimitError"]],["impl<'a, T> Sync for Frame<'a, T>
where\n T: Sync + ?Sized,
",1,["http_body_util::combinators::frame::Frame"]],["impl<B> Sync for BodyDataStream<B>
where\n B: Sync,
",1,["http_body_util::stream::BodyDataStream"]],["impl<B> Sync for BodyStream<B>
where\n B: Sync,
",1,["http_body_util::stream::BodyStream"]],["impl<B> Sync for Collected<B>
where\n B: Sync,
",1,["http_body_util::collected::Collected"]],["impl<B> Sync for Limited<B>
where\n B: Sync,
",1,["http_body_util::limited::Limited"]],["impl<B, F> Sync for MapErr<B, F>
where\n B: Sync,\n F: Sync,
",1,["http_body_util::combinators::map_err::MapErr"]],["impl<B, F> Sync for MapFrame<B, F>
where\n B: Sync,\n F: Sync,
",1,["http_body_util::combinators::map_frame::MapFrame"]],["impl<D> Sync for Empty<D>",1,["http_body_util::empty::Empty"]],["impl<D> Sync for Full<D>
where\n D: Sync,
",1,["http_body_util::full::Full"]],["impl<D, E> !Sync for UnsyncBoxBody<D, E>",1,["http_body_util::combinators::box_body::UnsyncBoxBody"]],["impl<D, E> Sync for BoxBody<D, E>",1,["http_body_util::combinators::box_body::BoxBody"]],["impl<L, R> Sync for Either<L, R>
where\n L: Sync,\n R: Sync,
",1,["http_body_util::either::Either"]],["impl<S> Sync for StreamBody<S>
where\n S: Sync,
",1,["http_body_util::stream::StreamBody"]],["impl<T> Sync for Collect<T>
where\n T: Sync + ?Sized,\n <T as Body>::Data: Sync,
",1,["http_body_util::combinators::collect::Collect"]],["impl<T, F> Sync for WithTrailers<T, F>
where\n T: Sync,\n F: Sync,
",1,["http_body_util::combinators::with_trailers::WithTrailers"]]]],["hyper_util",[["impl Sync for GaiAddrs",1,["hyper_util::client::legacy::connect::dns::GaiAddrs"]],["impl Sync for GaiFuture",1,["hyper_util::client::legacy::connect::dns::GaiFuture"]],["impl Sync for GaiResolver",1,["hyper_util::client::legacy::connect::dns::GaiResolver"]],["impl Sync for InvalidNameError",1,["hyper_util::client::legacy::connect::dns::InvalidNameError"]],["impl Sync for Name",1,["hyper_util::client::legacy::connect::dns::Name"]],["impl Sync for CaptureConnection",1,["hyper_util::client::legacy::connect::capture::CaptureConnection"]],["impl Sync for Connected",1,["hyper_util::client::legacy::connect::Connected"]],["impl Sync for HttpInfo",1,["hyper_util::client::legacy::connect::http::HttpInfo"]],["impl Sync for Builder",1,["hyper_util::client::legacy::client::Builder"]],["impl Sync for Error",1,["hyper_util::client::legacy::client::Error"]],["impl Sync for ResponseFuture",1,["hyper_util::client::legacy::client::ResponseFuture"]],["impl Sync for Builder",1,["hyper_util::client::proxy::matcher::Builder"]],["impl Sync for Intercept",1,["hyper_util::client::proxy::matcher::Intercept"]],["impl Sync for Matcher",1,["hyper_util::client::proxy::matcher::Matcher"]],["impl Sync for TokioExecutor",1,["hyper_util::rt::tokio::TokioExecutor"]],["impl Sync for TokioTimer",1,["hyper_util::rt::tokio::TokioTimer"]],["impl Sync for GracefulShutdown",1,["hyper_util::server::graceful::GracefulShutdown"]],["impl Sync for Watcher",1,["hyper_util::server::graceful::Watcher"]],["impl<'a, E> Sync for Http1Builder<'a, E>
where\n E: Sync,
",1,["hyper_util::server::conn::auto::Http1Builder"]],["impl<'a, E> Sync for Http2Builder<'a, E>
where\n E: Sync,
",1,["hyper_util::server::conn::auto::Http2Builder"]],["impl<'a, I, S, E> Sync for Connection<'a, I, S, E>
where\n S: Sync,\n I: Sync,\n E: Sync,\n <S as HttpService<Incoming>>::ResBody: Sync,\n <S as HttpService<Incoming>>::Future: Sync,\n <<S as HttpService<Incoming>>::ResBody as Body>::Data: Sync + Send,
",1,["hyper_util::server::conn::auto::Connection"]],["impl<'a, I, S, E> Sync for UpgradeableConnection<'a, I, S, E>
where\n S: Sync,\n I: Sync,\n E: Sync,\n <S as HttpService<Incoming>>::ResBody: Sync,\n <S as HttpService<Incoming>>::Future: Sync,\n <<S as HttpService<Incoming>>::ResBody as Body>::Data: Sync + Send,
",1,["hyper_util::server::conn::auto::UpgradeableConnection"]],["impl<C> Sync for SocksV4<C>
where\n C: Sync,
",1,["hyper_util::client::legacy::connect::proxy::socks::v4::SocksV4"]],["impl<C> Sync for SocksV5<C>
where\n C: Sync,
",1,["hyper_util::client::legacy::connect::proxy::socks::v5::SocksV5"]],["impl<C> Sync for Tunnel<C>
where\n C: Sync,
",1,["hyper_util::client::legacy::connect::proxy::tunnel::Tunnel"]],["impl<C, B> Sync for Client<C, B>
where\n C: Sync,\n B: Send,
",1,["hyper_util::client::legacy::client::Client"]],["impl<E> Sync for Builder<E>
where\n E: Sync,
",1,["hyper_util::server::conn::auto::Builder"]],["impl<I> Sync for WithHyperIo<I>
where\n I: Sync,
",1,["hyper_util::rt::tokio::with_hyper_io::WithHyperIo"]],["impl<I> Sync for WithTokioIo<I>
where\n I: Sync,
",1,["hyper_util::rt::tokio::with_tokio_io::WithTokioIo"]],["impl<M, Dst> Sync for Singleton<M, Dst>
where\n M: Sync,\n <M as Service<Dst>>::Response: Send,
",1,["hyper_util::client::pool::singleton::Singleton"]],["impl<R> Sync for HttpConnector<R>
where\n R: Sync,
",1,["hyper_util::client::legacy::connect::http::HttpConnector"]],["impl<S> Sync for TowerToHyperService<S>
where\n S: Sync,
",1,["hyper_util::service::glue::TowerToHyperService"]],["impl<S, R> Sync for TowerToHyperServiceFuture<S, R>
where\n S: Sync,\n <S as Service<R>>::Future: Sync,\n R: Sync,
",1,["hyper_util::service::glue::TowerToHyperServiceFuture"]],["impl<T> Sync for TokioIo<T>
where\n T: Sync,
",1,["hyper_util::rt::tokio::TokioIo"]],["impl<T> Sync for Parts<T>
where\n T: Sync,
",1,["hyper_util::server::conn::auto::upgrade::Parts"]],["impl<T, Req> Sync for Map<T, Req>
where\n T: Sync,\n <T as Target<Req>>::Key: Sync,\n <T as Target<Req>>::Service: Sync,
",1,["hyper_util::client::pool::map::Map"]]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[8634,19476]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/core/marker/trait.Unpin.js b/core/target/doc/trait.impl/core/marker/trait.Unpin.js deleted file mode 100644 index da55fb77..00000000 --- a/core/target/doc/trait.impl/core/marker/trait.Unpin.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["http_body_util",[["impl Unpin for LengthLimitError",1,["http_body_util::limited::LengthLimitError"]],["impl<'__pin, B> Unpin for BodyDataStream<B>
where\n PinnedFieldsOf<__Origin<'__pin, B>>: Unpin,
"],["impl<'__pin, B> Unpin for BodyStream<B>
where\n PinnedFieldsOf<__Origin<'__pin, B>>: Unpin,
"],["impl<'__pin, B> Unpin for Limited<B>
where\n PinnedFieldsOf<__Origin<'__pin, B>>: Unpin,
"],["impl<'__pin, B, F> Unpin for MapErr<B, F>
where\n PinnedFieldsOf<__Origin<'__pin, B, F>>: Unpin,
"],["impl<'__pin, B, F> Unpin for MapFrame<B, F>
where\n PinnedFieldsOf<__Origin<'__pin, B, F>>: Unpin,
"],["impl<'__pin, D> Unpin for Full<D>
where\n PinnedFieldsOf<__Origin<'__pin, D>>: Unpin,
"],["impl<'__pin, L, R> Unpin for Either<L, R>
where\n __Origin<'__pin, L, R>: Unpin,
"],["impl<'__pin, S> Unpin for StreamBody<S>
where\n PinnedFieldsOf<__Origin<'__pin, S>>: Unpin,
"],["impl<'__pin, T> Unpin for Collect<T>
where\n PinnedFieldsOf<__Origin<'__pin, T>>: Unpin,\n T: Body + ?Sized,
"],["impl<'__pin, T, F> Unpin for WithTrailers<T, F>
where\n PinnedFieldsOf<__Origin<'__pin, T, F>>: Unpin,
"],["impl<'a, T> Unpin for Frame<'a, T>
where\n T: ?Sized,
",1,["http_body_util::combinators::frame::Frame"]],["impl<B> Unpin for Collected<B>"],["impl<D> Unpin for Empty<D>",1,["http_body_util::empty::Empty"]],["impl<D, E> Unpin for BoxBody<D, E>",1,["http_body_util::combinators::box_body::BoxBody"]],["impl<D, E> Unpin for UnsyncBoxBody<D, E>",1,["http_body_util::combinators::box_body::UnsyncBoxBody"]]]],["hyper_util",[["impl Unpin for GaiAddrs",1,["hyper_util::client::legacy::connect::dns::GaiAddrs"]],["impl Unpin for GaiFuture",1,["hyper_util::client::legacy::connect::dns::GaiFuture"]],["impl Unpin for GaiResolver",1,["hyper_util::client::legacy::connect::dns::GaiResolver"]],["impl Unpin for InvalidNameError",1,["hyper_util::client::legacy::connect::dns::InvalidNameError"]],["impl Unpin for Name",1,["hyper_util::client::legacy::connect::dns::Name"]],["impl Unpin for CaptureConnection",1,["hyper_util::client::legacy::connect::capture::CaptureConnection"]],["impl Unpin for Connected",1,["hyper_util::client::legacy::connect::Connected"]],["impl Unpin for HttpInfo",1,["hyper_util::client::legacy::connect::http::HttpInfo"]],["impl Unpin for Builder",1,["hyper_util::client::legacy::client::Builder"]],["impl Unpin for Error",1,["hyper_util::client::legacy::client::Error"]],["impl Unpin for ResponseFuture",1,["hyper_util::client::legacy::client::ResponseFuture"]],["impl Unpin for Builder",1,["hyper_util::client::proxy::matcher::Builder"]],["impl Unpin for Intercept",1,["hyper_util::client::proxy::matcher::Intercept"]],["impl Unpin for Matcher",1,["hyper_util::client::proxy::matcher::Matcher"]],["impl Unpin for TokioExecutor",1,["hyper_util::rt::tokio::TokioExecutor"]],["impl Unpin for TokioTimer",1,["hyper_util::rt::tokio::TokioTimer"]],["impl Unpin for GracefulShutdown",1,["hyper_util::server::graceful::GracefulShutdown"]],["impl Unpin for Watcher",1,["hyper_util::server::graceful::Watcher"]],["impl<'__pin, 'a, I, S, E> Unpin for Connection<'a, I, S, E>
where\n PinnedFieldsOf<__Origin<'__pin, 'a, I, S, E>>: Unpin,\n S: HttpService<Incoming>,
"],["impl<'__pin, 'a, I, S, E> Unpin for UpgradeableConnection<'a, I, S, E>
where\n PinnedFieldsOf<__Origin<'__pin, 'a, I, S, E>>: Unpin,\n S: HttpService<Incoming>,
"],["impl<'__pin, I> Unpin for WithHyperIo<I>
where\n PinnedFieldsOf<__Origin<'__pin, I>>: Unpin,
"],["impl<'__pin, I> Unpin for WithTokioIo<I>
where\n PinnedFieldsOf<__Origin<'__pin, I>>: Unpin,
"],["impl<'__pin, S, R> Unpin for TowerToHyperServiceFuture<S, R>
where\n PinnedFieldsOf<__Origin<'__pin, S, R>>: Unpin,\n S: Service<R>,
"],["impl<'__pin, T> Unpin for TokioIo<T>
where\n PinnedFieldsOf<__Origin<'__pin, T>>: Unpin,
"],["impl<'a, E> Unpin for Http1Builder<'a, E>",1,["hyper_util::server::conn::auto::Http1Builder"]],["impl<'a, E> Unpin for Http2Builder<'a, E>",1,["hyper_util::server::conn::auto::Http2Builder"]],["impl<C> Unpin for SocksV4<C>
where\n C: Unpin,
",1,["hyper_util::client::legacy::connect::proxy::socks::v4::SocksV4"]],["impl<C> Unpin for SocksV5<C>
where\n C: Unpin,
",1,["hyper_util::client::legacy::connect::proxy::socks::v5::SocksV5"]],["impl<C> Unpin for Tunnel<C>
where\n C: Unpin,
",1,["hyper_util::client::legacy::connect::proxy::tunnel::Tunnel"]],["impl<C, B> Unpin for Client<C, B>
where\n C: Unpin,
",1,["hyper_util::client::legacy::client::Client"]],["impl<E> Unpin for Builder<E>
where\n E: Unpin,
",1,["hyper_util::server::conn::auto::Builder"]],["impl<M, Dst> Unpin for Singleton<M, Dst>
where\n M: Unpin,
",1,["hyper_util::client::pool::singleton::Singleton"]],["impl<R> Unpin for HttpConnector<R>
where\n R: Unpin,
",1,["hyper_util::client::legacy::connect::http::HttpConnector"]],["impl<S> Unpin for TowerToHyperService<S>
where\n S: Unpin,
",1,["hyper_util::service::glue::TowerToHyperService"]],["impl<T> Unpin for Parts<T>
where\n T: Unpin,
",1,["hyper_util::server::conn::auto::upgrade::Parts"]],["impl<T, Req> Unpin for Map<T, Req>
where\n T: Unpin,\n <T as Target<Req>>::Key: Unpin,\n <T as Target<Req>>::Service: Unpin,
",1,["hyper_util::client::pool::map::Map"]]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[7714,16756]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/core/marker/trait.UnsafeUnpin.js b/core/target/doc/trait.impl/core/marker/trait.UnsafeUnpin.js deleted file mode 100644 index a98161c1..00000000 --- a/core/target/doc/trait.impl/core/marker/trait.UnsafeUnpin.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["http_body_util",[["impl UnsafeUnpin for LengthLimitError",1,["http_body_util::limited::LengthLimitError"]],["impl<'a, T> UnsafeUnpin for Frame<'a, T>
where\n T: ?Sized,
",1,["http_body_util::combinators::frame::Frame"]],["impl<B> UnsafeUnpin for BodyDataStream<B>
where\n B: UnsafeUnpin,
",1,["http_body_util::stream::BodyDataStream"]],["impl<B> UnsafeUnpin for BodyStream<B>
where\n B: UnsafeUnpin,
",1,["http_body_util::stream::BodyStream"]],["impl<B> UnsafeUnpin for Collected<B>",1,["http_body_util::collected::Collected"]],["impl<B> UnsafeUnpin for Limited<B>
where\n B: UnsafeUnpin,
",1,["http_body_util::limited::Limited"]],["impl<B, F> UnsafeUnpin for MapErr<B, F>
where\n B: UnsafeUnpin,\n F: UnsafeUnpin,
",1,["http_body_util::combinators::map_err::MapErr"]],["impl<B, F> UnsafeUnpin for MapFrame<B, F>
where\n B: UnsafeUnpin,\n F: UnsafeUnpin,
",1,["http_body_util::combinators::map_frame::MapFrame"]],["impl<D> UnsafeUnpin for Empty<D>",1,["http_body_util::empty::Empty"]],["impl<D> UnsafeUnpin for Full<D>
where\n D: UnsafeUnpin,
",1,["http_body_util::full::Full"]],["impl<D, E> UnsafeUnpin for BoxBody<D, E>",1,["http_body_util::combinators::box_body::BoxBody"]],["impl<D, E> UnsafeUnpin for UnsyncBoxBody<D, E>",1,["http_body_util::combinators::box_body::UnsyncBoxBody"]],["impl<L, R> UnsafeUnpin for Either<L, R>
where\n L: UnsafeUnpin,\n R: UnsafeUnpin,
",1,["http_body_util::either::Either"]],["impl<S> UnsafeUnpin for StreamBody<S>
where\n S: UnsafeUnpin,
",1,["http_body_util::stream::StreamBody"]],["impl<T> UnsafeUnpin for Collect<T>
where\n T: UnsafeUnpin + ?Sized,
",1,["http_body_util::combinators::collect::Collect"]],["impl<T, F> UnsafeUnpin for WithTrailers<T, F>
where\n T: UnsafeUnpin,\n F: UnsafeUnpin,
",1,["http_body_util::combinators::with_trailers::WithTrailers"]]]],["hyper_util",[["impl UnsafeUnpin for GaiAddrs",1,["hyper_util::client::legacy::connect::dns::GaiAddrs"]],["impl UnsafeUnpin for GaiFuture",1,["hyper_util::client::legacy::connect::dns::GaiFuture"]],["impl UnsafeUnpin for GaiResolver",1,["hyper_util::client::legacy::connect::dns::GaiResolver"]],["impl UnsafeUnpin for InvalidNameError",1,["hyper_util::client::legacy::connect::dns::InvalidNameError"]],["impl UnsafeUnpin for Name",1,["hyper_util::client::legacy::connect::dns::Name"]],["impl UnsafeUnpin for CaptureConnection",1,["hyper_util::client::legacy::connect::capture::CaptureConnection"]],["impl UnsafeUnpin for Connected",1,["hyper_util::client::legacy::connect::Connected"]],["impl UnsafeUnpin for HttpInfo",1,["hyper_util::client::legacy::connect::http::HttpInfo"]],["impl UnsafeUnpin for Builder",1,["hyper_util::client::legacy::client::Builder"]],["impl UnsafeUnpin for Error",1,["hyper_util::client::legacy::client::Error"]],["impl UnsafeUnpin for ResponseFuture",1,["hyper_util::client::legacy::client::ResponseFuture"]],["impl UnsafeUnpin for Builder",1,["hyper_util::client::proxy::matcher::Builder"]],["impl UnsafeUnpin for Intercept",1,["hyper_util::client::proxy::matcher::Intercept"]],["impl UnsafeUnpin for Matcher",1,["hyper_util::client::proxy::matcher::Matcher"]],["impl UnsafeUnpin for TokioExecutor",1,["hyper_util::rt::tokio::TokioExecutor"]],["impl UnsafeUnpin for TokioTimer",1,["hyper_util::rt::tokio::TokioTimer"]],["impl UnsafeUnpin for GracefulShutdown",1,["hyper_util::server::graceful::GracefulShutdown"]],["impl UnsafeUnpin for Watcher",1,["hyper_util::server::graceful::Watcher"]],["impl<'a, E> UnsafeUnpin for Http1Builder<'a, E>",1,["hyper_util::server::conn::auto::Http1Builder"]],["impl<'a, E> UnsafeUnpin for Http2Builder<'a, E>",1,["hyper_util::server::conn::auto::Http2Builder"]],["impl<'a, I, S, E> !UnsafeUnpin for Connection<'a, I, S, E>",1,["hyper_util::server::conn::auto::Connection"]],["impl<'a, I, S, E> !UnsafeUnpin for UpgradeableConnection<'a, I, S, E>",1,["hyper_util::server::conn::auto::UpgradeableConnection"]],["impl<C> UnsafeUnpin for SocksV4<C>
where\n C: UnsafeUnpin,
",1,["hyper_util::client::legacy::connect::proxy::socks::v4::SocksV4"]],["impl<C> UnsafeUnpin for SocksV5<C>
where\n C: UnsafeUnpin,
",1,["hyper_util::client::legacy::connect::proxy::socks::v5::SocksV5"]],["impl<C> UnsafeUnpin for Tunnel<C>
where\n C: UnsafeUnpin,
",1,["hyper_util::client::legacy::connect::proxy::tunnel::Tunnel"]],["impl<C, B> UnsafeUnpin for Client<C, B>
where\n C: UnsafeUnpin,
",1,["hyper_util::client::legacy::client::Client"]],["impl<E> UnsafeUnpin for Builder<E>
where\n E: UnsafeUnpin,
",1,["hyper_util::server::conn::auto::Builder"]],["impl<I> UnsafeUnpin for WithHyperIo<I>
where\n I: UnsafeUnpin,
",1,["hyper_util::rt::tokio::with_hyper_io::WithHyperIo"]],["impl<I> UnsafeUnpin for WithTokioIo<I>
where\n I: UnsafeUnpin,
",1,["hyper_util::rt::tokio::with_tokio_io::WithTokioIo"]],["impl<M, Dst> UnsafeUnpin for Singleton<M, Dst>
where\n M: UnsafeUnpin,
",1,["hyper_util::client::pool::singleton::Singleton"]],["impl<R> UnsafeUnpin for HttpConnector<R>
where\n R: UnsafeUnpin,
",1,["hyper_util::client::legacy::connect::http::HttpConnector"]],["impl<S> UnsafeUnpin for TowerToHyperService<S>
where\n S: UnsafeUnpin,
",1,["hyper_util::service::glue::TowerToHyperService"]],["impl<S, R> UnsafeUnpin for TowerToHyperServiceFuture<S, R>
where\n S: UnsafeUnpin,\n <S as Service<R>>::Future: UnsafeUnpin,\n R: UnsafeUnpin,
",1,["hyper_util::service::glue::TowerToHyperServiceFuture"]],["impl<T> UnsafeUnpin for TokioIo<T>
where\n T: UnsafeUnpin,
",1,["hyper_util::rt::tokio::TokioIo"]],["impl<T> UnsafeUnpin for Parts<T>
where\n T: UnsafeUnpin,
",1,["hyper_util::server::conn::auto::upgrade::Parts"]],["impl<T, Req> UnsafeUnpin for Map<T, Req>
where\n T: UnsafeUnpin,
",1,["hyper_util::client::pool::map::Map"]]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[4530,9790]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/core/ops/drop/trait.Drop.js b/core/target/doc/trait.impl/core/ops/drop/trait.Drop.js deleted file mode 100644 index 36271248..00000000 --- a/core/target/doc/trait.impl/core/ops/drop/trait.Drop.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["hyper_util",[["impl Drop for GaiFuture"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[338]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js b/core/target/doc/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js deleted file mode 100644 index 35b4c747..00000000 --- a/core/target/doc/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["http_body_util",[["impl RefUnwindSafe for LengthLimitError",1,["http_body_util::limited::LengthLimitError"]],["impl<'a, T> RefUnwindSafe for Frame<'a, T>
where\n T: RefUnwindSafe + ?Sized,
",1,["http_body_util::combinators::frame::Frame"]],["impl<B> RefUnwindSafe for BodyDataStream<B>
where\n B: RefUnwindSafe,
",1,["http_body_util::stream::BodyDataStream"]],["impl<B> RefUnwindSafe for BodyStream<B>
where\n B: RefUnwindSafe,
",1,["http_body_util::stream::BodyStream"]],["impl<B> RefUnwindSafe for Collected<B>
where\n B: RefUnwindSafe,
",1,["http_body_util::collected::Collected"]],["impl<B> RefUnwindSafe for Limited<B>
where\n B: RefUnwindSafe,
",1,["http_body_util::limited::Limited"]],["impl<B, F> RefUnwindSafe for MapErr<B, F>
where\n B: RefUnwindSafe,\n F: RefUnwindSafe,
",1,["http_body_util::combinators::map_err::MapErr"]],["impl<B, F> RefUnwindSafe for MapFrame<B, F>
where\n B: RefUnwindSafe,\n F: RefUnwindSafe,
",1,["http_body_util::combinators::map_frame::MapFrame"]],["impl<D> RefUnwindSafe for Empty<D>",1,["http_body_util::empty::Empty"]],["impl<D> RefUnwindSafe for Full<D>
where\n D: RefUnwindSafe,
",1,["http_body_util::full::Full"]],["impl<D, E> !RefUnwindSafe for BoxBody<D, E>",1,["http_body_util::combinators::box_body::BoxBody"]],["impl<D, E> !RefUnwindSafe for UnsyncBoxBody<D, E>",1,["http_body_util::combinators::box_body::UnsyncBoxBody"]],["impl<L, R> RefUnwindSafe for Either<L, R>
where\n L: RefUnwindSafe,\n R: RefUnwindSafe,
",1,["http_body_util::either::Either"]],["impl<S> RefUnwindSafe for StreamBody<S>
where\n S: RefUnwindSafe,
",1,["http_body_util::stream::StreamBody"]],["impl<T> RefUnwindSafe for Collect<T>
where\n T: RefUnwindSafe + ?Sized,\n <T as Body>::Data: RefUnwindSafe,
",1,["http_body_util::combinators::collect::Collect"]],["impl<T, F> RefUnwindSafe for WithTrailers<T, F>
where\n T: RefUnwindSafe,\n F: RefUnwindSafe,
",1,["http_body_util::combinators::with_trailers::WithTrailers"]]]],["hyper_util",[["impl !RefUnwindSafe for CaptureConnection",1,["hyper_util::client::legacy::connect::capture::CaptureConnection"]],["impl !RefUnwindSafe for Connected",1,["hyper_util::client::legacy::connect::Connected"]],["impl !RefUnwindSafe for Builder",1,["hyper_util::client::legacy::client::Builder"]],["impl !RefUnwindSafe for Error",1,["hyper_util::client::legacy::client::Error"]],["impl !RefUnwindSafe for ResponseFuture",1,["hyper_util::client::legacy::client::ResponseFuture"]],["impl !RefUnwindSafe for GracefulShutdown",1,["hyper_util::server::graceful::GracefulShutdown"]],["impl !RefUnwindSafe for Watcher",1,["hyper_util::server::graceful::Watcher"]],["impl RefUnwindSafe for GaiAddrs",1,["hyper_util::client::legacy::connect::dns::GaiAddrs"]],["impl RefUnwindSafe for GaiFuture",1,["hyper_util::client::legacy::connect::dns::GaiFuture"]],["impl RefUnwindSafe for GaiResolver",1,["hyper_util::client::legacy::connect::dns::GaiResolver"]],["impl RefUnwindSafe for InvalidNameError",1,["hyper_util::client::legacy::connect::dns::InvalidNameError"]],["impl RefUnwindSafe for Name",1,["hyper_util::client::legacy::connect::dns::Name"]],["impl RefUnwindSafe for HttpInfo",1,["hyper_util::client::legacy::connect::http::HttpInfo"]],["impl RefUnwindSafe for Builder",1,["hyper_util::client::proxy::matcher::Builder"]],["impl RefUnwindSafe for Intercept",1,["hyper_util::client::proxy::matcher::Intercept"]],["impl RefUnwindSafe for Matcher",1,["hyper_util::client::proxy::matcher::Matcher"]],["impl RefUnwindSafe for TokioExecutor",1,["hyper_util::rt::tokio::TokioExecutor"]],["impl RefUnwindSafe for TokioTimer",1,["hyper_util::rt::tokio::TokioTimer"]],["impl<'a, E> !RefUnwindSafe for Http1Builder<'a, E>",1,["hyper_util::server::conn::auto::Http1Builder"]],["impl<'a, E> !RefUnwindSafe for Http2Builder<'a, E>",1,["hyper_util::server::conn::auto::Http2Builder"]],["impl<'a, I, S, E> !RefUnwindSafe for Connection<'a, I, S, E>",1,["hyper_util::server::conn::auto::Connection"]],["impl<'a, I, S, E> !RefUnwindSafe for UpgradeableConnection<'a, I, S, E>",1,["hyper_util::server::conn::auto::UpgradeableConnection"]],["impl<C> RefUnwindSafe for SocksV4<C>
where\n C: RefUnwindSafe,
",1,["hyper_util::client::legacy::connect::proxy::socks::v4::SocksV4"]],["impl<C> RefUnwindSafe for SocksV5<C>
where\n C: RefUnwindSafe,
",1,["hyper_util::client::legacy::connect::proxy::socks::v5::SocksV5"]],["impl<C> RefUnwindSafe for Tunnel<C>
where\n C: RefUnwindSafe,
",1,["hyper_util::client::legacy::connect::proxy::tunnel::Tunnel"]],["impl<C, B> !RefUnwindSafe for Client<C, B>",1,["hyper_util::client::legacy::client::Client"]],["impl<E> !RefUnwindSafe for Builder<E>",1,["hyper_util::server::conn::auto::Builder"]],["impl<I> RefUnwindSafe for WithHyperIo<I>
where\n I: RefUnwindSafe,
",1,["hyper_util::rt::tokio::with_hyper_io::WithHyperIo"]],["impl<I> RefUnwindSafe for WithTokioIo<I>
where\n I: RefUnwindSafe,
",1,["hyper_util::rt::tokio::with_tokio_io::WithTokioIo"]],["impl<M, Dst> RefUnwindSafe for Singleton<M, Dst>
where\n M: RefUnwindSafe,
",1,["hyper_util::client::pool::singleton::Singleton"]],["impl<R> RefUnwindSafe for HttpConnector<R>
where\n R: RefUnwindSafe,
",1,["hyper_util::client::legacy::connect::http::HttpConnector"]],["impl<S> RefUnwindSafe for TowerToHyperService<S>
where\n S: RefUnwindSafe,
",1,["hyper_util::service::glue::TowerToHyperService"]],["impl<S, R> RefUnwindSafe for TowerToHyperServiceFuture<S, R>
where\n S: RefUnwindSafe,\n <S as Service<R>>::Future: RefUnwindSafe,\n R: RefUnwindSafe,
",1,["hyper_util::service::glue::TowerToHyperServiceFuture"]],["impl<T> RefUnwindSafe for TokioIo<T>
where\n T: RefUnwindSafe,
",1,["hyper_util::rt::tokio::TokioIo"]],["impl<T> RefUnwindSafe for Parts<T>
where\n T: RefUnwindSafe,
",1,["hyper_util::server::conn::auto::upgrade::Parts"]],["impl<T, Req> RefUnwindSafe for Map<T, Req>
where\n T: RefUnwindSafe,\n <T as Target<Req>>::Key: RefUnwindSafe,\n <T as Target<Req>>::Service: RefUnwindSafe,
",1,["hyper_util::client::pool::map::Map"]]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[10285,18701]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js b/core/target/doc/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js deleted file mode 100644 index a383700a..00000000 --- a/core/target/doc/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["http_body_util",[["impl UnwindSafe for LengthLimitError",1,["http_body_util::limited::LengthLimitError"]],["impl<'a, T> !UnwindSafe for Frame<'a, T>",1,["http_body_util::combinators::frame::Frame"]],["impl<B> UnwindSafe for BodyDataStream<B>
where\n B: UnwindSafe,
",1,["http_body_util::stream::BodyDataStream"]],["impl<B> UnwindSafe for BodyStream<B>
where\n B: UnwindSafe,
",1,["http_body_util::stream::BodyStream"]],["impl<B> UnwindSafe for Collected<B>
where\n B: UnwindSafe,
",1,["http_body_util::collected::Collected"]],["impl<B> UnwindSafe for Limited<B>
where\n B: UnwindSafe,
",1,["http_body_util::limited::Limited"]],["impl<B, F> UnwindSafe for MapErr<B, F>
where\n B: UnwindSafe,\n F: UnwindSafe,
",1,["http_body_util::combinators::map_err::MapErr"]],["impl<B, F> UnwindSafe for MapFrame<B, F>
where\n B: UnwindSafe,\n F: UnwindSafe,
",1,["http_body_util::combinators::map_frame::MapFrame"]],["impl<D> UnwindSafe for Empty<D>",1,["http_body_util::empty::Empty"]],["impl<D> UnwindSafe for Full<D>
where\n D: UnwindSafe,
",1,["http_body_util::full::Full"]],["impl<D, E> !UnwindSafe for BoxBody<D, E>",1,["http_body_util::combinators::box_body::BoxBody"]],["impl<D, E> !UnwindSafe for UnsyncBoxBody<D, E>",1,["http_body_util::combinators::box_body::UnsyncBoxBody"]],["impl<L, R> UnwindSafe for Either<L, R>
where\n L: UnwindSafe,\n R: UnwindSafe,
",1,["http_body_util::either::Either"]],["impl<S> UnwindSafe for StreamBody<S>
where\n S: UnwindSafe,
",1,["http_body_util::stream::StreamBody"]],["impl<T> UnwindSafe for Collect<T>
where\n T: UnwindSafe + ?Sized,\n <T as Body>::Data: UnwindSafe,
",1,["http_body_util::combinators::collect::Collect"]],["impl<T, F> UnwindSafe for WithTrailers<T, F>
where\n T: UnwindSafe,\n F: UnwindSafe,
",1,["http_body_util::combinators::with_trailers::WithTrailers"]]]],["hyper_util",[["impl !UnwindSafe for CaptureConnection",1,["hyper_util::client::legacy::connect::capture::CaptureConnection"]],["impl !UnwindSafe for Connected",1,["hyper_util::client::legacy::connect::Connected"]],["impl !UnwindSafe for Builder",1,["hyper_util::client::legacy::client::Builder"]],["impl !UnwindSafe for Error",1,["hyper_util::client::legacy::client::Error"]],["impl !UnwindSafe for ResponseFuture",1,["hyper_util::client::legacy::client::ResponseFuture"]],["impl !UnwindSafe for GracefulShutdown",1,["hyper_util::server::graceful::GracefulShutdown"]],["impl !UnwindSafe for Watcher",1,["hyper_util::server::graceful::Watcher"]],["impl UnwindSafe for GaiAddrs",1,["hyper_util::client::legacy::connect::dns::GaiAddrs"]],["impl UnwindSafe for GaiFuture",1,["hyper_util::client::legacy::connect::dns::GaiFuture"]],["impl UnwindSafe for GaiResolver",1,["hyper_util::client::legacy::connect::dns::GaiResolver"]],["impl UnwindSafe for InvalidNameError",1,["hyper_util::client::legacy::connect::dns::InvalidNameError"]],["impl UnwindSafe for Name",1,["hyper_util::client::legacy::connect::dns::Name"]],["impl UnwindSafe for HttpInfo",1,["hyper_util::client::legacy::connect::http::HttpInfo"]],["impl UnwindSafe for Builder",1,["hyper_util::client::proxy::matcher::Builder"]],["impl UnwindSafe for Intercept",1,["hyper_util::client::proxy::matcher::Intercept"]],["impl UnwindSafe for Matcher",1,["hyper_util::client::proxy::matcher::Matcher"]],["impl UnwindSafe for TokioExecutor",1,["hyper_util::rt::tokio::TokioExecutor"]],["impl UnwindSafe for TokioTimer",1,["hyper_util::rt::tokio::TokioTimer"]],["impl<'a, E> !UnwindSafe for Http1Builder<'a, E>",1,["hyper_util::server::conn::auto::Http1Builder"]],["impl<'a, E> !UnwindSafe for Http2Builder<'a, E>",1,["hyper_util::server::conn::auto::Http2Builder"]],["impl<'a, I, S, E> !UnwindSafe for Connection<'a, I, S, E>",1,["hyper_util::server::conn::auto::Connection"]],["impl<'a, I, S, E> !UnwindSafe for UpgradeableConnection<'a, I, S, E>",1,["hyper_util::server::conn::auto::UpgradeableConnection"]],["impl<C> UnwindSafe for SocksV4<C>
where\n C: UnwindSafe,
",1,["hyper_util::client::legacy::connect::proxy::socks::v4::SocksV4"]],["impl<C> UnwindSafe for SocksV5<C>
where\n C: UnwindSafe,
",1,["hyper_util::client::legacy::connect::proxy::socks::v5::SocksV5"]],["impl<C> UnwindSafe for Tunnel<C>
where\n C: UnwindSafe,
",1,["hyper_util::client::legacy::connect::proxy::tunnel::Tunnel"]],["impl<C, B> !UnwindSafe for Client<C, B>",1,["hyper_util::client::legacy::client::Client"]],["impl<E> !UnwindSafe for Builder<E>",1,["hyper_util::server::conn::auto::Builder"]],["impl<I> UnwindSafe for WithHyperIo<I>
where\n I: UnwindSafe,
",1,["hyper_util::rt::tokio::with_hyper_io::WithHyperIo"]],["impl<I> UnwindSafe for WithTokioIo<I>
where\n I: UnwindSafe,
",1,["hyper_util::rt::tokio::with_tokio_io::WithTokioIo"]],["impl<M, Dst> UnwindSafe for Singleton<M, Dst>
where\n M: UnwindSafe,
",1,["hyper_util::client::pool::singleton::Singleton"]],["impl<R> UnwindSafe for HttpConnector<R>
where\n R: UnwindSafe,
",1,["hyper_util::client::legacy::connect::http::HttpConnector"]],["impl<S> UnwindSafe for TowerToHyperService<S>
where\n S: UnwindSafe,
",1,["hyper_util::service::glue::TowerToHyperService"]],["impl<S, R> UnwindSafe for TowerToHyperServiceFuture<S, R>
where\n S: UnwindSafe,\n <S as Service<R>>::Future: UnwindSafe,\n R: UnwindSafe,
",1,["hyper_util::service::glue::TowerToHyperServiceFuture"]],["impl<T> UnwindSafe for TokioIo<T>
where\n T: UnwindSafe,
",1,["hyper_util::rt::tokio::TokioIo"]],["impl<T> UnwindSafe for Parts<T>
where\n T: UnwindSafe,
",1,["hyper_util::server::conn::auto::upgrade::Parts"]],["impl<T, Req> UnwindSafe for Map<T, Req>
where\n T: UnwindSafe,\n <T as Target<Req>>::Key: UnwindSafe,\n <T as Target<Req>>::Service: UnwindSafe,
",1,["hyper_util::client::pool::map::Map"]]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[9635,18233]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/core/str/traits/trait.FromStr.js b/core/target/doc/trait.impl/core/str/traits/trait.FromStr.js deleted file mode 100644 index 0b8b0dee..00000000 --- a/core/target/doc/trait.impl/core/str/traits/trait.FromStr.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["hyper_util",[["impl FromStr for Name"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[336]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/futures_core/stream/trait.Stream.js b/core/target/doc/trait.impl/futures_core/stream/trait.Stream.js deleted file mode 100644 index 60bf31db..00000000 --- a/core/target/doc/trait.impl/futures_core/stream/trait.Stream.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["http_body_util",[["impl<B> Stream for BodyDataStream<B>
where\n B: Body,
"],["impl<B> Stream for BodyStream<B>
where\n B: Body,
"],["impl<S: Stream> Stream for StreamBody<S>"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[624]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/http_body/trait.Body.js b/core/target/doc/trait.impl/http_body/trait.Body.js deleted file mode 100644 index 7b3059f4..00000000 --- a/core/target/doc/trait.impl/http_body/trait.Body.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["http_body_util",[["impl<B> Body for BodyStream<B>
where\n B: Body,
"],["impl<B> Body for Limited<B>
where\n B: Body,\n B::Error: Into<Box<dyn Error + Send + Sync>>,
"],["impl<B, F, B2> Body for MapFrame<B, F>
where\n B: Body,\n F: FnMut(Frame<B::Data>) -> Frame<B2>,\n B2: Buf,
"],["impl<B, F, E> Body for MapErr<B, F>
where\n B: Body,\n F: FnMut(B::Error) -> E,
"],["impl<B: Buf> Body for Collected<B>"],["impl<D> Body for Full<D>
where\n D: Buf,
"],["impl<D, E> Body for BoxBody<D, E>
where\n D: Buf,
"],["impl<D, E> Body for UnsyncBoxBody<D, E>
where\n D: Buf,
"],["impl<D: Buf> Body for Empty<D>"],["impl<L, R, Data> Body for Either<L, R>
where\n L: Body<Data = Data>,\n R: Body<Data = Data>,\n L::Error: Into<Box<dyn Error + Send + Sync>>,\n R::Error: Into<Box<dyn Error + Send + Sync>>,\n Data: Buf,
"],["impl<S, D, E> Body for StreamBody<S>
where\n S: Stream<Item = Result<Frame<D>, E>>,\n D: Buf,
"],["impl<T, F> Body for WithTrailers<T, F>
where\n T: Body,\n F: Future<Output = Option<Result<HeaderMap, T::Error>>>,
"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[5789]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/http_body_util/trait.BodyExt.js b/core/target/doc/trait.impl/http_body_util/trait.BodyExt.js deleted file mode 100644 index ef822b2b..00000000 --- a/core/target/doc/trait.impl/http_body_util/trait.BodyExt.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["http_body_util",[]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[21]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/hyper/rt/io/trait.Read.js b/core/target/doc/trait.impl/hyper/rt/io/trait.Read.js deleted file mode 100644 index b5494bfd..00000000 --- a/core/target/doc/trait.impl/hyper/rt/io/trait.Read.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["hyper_util",[["impl<I> Read for WithHyperIo<I>
where\n I: AsyncRead,
"],["impl<I> Read for WithTokioIo<I>
where\n I: Read,
"],["impl<T> Read for TokioIo<T>
where\n T: AsyncRead,
"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[683]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/hyper/rt/io/trait.Write.js b/core/target/doc/trait.impl/hyper/rt/io/trait.Write.js deleted file mode 100644 index 4de456fd..00000000 --- a/core/target/doc/trait.impl/hyper/rt/io/trait.Write.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["hyper_util",[["impl<I> Write for WithHyperIo<I>
where\n I: AsyncWrite,
"],["impl<I> Write for WithTokioIo<I>
where\n I: Write,
"],["impl<T> Write for TokioIo<T>
where\n T: AsyncWrite,
"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[689]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/hyper/rt/timer/trait.Timer.js b/core/target/doc/trait.impl/hyper/rt/timer/trait.Timer.js deleted file mode 100644 index e4c7b4c6..00000000 --- a/core/target/doc/trait.impl/hyper/rt/timer/trait.Timer.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["hyper_util",[["impl Timer for TokioTimer"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[173]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/hyper/rt/trait.Executor.js b/core/target/doc/trait.impl/hyper/rt/trait.Executor.js deleted file mode 100644 index 7e4ebe1f..00000000 --- a/core/target/doc/trait.impl/hyper/rt/trait.Executor.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["hyper_util",[["impl<Fut> Executor<Fut> for TokioExecutor
where\n Fut: Future + Send + 'static,\n Fut::Output: Send + 'static,
"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[896]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/hyper/service/service/trait.Service.js b/core/target/doc/trait.impl/hyper/service/service/trait.Service.js deleted file mode 100644 index 0131f34d..00000000 --- a/core/target/doc/trait.impl/hyper/service/service/trait.Service.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["hyper_util",[["impl<S, R> Service<R> for TowerToHyperService<S>
where\n S: Service<R> + Clone,
"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[423]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/hyper_util/client/legacy/connect/sealed/trait.Connect.js b/core/target/doc/trait.impl/hyper_util/client/legacy/connect/sealed/trait.Connect.js deleted file mode 100644 index 184a74ae..00000000 --- a/core/target/doc/trait.impl/hyper_util/client/legacy/connect/sealed/trait.Connect.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["hyper_util",[]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[17]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/hyper_util/client/legacy/connect/trait.Connection.js b/core/target/doc/trait.impl/hyper_util/client/legacy/connect/trait.Connection.js deleted file mode 100644 index 184a74ae..00000000 --- a/core/target/doc/trait.impl/hyper_util/client/legacy/connect/trait.Connection.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["hyper_util",[]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[17]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/hyper_util/server/conn/auto/trait.HttpServerConnExec.js b/core/target/doc/trait.impl/hyper_util/server/conn/auto/trait.HttpServerConnExec.js deleted file mode 100644 index 184a74ae..00000000 --- a/core/target/doc/trait.impl/hyper_util/server/conn/auto/trait.HttpServerConnExec.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["hyper_util",[]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[17]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/hyper_util/server/graceful/trait.GracefulConnection.js b/core/target/doc/trait.impl/hyper_util/server/graceful/trait.GracefulConnection.js deleted file mode 100644 index 184a74ae..00000000 --- a/core/target/doc/trait.impl/hyper_util/server/graceful/trait.GracefulConnection.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["hyper_util",[]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[17]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/tokio/io/async_read/trait.AsyncRead.js b/core/target/doc/trait.impl/tokio/io/async_read/trait.AsyncRead.js deleted file mode 100644 index 8643393a..00000000 --- a/core/target/doc/trait.impl/tokio/io/async_read/trait.AsyncRead.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["hyper_util",[["impl<I> AsyncRead for WithHyperIo<I>
where\n I: AsyncRead,
"],["impl<I> AsyncRead for WithTokioIo<I>
where\n I: Read,
"],["impl<T> AsyncRead for TokioIo<T>
where\n T: Read,
"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[693]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/tokio/io/async_write/trait.AsyncWrite.js b/core/target/doc/trait.impl/tokio/io/async_write/trait.AsyncWrite.js deleted file mode 100644 index a43c5582..00000000 --- a/core/target/doc/trait.impl/tokio/io/async_write/trait.AsyncWrite.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["hyper_util",[["impl<I> AsyncWrite for WithHyperIo<I>
where\n I: AsyncWrite,
"],["impl<I> AsyncWrite for WithTokioIo<I>
where\n I: Write,
"],["impl<T> AsyncWrite for TokioIo<T>
where\n T: Write,
"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[699]} \ No newline at end of file diff --git a/core/target/doc/trait.impl/tower_service/trait.Service.js b/core/target/doc/trait.impl/tower_service/trait.Service.js deleted file mode 100644 index 85426086..00000000 --- a/core/target/doc/trait.impl/tower_service/trait.Service.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["hyper_util",[["impl Service<Name> for GaiResolver"],["impl<C> Service<Uri> for SocksV4<C>
where\n C: Service<Uri>,\n C::Future: Send + 'static,\n C::Response: Read + Write + Unpin + Send + 'static,\n C::Error: Send + 'static,
"],["impl<C> Service<Uri> for SocksV5<C>
where\n C: Service<Uri>,\n C::Future: Send + 'static,\n C::Response: Read + Write + Unpin + Send + 'static,\n C::Error: Send + 'static,
"],["impl<C> Service<Uri> for Tunnel<C>
where\n C: Service<Uri>,\n C::Future: Send + 'static,\n C::Response: Read + Write + Unpin + Send + 'static,\n C::Error: Into<Box<dyn StdError + Send + Sync>>,
"],["impl<C, B> Service<Request<B>> for &Client<C, B>
where\n C: Connect + Clone + Send + Sync + 'static,\n B: Body + Send + 'static + Unpin,\n B::Data: Send,\n B::Error: Into<Box<dyn StdError + Send + Sync>>,
"],["impl<C, B> Service<Request<B>> for Client<C, B>
where\n C: Connect + Clone + Send + Sync + 'static,\n B: Body + Send + 'static + Unpin,\n B::Data: Send,\n B::Error: Into<Box<dyn StdError + Send + Sync>>,
"],["impl<M, Target> Service<Target> for Singleton<M, Target>
where\n M: Service<Target>,\n M::Response: Clone,\n M::Error: Into<Box<dyn Error + Send + Sync>>,
"],["impl<R> Service<Uri> for HttpConnector<R>
where\n R: Resolve + Clone + Send + Sync + 'static,\n R::Future: Send,
"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[9598]} \ No newline at end of file diff --git a/fix-and-build.sh b/fix-and-build.sh new file mode 100755 index 00000000..71d92586 --- /dev/null +++ b/fix-and-build.sh @@ -0,0 +1,76 @@ +#!/bin/bash +# Fix Rust Installation and Build Backend + +echo "============================================" +echo "Fixing Rust Installation" +echo "============================================" +echo "" + +# Add Cargo to PATH permanently +echo "Adding Rust to your shell configuration..." + +if [ -f "$HOME/.zshrc" ]; then + if ! grep -q '.cargo/env' "$HOME/.zshrc"; then + echo '' >> "$HOME/.zshrc" + echo '# Rust (Cargo)' >> "$HOME/.zshrc" + echo 'source "$HOME/.cargo/env"' >> "$HOME/.zshrc" + echo "✅ Added Rust to ~/.zshrc" + else + echo "✅ Rust already in ~/.zshrc" + fi +fi + +# Source it for current shell +export PATH="$HOME/.cargo/bin:$PATH" + +# Check if rustup exists, if not install Rust +if ! command -v rustup &> /dev/null; then + echo "" + echo "Installing Rust..." + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable + source "$HOME/.cargo/env" +fi + +# Set default toolchain +rustup default stable + +echo "" +echo "✅ Rust Configuration Complete" +echo "" +echo "Rust version: $(rustc --version)" +echo "Cargo version: $(cargo --version)" +echo "" + +# Now build the backend +echo "============================================" +echo "Building Backend" +echo "============================================" +echo "" + +cd core + +echo "Building... (this takes 5-10 minutes on first build)" +cargo build --bin archipelago + +if [ $? -eq 0 ]; then + echo "" + echo "============================================" + echo "✅ SUCCESS! Backend Built" + echo "============================================" + echo "" + echo "Next steps:" + echo "" + echo "1. Restart your terminal (or run: source ~/.zshrc)" + echo "" + echo "2. Start the full stack:" + echo " ./scripts/dev-start.sh" + echo " Choose option 2" + echo "" + echo "Or manually:" + echo " Terminal 1: cd core && cargo run --bin archipelago" + echo " Terminal 2: cd neode-ui && npm run dev" + echo "" +else + echo "" + echo "❌ Build failed. Check errors above." +fi diff --git a/neode-ui/dev-dist/sw.js b/neode-ui/dev-dist/sw.js index 541055c8..ccf1d175 100644 --- a/neode-ui/dev-dist/sw.js +++ b/neode-ui/dev-dist/sw.js @@ -82,7 +82,7 @@ define(['./workbox-21a80088'], (function (workbox) { 'use strict'; "revision": "3ca0b8505b4bec776b69afdba2768812" }, { "url": "index.html", - "revision": "0.jv9lduaqgik" + "revision": "0.sf8ui0pk8h8" }], {}); workbox.cleanupOutdatedCaches(); workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), { diff --git a/rebuild-backend.sh b/rebuild-backend.sh new file mode 100755 index 00000000..fbafb00e --- /dev/null +++ b/rebuild-backend.sh @@ -0,0 +1,49 @@ +#!/bin/bash +# Rebuild Backend After Fixes + +echo "============================================" +echo "Rebuilding Archipelago Backend" +echo "============================================" +echo "" + +# Ensure Rust is in PATH +export PATH="$HOME/.cargo/bin:$PATH" + +# Navigate to core directory +cd "$(dirname "$0")/core" || exit 1 + +echo "Building backend..." +echo "" + +# Build the backend +cargo build --bin archipelago + +if [ $? -eq 0 ]; then + echo "" + echo "============================================" + echo "✅ Backend Build SUCCESS!" + echo "============================================" + echo "" + echo "The backend is now ready to run!" + echo "" + echo "To start the full stack:" + echo "" + echo "Option 1 - Use the dev script:" + echo " ./scripts/dev-start.sh" + echo " Choose option 2 (Full stack)" + echo "" + echo "Option 2 - Manual start:" + echo " Terminal 1: cd core && cargo run --bin archipelago" + echo " Terminal 2: cd neode-ui && npm run dev" + echo "" + echo "Then open: http://localhost:8100" + echo "" +else + echo "" + echo "============================================" + echo "❌ Build Failed" + echo "============================================" + echo "" + echo "Check the error messages above." + echo "" +fi diff --git a/scripts/dev-start.sh b/scripts/dev-start.sh index 54c91e4a..e63afa12 100755 --- a/scripts/dev-start.sh +++ b/scripts/dev-start.sh @@ -83,6 +83,15 @@ case $choice in fi echo " 🚀 Starting Archipelago backend..." + # Set development environment variables + export ARCHIPELAGO_DATA_DIR=/tmp/archipelago-dev + export ARCHIPELAGO_DEV_DATA_DIR=/tmp/archipelago-dev + export ARCHIPELAGO_DEV_MODE=true + export ARCHIPELAGO_BIND=127.0.0.1:5959 + export ARCHIPELAGO_LOG_LEVEL=debug + export ARCHIPELAGO_PORT_OFFSET=10000 + export ARCHIPELAGO_BITCOIN_SIMULATION=mock + cargo run --bin archipelago > /tmp/archipelago-backend.log 2>&1 & BACKEND_PID=$! echo " Backend PID: $BACKEND_PID" diff --git a/setup-env.sh b/setup-env.sh new file mode 100755 index 00000000..2b56f962 --- /dev/null +++ b/setup-env.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# Quick fix script to set up environment for backend + +cd "$(dirname "$0")/core" + +# Create a simple .env file for development +cat > .env << 'EOF' +# Development Environment Configuration +ARCHIPELAGO_DATA_DIR=/tmp/archipelago-dev +ARCHIPELAGO_DEV_DATA_DIR=/tmp/archipelago-dev +ARCHIPELAGO_DEV_MODE=true +ARCHIPELAGO_BIND=127.0.0.1:5959 +ARCHIPELAGO_LOG_LEVEL=debug +ARCHIPELAGO_PORT_OFFSET=10000 +ARCHIPELAGO_BITCOIN_SIMULATION=mock +EOF + +echo "✅ Created core/.env file for development" +echo "" +echo "Environment configured:" +echo " - Data directory: /tmp/archipelago-dev" +echo " - Bind address: 127.0.0.1:5959" +echo " - Dev mode: enabled" +echo "" +echo "Now run: ./scripts/dev-start.sh"