pub fn preferred_transport(
doc: &Value,
kind: Option<SocketKind>,
) -> Option<TransportConfig>Expand description
The single most-preferred transport TransportConfig from a DID document,
optionally constrained to a SocketKind.
When kind is Some(SocketKind::Quic), only QUIC entries are considered
(the Resolver contract asks for a specific socket kind). None returns
the overall top preference from transport_entries. Returns None when no
matching reach exists.