Skip to main content

Module registry

Module registry 

Source
Expand description

Open/closed transport-kind registry.

Each transport (inproc, mock, and future tcp/quic/ws crates) submits a TransportKind implementation via the [register_transport!] macro. The public crate::connect and crate::listen entry points iterate registered kinds to find the one whose schemes() contains the URL’s scheme.

Adding a new transport means adding a crate that calls register_transport! — no edits to existing code, mirroring the confium-core::ffi::registry pattern used for crypto interfaces.

Structs§

RegisteredTransport
Wrapper around &'static dyn TransportKind so the kind can be registered with inventory and discovered at link time.

Traits§

TransportKind
Factory for a family of transport schemes.

Functions§

find
Find the registered kind that owns scheme, if any.
iter
Iterator over all transport kinds registered at link time.