Skip to main content

Crate tilo_net

Crate tilo_net 

Source
Expand description

The network capability on Linux, macOS and the web.

One async API on every target, every future Send, so an app hands requests to tilo_rt::app() instead of running a blocking client on a thread of its own. What a target cannot provide is an Unsupported error at run time, never a missing item.

Modules§

address
One judge of whether an address is on the public internet, for every caller that keeps a request off this machine and its network: the fetch proxy (crate::proxy) and the guard of a page’s fetch both ask it, and neither keeps a list of its own.
header
HTTP header types
proxy
The host’s fetch proxy: how a page reads cross-origin responses that the site does not allow it to (CORS). The workspace host the page is admitted to offers one: [host] is its implementation, which tilo-server serves and, in development, tilo-fetch-proxy.
status
Whether the device is online, and whether its connection is metered.

Structs§

Bytes
A cheaply cloneable and sliceable chunk of contiguous memory.
HeaderMap
A specialized multimap for header names and values.
HeaderName
Represents an HTTP header field name
HeaderValue
Represents an HTTP header field value.
Method
The Request Method (VERB)
StatusCode
An HTTP status code (status-code in RFC 9110 et al.).
Url
A parsed URL record.

Enums§

Availability
Feature
NetError

Functions§

availability
available
client_config
client_config_also_trusting
A test’s own certificates (DER), trusted as a chain root and as that exact server certificate; production trust is client_config alone.
client_config_with_roots
crypto_provider
install_crypto_provider
Install crypto_provider as the process default: libraries that read CryptoProvider::get_default() need this before they build a client. Repeated calls are harmless.
lacks_authorities
Why this program can check no server’s identity, where the system’s trust bundle gives it no certificate authority: which file that is and what is wrong with it. None where it has some, and on a system whose own store is asked instead of a file.
loopback_name
Whether name is a name of this machine: localhost and every name under it, which a browser resolves to loopback itself. The local stack serves the site as tilo.localhost.
pinned_client_config
Trusts the server certificate accept admits, given its DER, instead of a chain to a root. The handshake signature is still verified, so the server holds the admitted certificate’s key.
secure_endpoint
Whether url is a credential-free endpoint on a secure_origin: https, or plain http on this machine, with a host and neither username nor password.
secure_origin
Whether url is on an origin browsers treat as secure: https, or plain http on this machine, which never leaves it.
server_verifier_also_trusting
Verifies as client_config does, and also trusts each of extra (DER) as a chain root and as that exact server certificate, so a self-signed server (which a chain check does not take as its own root) verifies. Verification stays on: a server must still present one of these or a chain to a trusted root, for its name, and hold its key.
system_roots
Roots from the Tilo system trust bundle. An unreadable bundle yields an empty store, so verification fails closed.

Type Aliases§

Unsupported